@builder.io/sdk-react-nextjs 0.12.6 → 0.12.8
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/{USE_CLIENT_BUNDLE-4d4e23b4.js → USE_CLIENT_BUNDLE-164b0828.js} +193 -195
- package/lib/browser/USE_CLIENT_BUNDLE-a350a268.cjs +21 -0
- package/lib/{edge/USE_SERVER_BUNDLE-fda604b6.js → browser/USE_SERVER_BUNDLE-5219d3fc.js} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-19879780.cjs → browser/USE_SERVER_BUNDLE-b1e8364e.cjs} +1 -1
- package/lib/browser/{bundle-6e21e129.cjs → bundle-f375f07b.cjs} +21 -21
- package/lib/browser/{bundle-b3104268.js → bundle-f83a1ca5.js} +537 -447
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +23 -22
- package/lib/{node/USE_CLIENT_BUNDLE-aa8ab44a.js → edge/USE_CLIENT_BUNDLE-b8d07605.js} +193 -195
- package/lib/edge/USE_CLIENT_BUNDLE-f1ccd54b.cjs +21 -0
- package/lib/{node/USE_SERVER_BUNDLE-cbcb1baf.cjs → edge/USE_SERVER_BUNDLE-2e4c0a0a.cjs} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-2fdc522e.js → edge/USE_SERVER_BUNDLE-cd7a6238.js} +1 -1
- package/lib/edge/{bundle-ee1ebe27.js → bundle-3da03df6.js} +574 -484
- package/lib/edge/{bundle-f2d4a6db.cjs → bundle-5b207761.cjs} +29 -29
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +23 -22
- package/lib/{edge/USE_CLIENT_BUNDLE-41ee32e4.js → node/USE_CLIENT_BUNDLE-e0108fb4.js} +193 -195
- package/lib/node/USE_CLIENT_BUNDLE-e31c74cc.cjs +21 -0
- package/lib/{browser/USE_SERVER_BUNDLE-ccca985e.cjs → node/USE_SERVER_BUNDLE-29398256.cjs} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-2bf0dc28.js → node/USE_SERVER_BUNDLE-3e951ab1.js} +1 -1
- package/lib/node/{bundle-99e5b33f.js → bundle-6c5cef2d.js} +268 -178
- package/lib/node/{bundle-c799b7fc.cjs → bundle-83186530.cjs} +9 -9
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +23 -22
- package/package.json +1 -1
- package/types/cjs/components/block/animator.d.ts +5 -0
- package/types/cjs/components/content-variants/helpers.d.ts +1 -1
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/helpers/preview-lru-cache/get.d.ts +1 -1
- package/types/cjs/helpers/subscribe-to-editor.d.ts +35 -0
- package/types/cjs/server-index.d.ts +18 -3
- package/types/cjs/types/builder-block.d.ts +18 -1
- package/types/esm/components/block/animator.d.ts +5 -0
- package/types/esm/components/content-variants/helpers.d.ts +1 -1
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/helpers/preview-lru-cache/get.d.ts +1 -1
- package/types/esm/helpers/subscribe-to-editor.d.ts +35 -0
- package/types/esm/server-index.d.ts +18 -3
- package/types/esm/types/builder-block.d.ts +18 -1
- package/lib/browser/USE_CLIENT_BUNDLE-e5d64246.cjs +0 -21
- package/lib/edge/USE_CLIENT_BUNDLE-cc55e91d.cjs +0 -21
- package/lib/node/USE_CLIENT_BUNDLE-343cb348.cjs +0 -21
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { LRUCache as
|
|
1
|
+
import { LRUCache as $e } from "lru-cache";
|
|
2
2
|
import { jsx as l, Fragment as k, jsxs as R } from "react/jsx-runtime";
|
|
3
|
-
import { I as
|
|
3
|
+
import { I as We, B as Oe, a as Ne, D as Fe, b as Le, C as Ue, E as _e, F as De, c as Me, d as je, S as He, V as Ke, e as ze } from "./USE_CLIENT_BUNDLE-164b0828.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "next/navigation";
|
|
6
|
-
const
|
|
6
|
+
const qe = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), to = (e) => typeof e == "string" && qe.has(e.toLowerCase()), I = "rsc", M = () => {
|
|
7
7
|
switch (I) {
|
|
8
8
|
case "react":
|
|
9
9
|
case "reactNative":
|
|
@@ -16,7 +16,7 @@ const Ke = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr",
|
|
|
16
16
|
return "class";
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
function
|
|
19
|
+
function Ge(e) {
|
|
20
20
|
var t;
|
|
21
21
|
return {
|
|
22
22
|
...(t = e.component) == null ? void 0 : t.options,
|
|
@@ -27,29 +27,29 @@ function ze(e) {
|
|
|
27
27
|
builderBlock: e
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
const
|
|
31
|
-
log: (...e) => console.log(
|
|
32
|
-
error: (...e) => console.error(
|
|
33
|
-
warn: (...e) => console.warn(
|
|
34
|
-
debug: (...e) => console.debug(
|
|
30
|
+
const P = "[Builder.io]: ", v = {
|
|
31
|
+
log: (...e) => console.log(P, ...e),
|
|
32
|
+
error: (...e) => console.error(P, ...e),
|
|
33
|
+
warn: (...e) => console.warn(P, ...e),
|
|
34
|
+
debug: (...e) => console.debug(P, ...e)
|
|
35
35
|
};
|
|
36
36
|
function S() {
|
|
37
37
|
return typeof window < "u" && typeof document < "u";
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function Je() {
|
|
40
40
|
return S() && window.self !== window.top;
|
|
41
41
|
}
|
|
42
42
|
function j() {
|
|
43
|
-
return
|
|
43
|
+
return Je() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
44
44
|
}
|
|
45
|
-
const
|
|
45
|
+
const Ye = () => {
|
|
46
46
|
if (S()) {
|
|
47
47
|
const e = new URL(location.href);
|
|
48
48
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
49
49
|
} else
|
|
50
50
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
51
|
-
},
|
|
52
|
-
const e =
|
|
51
|
+
}, Qe = () => typeof navigator == "object" && navigator.userAgent || "", le = () => {
|
|
52
|
+
const e = Qe(), t = {
|
|
53
53
|
Android() {
|
|
54
54
|
return e.match(/Android/i);
|
|
55
55
|
},
|
|
@@ -68,13 +68,13 @@ const Ge = () => {
|
|
|
68
68
|
any() {
|
|
69
69
|
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || I === "reactNative";
|
|
70
70
|
}
|
|
71
|
-
}, n = e.match(/Tablet|iPad/i), o =
|
|
71
|
+
}, n = e.match(/Tablet|iPad/i), o = Ye();
|
|
72
72
|
return {
|
|
73
73
|
urlPath: o == null ? void 0 : o.pathname,
|
|
74
74
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
75
75
|
device: n ? "tablet" : t.any() ? "mobile" : "desktop"
|
|
76
76
|
};
|
|
77
|
-
},
|
|
77
|
+
}, Xe = ({
|
|
78
78
|
builder: e,
|
|
79
79
|
context: t,
|
|
80
80
|
event: n,
|
|
@@ -86,12 +86,12 @@ const Ge = () => {
|
|
|
86
86
|
builder: e,
|
|
87
87
|
context: t,
|
|
88
88
|
event: n
|
|
89
|
-
}),
|
|
89
|
+
}), Ze = () => ({
|
|
90
90
|
isEditing: j(),
|
|
91
91
|
isBrowser: S(),
|
|
92
92
|
isServer: !S(),
|
|
93
|
-
getUserAttributes: () =>
|
|
94
|
-
}),
|
|
93
|
+
getUserAttributes: () => le()
|
|
94
|
+
}), et = (e, {
|
|
95
95
|
isExpression: t = !0
|
|
96
96
|
}) => /* 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, G = ({
|
|
97
97
|
code: e,
|
|
@@ -99,22 +99,22 @@ const Ge = () => {
|
|
|
99
99
|
context: n,
|
|
100
100
|
event: o,
|
|
101
101
|
localState: i,
|
|
102
|
-
rootSetState:
|
|
103
|
-
rootState:
|
|
102
|
+
rootSetState: r,
|
|
103
|
+
rootState: a
|
|
104
104
|
}) => {
|
|
105
|
-
const s =
|
|
105
|
+
const s = Xe({
|
|
106
106
|
builder: t,
|
|
107
107
|
context: n,
|
|
108
108
|
event: o,
|
|
109
|
-
state:
|
|
110
|
-
rootState:
|
|
109
|
+
state: de({
|
|
110
|
+
rootState: a,
|
|
111
111
|
localState: i,
|
|
112
|
-
rootSetState:
|
|
112
|
+
rootSetState: r
|
|
113
113
|
})
|
|
114
114
|
});
|
|
115
115
|
return new Function(...s.map(([c]) => c), e)(...s.map(([, c]) => c));
|
|
116
116
|
};
|
|
117
|
-
function
|
|
117
|
+
function de({
|
|
118
118
|
rootState: e,
|
|
119
119
|
localState: t,
|
|
120
120
|
rootSetState: n
|
|
@@ -123,74 +123,74 @@ function le({
|
|
|
123
123
|
get: (o, i) => {
|
|
124
124
|
if (t && i in t)
|
|
125
125
|
return t[i];
|
|
126
|
-
const
|
|
127
|
-
return typeof
|
|
128
|
-
rootState:
|
|
126
|
+
const r = o[i];
|
|
127
|
+
return typeof r == "object" ? de({
|
|
128
|
+
rootState: r,
|
|
129
129
|
localState: void 0,
|
|
130
|
-
rootSetState: n ? (
|
|
131
|
-
o[i] =
|
|
130
|
+
rootSetState: n ? (a) => {
|
|
131
|
+
o[i] = a, n(o);
|
|
132
132
|
} : void 0
|
|
133
|
-
}) :
|
|
133
|
+
}) : r;
|
|
134
134
|
},
|
|
135
|
-
set: (o, i,
|
|
135
|
+
set: (o, i, r) => {
|
|
136
136
|
if (t && i in t)
|
|
137
137
|
throw new Error("Writing to local state is not allowed as it is read-only.");
|
|
138
|
-
return o[i] =
|
|
138
|
+
return o[i] = r, n == null || n(o), !0;
|
|
139
139
|
}
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
142
|
const C = (e) => e != null;
|
|
143
|
-
function
|
|
143
|
+
function tt() {
|
|
144
144
|
var e;
|
|
145
145
|
return typeof process < "u" && C((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
146
146
|
}
|
|
147
|
-
const
|
|
147
|
+
const nt = () => {
|
|
148
148
|
var o;
|
|
149
|
-
if (!
|
|
149
|
+
if (!tt())
|
|
150
150
|
return !1;
|
|
151
151
|
const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
|
|
152
|
-
return e && t && !n ? (
|
|
153
|
-
},
|
|
152
|
+
return e && t && !n ? (v.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;
|
|
153
|
+
}, ot = (e) => (S() || nt(), G(e));
|
|
154
154
|
function H({
|
|
155
155
|
code: e,
|
|
156
156
|
context: t,
|
|
157
157
|
localState: n,
|
|
158
158
|
rootState: o,
|
|
159
159
|
rootSetState: i,
|
|
160
|
-
event:
|
|
161
|
-
isExpression:
|
|
160
|
+
event: r,
|
|
161
|
+
isExpression: a = !0
|
|
162
162
|
}) {
|
|
163
163
|
if (e === "") {
|
|
164
|
-
|
|
164
|
+
v.warn("Skipping evaluation of empty code block.");
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
167
|
const s = {
|
|
168
|
-
code:
|
|
169
|
-
isExpression:
|
|
168
|
+
code: et(e, {
|
|
169
|
+
isExpression: a
|
|
170
170
|
}),
|
|
171
|
-
builder:
|
|
171
|
+
builder: Ze(),
|
|
172
172
|
context: t,
|
|
173
|
-
event:
|
|
173
|
+
event: r,
|
|
174
174
|
rootSetState: i,
|
|
175
175
|
rootState: o,
|
|
176
176
|
localState: n
|
|
177
177
|
};
|
|
178
178
|
try {
|
|
179
|
-
return
|
|
179
|
+
return ot(s);
|
|
180
180
|
} catch (c) {
|
|
181
|
-
|
|
181
|
+
v.error("Failed code evaluation: " + c.message, {
|
|
182
182
|
code: e
|
|
183
183
|
});
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
const
|
|
187
|
+
const W = (e) => JSON.parse(JSON.stringify(e)), it = (e, t, n) => {
|
|
188
188
|
if (Object(e) !== e)
|
|
189
189
|
return e;
|
|
190
190
|
const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
191
|
-
return o.slice(0, -1).reduce((i,
|
|
191
|
+
return o.slice(0, -1).reduce((i, r, a) => Object(i[r]) === i[r] ? i[r] : i[r] = Math.abs(Number(o[a + 1])) >> 0 === +o[a + 1] ? [] : {}, e)[o[o.length - 1]] = n, e;
|
|
192
192
|
};
|
|
193
|
-
const
|
|
193
|
+
const rt = ({
|
|
194
194
|
block: e,
|
|
195
195
|
context: t,
|
|
196
196
|
localState: n,
|
|
@@ -199,13 +199,13 @@ const ot = ({
|
|
|
199
199
|
}) => {
|
|
200
200
|
if (!e.bindings)
|
|
201
201
|
return e;
|
|
202
|
-
const
|
|
203
|
-
...
|
|
202
|
+
const r = W(e), a = {
|
|
203
|
+
...r,
|
|
204
204
|
properties: {
|
|
205
|
-
...
|
|
205
|
+
...r.properties
|
|
206
206
|
},
|
|
207
207
|
actions: {
|
|
208
|
-
...
|
|
208
|
+
...r.actions
|
|
209
209
|
}
|
|
210
210
|
};
|
|
211
211
|
for (const s in e.bindings) {
|
|
@@ -216,41 +216,41 @@ const ot = ({
|
|
|
216
216
|
rootSetState: i,
|
|
217
217
|
context: t
|
|
218
218
|
});
|
|
219
|
-
|
|
219
|
+
it(a, s, m);
|
|
220
220
|
}
|
|
221
|
-
return
|
|
221
|
+
return a;
|
|
222
222
|
};
|
|
223
|
-
function
|
|
223
|
+
function $({
|
|
224
224
|
block: e,
|
|
225
225
|
context: t,
|
|
226
226
|
shouldEvaluateBindings: n,
|
|
227
227
|
localState: o,
|
|
228
228
|
rootState: i,
|
|
229
|
-
rootSetState:
|
|
229
|
+
rootSetState: r
|
|
230
230
|
}) {
|
|
231
|
-
const
|
|
232
|
-
return n ?
|
|
233
|
-
block:
|
|
231
|
+
const a = e;
|
|
232
|
+
return n ? rt({
|
|
233
|
+
block: a,
|
|
234
234
|
localState: o,
|
|
235
235
|
rootState: i,
|
|
236
|
-
rootSetState:
|
|
236
|
+
rootSetState: r,
|
|
237
237
|
context: t
|
|
238
|
-
}) :
|
|
238
|
+
}) : a;
|
|
239
239
|
}
|
|
240
|
-
const
|
|
240
|
+
const at = ({
|
|
241
241
|
block: e,
|
|
242
242
|
context: t,
|
|
243
243
|
registeredComponents: n
|
|
244
244
|
}) => {
|
|
245
|
-
var
|
|
246
|
-
const o = (
|
|
245
|
+
var r;
|
|
246
|
+
const o = (r = $({
|
|
247
247
|
block: e,
|
|
248
248
|
localState: t.localState,
|
|
249
249
|
rootState: t.rootState,
|
|
250
250
|
rootSetState: t.rootSetState,
|
|
251
251
|
context: t.context,
|
|
252
252
|
shouldEvaluateBindings: !1
|
|
253
|
-
}).component) == null ? void 0 :
|
|
253
|
+
}).component) == null ? void 0 : r.name;
|
|
254
254
|
if (!o)
|
|
255
255
|
return null;
|
|
256
256
|
const i = n[o];
|
|
@@ -259,7 +259,7 @@ const it = ({
|
|
|
259
259
|
console.warn(`
|
|
260
260
|
Could not find a registered component named "${o}".
|
|
261
261
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
262
|
-
},
|
|
262
|
+
}, st = ({
|
|
263
263
|
block: e,
|
|
264
264
|
context: t
|
|
265
265
|
}) => {
|
|
@@ -278,7 +278,7 @@ const it = ({
|
|
|
278
278
|
});
|
|
279
279
|
if (!Array.isArray(i))
|
|
280
280
|
return;
|
|
281
|
-
const
|
|
281
|
+
const r = n.collection.split(".").pop(), a = n.itemName || (r ? r + "Item" : "item");
|
|
282
282
|
return i.map((c, m) => ({
|
|
283
283
|
context: {
|
|
284
284
|
...t,
|
|
@@ -286,13 +286,13 @@ const it = ({
|
|
|
286
286
|
...t.localState,
|
|
287
287
|
$index: m,
|
|
288
288
|
$item: c,
|
|
289
|
-
[
|
|
290
|
-
[`$${
|
|
289
|
+
[a]: c,
|
|
290
|
+
[`$${a}Index`]: m
|
|
291
291
|
}
|
|
292
292
|
},
|
|
293
293
|
block: o
|
|
294
294
|
}));
|
|
295
|
-
},
|
|
295
|
+
}, ue = {
|
|
296
296
|
small: {
|
|
297
297
|
min: 320,
|
|
298
298
|
default: 321,
|
|
@@ -308,11 +308,11 @@ const it = ({
|
|
|
308
308
|
default: 991,
|
|
309
309
|
max: 1200
|
|
310
310
|
}
|
|
311
|
-
},
|
|
311
|
+
}, J = (e, t = ue) => `@media (max-width: ${t[e].max}px)`, me = ({
|
|
312
312
|
small: e,
|
|
313
313
|
medium: t
|
|
314
314
|
}) => {
|
|
315
|
-
const n =
|
|
315
|
+
const n = W(ue);
|
|
316
316
|
if (!e || !t)
|
|
317
317
|
return n;
|
|
318
318
|
const o = Math.floor(e / 2);
|
|
@@ -327,24 +327,24 @@ const it = ({
|
|
|
327
327
|
min: i,
|
|
328
328
|
default: i + 1
|
|
329
329
|
};
|
|
330
|
-
const
|
|
330
|
+
const r = n.medium.max + 1;
|
|
331
331
|
return n.large = {
|
|
332
332
|
max: 2e3,
|
|
333
333
|
// TODO: decide upper limit
|
|
334
|
-
min:
|
|
335
|
-
default:
|
|
334
|
+
min: r,
|
|
335
|
+
default: r + 1
|
|
336
336
|
}, n;
|
|
337
|
-
},
|
|
337
|
+
}, ct = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), fe = (e) => Object.entries(e).map(([n, o]) => {
|
|
338
338
|
if (typeof o == "string")
|
|
339
|
-
return `${
|
|
340
|
-
}).filter(C),
|
|
339
|
+
return `${ct(n)}: ${o};`;
|
|
340
|
+
}).filter(C), lt = (e) => fe(e).join(`
|
|
341
341
|
`), L = ({
|
|
342
342
|
mediaQuery: e,
|
|
343
343
|
className: t,
|
|
344
344
|
styles: n
|
|
345
345
|
}) => {
|
|
346
346
|
const o = `.${t} {
|
|
347
|
-
${
|
|
347
|
+
${lt(n)}
|
|
348
348
|
}`;
|
|
349
349
|
return e ? `${e} {
|
|
350
350
|
${o}
|
|
@@ -353,9 +353,9 @@ const it = ({
|
|
|
353
353
|
function O(e) {
|
|
354
354
|
return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function dt(e) {
|
|
357
357
|
const t = function() {
|
|
358
|
-
const i =
|
|
358
|
+
const i = $({
|
|
359
359
|
block: e.block,
|
|
360
360
|
localState: e.context.localState,
|
|
361
361
|
rootState: e.context.rootState,
|
|
@@ -366,16 +366,16 @@ function ct(e) {
|
|
|
366
366
|
return C(i.hide) ? !i.hide : C(i.show) ? i.show : !0;
|
|
367
367
|
}, n = function() {
|
|
368
368
|
var d;
|
|
369
|
-
const i =
|
|
369
|
+
const i = $({
|
|
370
370
|
block: e.block,
|
|
371
371
|
localState: e.context.localState,
|
|
372
372
|
rootState: e.context.rootState,
|
|
373
373
|
rootSetState: e.context.rootSetState,
|
|
374
374
|
context: e.context.context,
|
|
375
375
|
shouldEvaluateBindings: !0
|
|
376
|
-
}),
|
|
377
|
-
((d =
|
|
378
|
-
), c =
|
|
376
|
+
}), r = i.responsiveStyles, a = e.context.content, s = me(
|
|
377
|
+
((d = a == null ? void 0 : a.meta) == null ? void 0 : d.breakpoints) || {}
|
|
378
|
+
), c = r == null ? void 0 : r.large, m = r == null ? void 0 : r.medium, g = r == null ? void 0 : r.small, p = i.id;
|
|
379
379
|
if (!p)
|
|
380
380
|
return "";
|
|
381
381
|
const f = c ? L({
|
|
@@ -384,14 +384,14 @@ function ct(e) {
|
|
|
384
384
|
}) : "", h = m ? L({
|
|
385
385
|
className: p,
|
|
386
386
|
styles: m,
|
|
387
|
-
mediaQuery:
|
|
387
|
+
mediaQuery: J(
|
|
388
388
|
"medium",
|
|
389
389
|
s
|
|
390
390
|
)
|
|
391
391
|
}) : "", u = g ? L({
|
|
392
392
|
className: p,
|
|
393
393
|
styles: g,
|
|
394
|
-
mediaQuery:
|
|
394
|
+
mediaQuery: J(
|
|
395
395
|
"small",
|
|
396
396
|
s
|
|
397
397
|
)
|
|
@@ -400,10 +400,10 @@ function ct(e) {
|
|
|
400
400
|
};
|
|
401
401
|
return /* @__PURE__ */ l(k, { children: n() && t() ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(O, { styles: n() }) }) : null });
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function ut(e) {
|
|
404
404
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
405
405
|
}
|
|
406
|
-
const
|
|
406
|
+
const mt = (e) => `on${ut(e)}`, ft = (e, t) => (n) => H({
|
|
407
407
|
code: e,
|
|
408
408
|
context: t.context,
|
|
409
409
|
localState: t.localState,
|
|
@@ -412,45 +412,45 @@ const dt = (e) => `on${lt(e)}`, ut = (e, t) => (n) => H({
|
|
|
412
412
|
event: n,
|
|
413
413
|
isExpression: !1
|
|
414
414
|
});
|
|
415
|
-
function
|
|
415
|
+
function no(e) {
|
|
416
416
|
const t = {}, n = e.block.actions ?? {};
|
|
417
417
|
for (const o in n) {
|
|
418
418
|
if (!n.hasOwnProperty(o))
|
|
419
419
|
continue;
|
|
420
420
|
const i = n[o];
|
|
421
|
-
let
|
|
421
|
+
let r = mt(o);
|
|
422
422
|
if (e.stripPrefix)
|
|
423
423
|
switch (I) {
|
|
424
424
|
case "vue":
|
|
425
|
-
|
|
425
|
+
r = r.replace("v-on:", "");
|
|
426
426
|
break;
|
|
427
427
|
case "svelte":
|
|
428
|
-
|
|
428
|
+
r = r.replace("on:", "");
|
|
429
429
|
break;
|
|
430
430
|
}
|
|
431
|
-
t[
|
|
431
|
+
t[r] = ft(i, e);
|
|
432
432
|
}
|
|
433
433
|
return t;
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function ht({
|
|
436
436
|
style: e
|
|
437
437
|
}) {
|
|
438
438
|
return e;
|
|
439
439
|
}
|
|
440
|
-
const
|
|
440
|
+
const pt = ({
|
|
441
441
|
block: e,
|
|
442
442
|
context: t
|
|
443
|
-
}) =>
|
|
443
|
+
}) => he(ht({
|
|
444
444
|
style: e.style || {},
|
|
445
445
|
context: t,
|
|
446
446
|
block: e
|
|
447
447
|
}));
|
|
448
|
-
function
|
|
448
|
+
function he(e) {
|
|
449
449
|
switch (I) {
|
|
450
450
|
case "svelte":
|
|
451
451
|
case "vue":
|
|
452
452
|
case "solid":
|
|
453
|
-
return
|
|
453
|
+
return fe(e).join(" ");
|
|
454
454
|
case "qwik":
|
|
455
455
|
case "reactNative":
|
|
456
456
|
case "react":
|
|
@@ -458,43 +458,43 @@ function fe(e) {
|
|
|
458
458
|
return e;
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function gt({
|
|
462
462
|
properties: e
|
|
463
463
|
}) {
|
|
464
464
|
return e;
|
|
465
465
|
}
|
|
466
|
-
const
|
|
466
|
+
const bt = (e) => ({
|
|
467
467
|
href: e.href
|
|
468
468
|
});
|
|
469
|
-
function
|
|
469
|
+
function yt({
|
|
470
470
|
block: e,
|
|
471
471
|
context: t
|
|
472
472
|
}) {
|
|
473
473
|
var o;
|
|
474
474
|
const n = {
|
|
475
|
-
...
|
|
475
|
+
...bt(e),
|
|
476
476
|
...e.properties,
|
|
477
477
|
"builder-id": e.id,
|
|
478
|
-
style:
|
|
478
|
+
style: pt({
|
|
479
479
|
block: e,
|
|
480
480
|
context: t
|
|
481
481
|
}),
|
|
482
482
|
[M()]: [e.id, "builder-block", e.class, (o = e.properties) == null ? void 0 : o.class].filter(Boolean).join(" ")
|
|
483
483
|
};
|
|
484
|
-
return
|
|
484
|
+
return gt({
|
|
485
485
|
properties: n,
|
|
486
486
|
context: t,
|
|
487
487
|
block: e
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
|
-
const
|
|
490
|
+
const kt = ({
|
|
491
491
|
componentOptions: e,
|
|
492
492
|
builderBlock: t,
|
|
493
493
|
context: n,
|
|
494
494
|
componentRef: o,
|
|
495
495
|
includeBlockProps: i,
|
|
496
|
-
isInteractive:
|
|
497
|
-
contextValue:
|
|
496
|
+
isInteractive: r,
|
|
497
|
+
contextValue: a
|
|
498
498
|
}) => {
|
|
499
499
|
const s = {
|
|
500
500
|
...e,
|
|
@@ -503,13 +503,13 @@ const bt = ({
|
|
|
503
503
|
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
504
504
|
*/
|
|
505
505
|
...i ? {
|
|
506
|
-
attributes:
|
|
506
|
+
attributes: yt({
|
|
507
507
|
block: t,
|
|
508
|
-
context:
|
|
508
|
+
context: a
|
|
509
509
|
})
|
|
510
510
|
} : {}
|
|
511
511
|
};
|
|
512
|
-
return
|
|
512
|
+
return r ? {
|
|
513
513
|
Wrapper: o,
|
|
514
514
|
block: t,
|
|
515
515
|
context: n,
|
|
@@ -517,13 +517,13 @@ const bt = ({
|
|
|
517
517
|
includeBlockProps: i
|
|
518
518
|
} : s;
|
|
519
519
|
};
|
|
520
|
-
function
|
|
520
|
+
function Y(e) {
|
|
521
521
|
var n;
|
|
522
|
-
const t = e.isInteractive ?
|
|
522
|
+
const t = e.isInteractive ? We : e.componentRef;
|
|
523
523
|
return /* @__PURE__ */ l(k, { children: e.componentRef ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(
|
|
524
524
|
t,
|
|
525
525
|
{
|
|
526
|
-
...
|
|
526
|
+
...kt({
|
|
527
527
|
componentOptions: e.componentOptions,
|
|
528
528
|
builderBlock: e.builderBlock,
|
|
529
529
|
context: e.context,
|
|
@@ -546,7 +546,7 @@ function J(e) {
|
|
|
546
546
|
}
|
|
547
547
|
) }) : null });
|
|
548
548
|
}
|
|
549
|
-
function
|
|
549
|
+
function St(e) {
|
|
550
550
|
const t = e.repeatContext;
|
|
551
551
|
return /* @__PURE__ */ l(
|
|
552
552
|
N,
|
|
@@ -561,19 +561,19 @@ function yt(e) {
|
|
|
561
561
|
function N(e) {
|
|
562
562
|
var m, g, p;
|
|
563
563
|
const t = function() {
|
|
564
|
-
return
|
|
564
|
+
return at({
|
|
565
565
|
block: e.block,
|
|
566
566
|
context: e.context,
|
|
567
567
|
registeredComponents: e.registeredComponents
|
|
568
568
|
});
|
|
569
569
|
}, n = function() {
|
|
570
|
-
return
|
|
570
|
+
return st({
|
|
571
571
|
block: e.block,
|
|
572
572
|
context: e.context
|
|
573
573
|
});
|
|
574
574
|
}, o = function() {
|
|
575
575
|
var h;
|
|
576
|
-
return (h = e.block.repeat) != null && h.collection ? e.block :
|
|
576
|
+
return (h = e.block.repeat) != null && h.collection ? e.block : $({
|
|
577
577
|
block: e.block,
|
|
578
578
|
localState: e.context.localState,
|
|
579
579
|
rootState: e.context.rootState,
|
|
@@ -584,27 +584,27 @@ function N(e) {
|
|
|
584
584
|
}, i = function() {
|
|
585
585
|
var u;
|
|
586
586
|
return e.block.tagName === "a" || ((u = o().properties) == null ? void 0 : u.href) || o().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
587
|
-
},
|
|
587
|
+
}, r = function() {
|
|
588
588
|
var d, y;
|
|
589
589
|
if ((d = e.block.repeat) != null && d.collection)
|
|
590
590
|
return !!((y = n()) != null && y.length);
|
|
591
591
|
const h = "hide" in o() ? o().hide : !1;
|
|
592
592
|
return ("show" in o() ? o().show : !0) && !h;
|
|
593
|
-
},
|
|
593
|
+
}, a = function() {
|
|
594
594
|
var u;
|
|
595
595
|
return !((u = t()) != null && u.component) && !n() ? o().children ?? [] : [];
|
|
596
596
|
}, s = function() {
|
|
597
|
-
var h, u, d, y,
|
|
597
|
+
var h, u, d, y, x, b, E, T;
|
|
598
598
|
return {
|
|
599
599
|
blockChildren: o().children ?? [],
|
|
600
600
|
componentRef: (h = t()) == null ? void 0 : h.component,
|
|
601
601
|
componentOptions: {
|
|
602
|
-
...
|
|
602
|
+
...Ge(o()),
|
|
603
603
|
builderContext: e.context,
|
|
604
604
|
...((u = t()) == null ? void 0 : u.name) === "Core:Button" || ((d = t()) == null ? void 0 : d.name) === "Symbol" || ((y = t()) == null ? void 0 : y.name) === "Columns" ? {
|
|
605
605
|
builderLinkComponent: e.linkComponent
|
|
606
606
|
} : {},
|
|
607
|
-
...((
|
|
607
|
+
...((x = t()) == null ? void 0 : x.name) === "Symbol" || ((b = t()) == null ? void 0 : b.name) === "Columns" ? {
|
|
608
608
|
builderComponents: e.registeredComponents
|
|
609
609
|
} : {}
|
|
610
610
|
},
|
|
@@ -616,10 +616,10 @@ function N(e) {
|
|
|
616
616
|
isInteractive: !((T = t()) != null && T.isRSC)
|
|
617
617
|
};
|
|
618
618
|
}, c = e.context;
|
|
619
|
-
return /* @__PURE__ */ l(k, { children:
|
|
620
|
-
/* @__PURE__ */ l(
|
|
619
|
+
return /* @__PURE__ */ l(k, { children: r() ? /* @__PURE__ */ R(k, { children: [
|
|
620
|
+
/* @__PURE__ */ l(dt, { block: e.block, context: e.context }),
|
|
621
621
|
(m = t()) != null && m.noWrap ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(
|
|
622
|
-
|
|
622
|
+
Y,
|
|
623
623
|
{
|
|
624
624
|
componentRef: s().componentRef,
|
|
625
625
|
componentOptions: s().componentOptions,
|
|
@@ -632,7 +632,7 @@ function N(e) {
|
|
|
632
632
|
isInteractive: s().isInteractive
|
|
633
633
|
}
|
|
634
634
|
) }) : /* @__PURE__ */ l(k, { children: n() ? /* @__PURE__ */ l(k, { children: (p = n()) == null ? void 0 : p.map((f, h) => /* @__PURE__ */ l(
|
|
635
|
-
|
|
635
|
+
St,
|
|
636
636
|
{
|
|
637
637
|
repeatContext: f.context,
|
|
638
638
|
block: f.block,
|
|
@@ -641,7 +641,7 @@ function N(e) {
|
|
|
641
641
|
},
|
|
642
642
|
h
|
|
643
643
|
)) }) : /* @__PURE__ */ l(k, { children: /* @__PURE__ */ R(
|
|
644
|
-
|
|
644
|
+
Oe,
|
|
645
645
|
{
|
|
646
646
|
Wrapper: i(),
|
|
647
647
|
block: o(),
|
|
@@ -649,7 +649,7 @@ function N(e) {
|
|
|
649
649
|
linkComponent: e.linkComponent,
|
|
650
650
|
children: [
|
|
651
651
|
/* @__PURE__ */ l(
|
|
652
|
-
|
|
652
|
+
Y,
|
|
653
653
|
{
|
|
654
654
|
componentRef: s().componentRef,
|
|
655
655
|
componentOptions: s().componentOptions,
|
|
@@ -662,7 +662,7 @@ function N(e) {
|
|
|
662
662
|
isInteractive: s().isInteractive
|
|
663
663
|
}
|
|
664
664
|
),
|
|
665
|
-
(g =
|
|
665
|
+
(g = a()) == null ? void 0 : g.map((f) => /* @__PURE__ */ l(
|
|
666
666
|
N,
|
|
667
667
|
{
|
|
668
668
|
block: f,
|
|
@@ -680,7 +680,7 @@ function N(e) {
|
|
|
680
680
|
function F(e) {
|
|
681
681
|
var t, n, o;
|
|
682
682
|
return /* @__PURE__ */ l(
|
|
683
|
-
|
|
683
|
+
Ne,
|
|
684
684
|
{
|
|
685
685
|
blocks: e.blocks,
|
|
686
686
|
parent: e.parent,
|
|
@@ -701,15 +701,15 @@ function F(e) {
|
|
|
701
701
|
}
|
|
702
702
|
);
|
|
703
703
|
}
|
|
704
|
-
function
|
|
704
|
+
function vt(e) {
|
|
705
705
|
var h;
|
|
706
706
|
const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", i = function(d) {
|
|
707
707
|
var y;
|
|
708
708
|
return ((y = n[d]) == null ? void 0 : y.width) || 100 / n.length;
|
|
709
|
-
},
|
|
709
|
+
}, r = function(d) {
|
|
710
710
|
const y = t * (n.length - 1) / n.length;
|
|
711
711
|
return `calc(${i(d)}% - ${y}px)`;
|
|
712
|
-
},
|
|
712
|
+
}, a = function({
|
|
713
713
|
stackedStyle: d,
|
|
714
714
|
desktopStyle: y
|
|
715
715
|
}) {
|
|
@@ -722,42 +722,42 @@ function kt(e) {
|
|
|
722
722
|
}, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", m = function() {
|
|
723
723
|
return {
|
|
724
724
|
"--flex-dir": c,
|
|
725
|
-
"--flex-dir-tablet":
|
|
725
|
+
"--flex-dir-tablet": a({
|
|
726
726
|
stackedStyle: c,
|
|
727
727
|
desktopStyle: "row"
|
|
728
728
|
})
|
|
729
729
|
};
|
|
730
730
|
}, g = function(d) {
|
|
731
|
-
const y = d === 0 ? 0 : t,
|
|
731
|
+
const y = d === 0 ? 0 : t, x = r(d), b = `${y}px`, E = "100%", T = 0;
|
|
732
732
|
return {
|
|
733
733
|
...{
|
|
734
734
|
display: "flex",
|
|
735
735
|
flexDirection: "column",
|
|
736
736
|
alignItems: "stretch"
|
|
737
737
|
},
|
|
738
|
-
width:
|
|
738
|
+
width: x,
|
|
739
739
|
["marginLeft"]: b,
|
|
740
740
|
"--column-width-mobile": s({
|
|
741
741
|
stackedStyle: E,
|
|
742
|
-
desktopStyle:
|
|
742
|
+
desktopStyle: x
|
|
743
743
|
}),
|
|
744
744
|
"--column-margin-left-mobile": s({
|
|
745
745
|
stackedStyle: T,
|
|
746
746
|
desktopStyle: b
|
|
747
747
|
}),
|
|
748
|
-
"--column-width-tablet":
|
|
748
|
+
"--column-width-tablet": a({
|
|
749
749
|
stackedStyle: E,
|
|
750
|
-
desktopStyle:
|
|
750
|
+
desktopStyle: x
|
|
751
751
|
}),
|
|
752
|
-
"--column-margin-left-tablet":
|
|
752
|
+
"--column-margin-left-tablet": a({
|
|
753
753
|
stackedStyle: T,
|
|
754
754
|
desktopStyle: b
|
|
755
755
|
})
|
|
756
756
|
};
|
|
757
757
|
}, p = function(d) {
|
|
758
|
-
var
|
|
759
|
-
return
|
|
760
|
-
((b = (
|
|
758
|
+
var x, b;
|
|
759
|
+
return me(
|
|
760
|
+
((b = (x = e.builderContext.content) == null ? void 0 : x.meta) == null ? void 0 : b.breakpoints) || {}
|
|
761
761
|
)[d].max;
|
|
762
762
|
}, f = function() {
|
|
763
763
|
return `
|
|
@@ -795,7 +795,7 @@ function kt(e) {
|
|
|
795
795
|
children: [
|
|
796
796
|
/* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(O, { styles: f() }) }),
|
|
797
797
|
(h = e.columns) == null ? void 0 : h.map((u, d) => /* @__PURE__ */ l(
|
|
798
|
-
|
|
798
|
+
Fe,
|
|
799
799
|
{
|
|
800
800
|
TagName: u.link ? e.builderLinkComponent || "a" : "div",
|
|
801
801
|
actionAttributes: {},
|
|
@@ -804,7 +804,7 @@ function kt(e) {
|
|
|
804
804
|
href: u.link
|
|
805
805
|
} : {},
|
|
806
806
|
[M()]: "builder-column",
|
|
807
|
-
style:
|
|
807
|
+
style: he(g(d))
|
|
808
808
|
},
|
|
809
809
|
children: /* @__PURE__ */ l(
|
|
810
810
|
F,
|
|
@@ -835,39 +835,39 @@ function kt(e) {
|
|
|
835
835
|
function Q(e) {
|
|
836
836
|
return e.replace(/http(s)?:/, "");
|
|
837
837
|
}
|
|
838
|
-
function
|
|
838
|
+
function xt(e = "", t, n) {
|
|
839
839
|
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), i = e.indexOf("?") !== -1 ? "&" : "?";
|
|
840
840
|
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + i + t + "=" + encodeURIComponent(n);
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function Ct(e, t) {
|
|
843
843
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
844
844
|
return e;
|
|
845
845
|
if (t === "master")
|
|
846
846
|
return Q(e);
|
|
847
847
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
848
848
|
if (n) {
|
|
849
|
-
const o = e.split(n[0]), i = n[3],
|
|
850
|
-
return Q(`${o[0]}_${
|
|
849
|
+
const o = e.split(n[0]), i = n[3], r = t.match("x") ? t : `${t}x`;
|
|
850
|
+
return Q(`${o[0]}_${r}${i}`);
|
|
851
851
|
}
|
|
852
852
|
return null;
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function oo(e) {
|
|
855
855
|
if (!e)
|
|
856
856
|
return e;
|
|
857
857
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
858
858
|
if (e.match(/builder\.io/)) {
|
|
859
859
|
let n = e;
|
|
860
860
|
const o = Number(e.split("?width=")[1]);
|
|
861
|
-
return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${
|
|
861
|
+
return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${xt(e, "width", i)} ${i}w`).concat([n]).join(", ");
|
|
862
862
|
}
|
|
863
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
863
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [Ct(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
864
864
|
}
|
|
865
|
-
const
|
|
865
|
+
const wt = (e) => {
|
|
866
866
|
if (e === "localhost" || e === "127.0.0.1")
|
|
867
867
|
return e;
|
|
868
868
|
const t = e.split(".");
|
|
869
869
|
return t.length > 2 ? t.slice(1).join(".") : e;
|
|
870
|
-
},
|
|
870
|
+
}, pe = ({
|
|
871
871
|
name: e,
|
|
872
872
|
canTrack: t
|
|
873
873
|
}) => {
|
|
@@ -875,17 +875,17 @@ const xt = (e) => {
|
|
|
875
875
|
try {
|
|
876
876
|
return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
|
|
877
877
|
} catch (o) {
|
|
878
|
-
|
|
878
|
+
v.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
879
879
|
return;
|
|
880
880
|
}
|
|
881
|
-
},
|
|
881
|
+
}, ge = async (e) => pe(e), It = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(C).join("; "), Tt = [["secure", ""], ["SameSite", "None"]], Et = ({
|
|
882
882
|
name: e,
|
|
883
883
|
value: t,
|
|
884
884
|
expires: n
|
|
885
885
|
}) => {
|
|
886
|
-
const i = (S() ? location.protocol === "https:" : !0) ?
|
|
887
|
-
return
|
|
888
|
-
},
|
|
886
|
+
const i = (S() ? location.protocol === "https:" : !0) ? Tt : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [[e, t], ...r, ["path", "/"], ["domain", wt(window.location.hostname)], ...i];
|
|
887
|
+
return It(a);
|
|
888
|
+
}, be = async ({
|
|
889
889
|
name: e,
|
|
890
890
|
value: t,
|
|
891
891
|
expires: n,
|
|
@@ -894,54 +894,54 @@ const xt = (e) => {
|
|
|
894
894
|
try {
|
|
895
895
|
if (!o)
|
|
896
896
|
return;
|
|
897
|
-
const i =
|
|
897
|
+
const i = Et({
|
|
898
898
|
name: e,
|
|
899
899
|
value: t,
|
|
900
900
|
expires: n
|
|
901
901
|
});
|
|
902
902
|
document.cookie = i;
|
|
903
903
|
} catch (i) {
|
|
904
|
-
|
|
904
|
+
v.warn("[COOKIE] SET error: ", (i == null ? void 0 : i.message) || i);
|
|
905
905
|
}
|
|
906
|
-
},
|
|
906
|
+
}, Rt = "builder.tests", K = (e) => `${Rt}.${e}`, At = ({
|
|
907
907
|
contentId: e
|
|
908
|
-
}) =>
|
|
908
|
+
}) => ge({
|
|
909
909
|
name: K(e),
|
|
910
910
|
canTrack: !0
|
|
911
|
-
}),
|
|
911
|
+
}), Pt = ({
|
|
912
912
|
contentId: e
|
|
913
|
-
}) =>
|
|
913
|
+
}) => pe({
|
|
914
914
|
name: K(e),
|
|
915
915
|
canTrack: !0
|
|
916
|
-
}),
|
|
916
|
+
}), Bt = ({
|
|
917
917
|
contentId: e,
|
|
918
918
|
value: t
|
|
919
|
-
}) =>
|
|
919
|
+
}) => be({
|
|
920
920
|
name: K(e),
|
|
921
921
|
value: t,
|
|
922
922
|
canTrack: !0
|
|
923
|
-
}),
|
|
923
|
+
}), ye = (e) => C(e.id) && C(e.variations) && Object.keys(e.variations).length > 0, Vt = ({
|
|
924
924
|
id: e,
|
|
925
925
|
variations: t
|
|
926
926
|
}) => {
|
|
927
927
|
var i;
|
|
928
928
|
let n = 0;
|
|
929
929
|
const o = Math.random();
|
|
930
|
-
for (const
|
|
931
|
-
const
|
|
932
|
-
if (n +=
|
|
933
|
-
return
|
|
930
|
+
for (const r in t) {
|
|
931
|
+
const a = (i = t[r]) == null ? void 0 : i.testRatio;
|
|
932
|
+
if (n += a, o < n)
|
|
933
|
+
return r;
|
|
934
934
|
}
|
|
935
935
|
return e;
|
|
936
|
-
},
|
|
937
|
-
const t =
|
|
938
|
-
return
|
|
936
|
+
}, ke = (e) => {
|
|
937
|
+
const t = Vt(e);
|
|
938
|
+
return Bt({
|
|
939
939
|
contentId: e.id,
|
|
940
940
|
value: t
|
|
941
941
|
}).catch((n) => {
|
|
942
|
-
|
|
942
|
+
v.error("could not store A/B test variation: ", n);
|
|
943
943
|
}), t;
|
|
944
|
-
},
|
|
944
|
+
}, Se = ({
|
|
945
945
|
item: e,
|
|
946
946
|
testGroupId: t
|
|
947
947
|
}) => {
|
|
@@ -955,7 +955,7 @@ const xt = (e) => {
|
|
|
955
955
|
testVariationId: n.id,
|
|
956
956
|
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
957
957
|
};
|
|
958
|
-
},
|
|
958
|
+
}, $t = ({
|
|
959
959
|
item: e,
|
|
960
960
|
canTrack: t
|
|
961
961
|
}) => {
|
|
@@ -963,14 +963,14 @@ const xt = (e) => {
|
|
|
963
963
|
return e;
|
|
964
964
|
if (!e)
|
|
965
965
|
return;
|
|
966
|
-
if (!
|
|
966
|
+
if (!ye(e))
|
|
967
967
|
return e;
|
|
968
|
-
const n =
|
|
968
|
+
const n = Pt({
|
|
969
969
|
contentId: e.id
|
|
970
|
-
}) ||
|
|
970
|
+
}) || ke({
|
|
971
971
|
variations: e.variations,
|
|
972
972
|
id: e.id
|
|
973
|
-
}), o =
|
|
973
|
+
}), o = Se({
|
|
974
974
|
item: e,
|
|
975
975
|
testGroupId: n
|
|
976
976
|
});
|
|
@@ -978,18 +978,18 @@ const xt = (e) => {
|
|
|
978
978
|
...e,
|
|
979
979
|
...o
|
|
980
980
|
};
|
|
981
|
-
},
|
|
981
|
+
}, Wt = async ({
|
|
982
982
|
item: e,
|
|
983
983
|
canTrack: t
|
|
984
984
|
}) => {
|
|
985
|
-
if (!t || !
|
|
985
|
+
if (!t || !ye(e))
|
|
986
986
|
return e;
|
|
987
|
-
const o = await
|
|
987
|
+
const o = await At({
|
|
988
988
|
contentId: e.id
|
|
989
|
-
}) ||
|
|
989
|
+
}) || ke({
|
|
990
990
|
variations: e.variations,
|
|
991
991
|
id: e.id
|
|
992
|
-
}), i =
|
|
992
|
+
}), i = Se({
|
|
993
993
|
item: e,
|
|
994
994
|
testGroupId: o
|
|
995
995
|
});
|
|
@@ -997,7 +997,7 @@ const xt = (e) => {
|
|
|
997
997
|
...e,
|
|
998
998
|
...i
|
|
999
999
|
};
|
|
1000
|
-
},
|
|
1000
|
+
}, U = (e) => C(e) ? e : !0, Ot = {
|
|
1001
1001
|
name: "Core:Button",
|
|
1002
1002
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1003
1003
|
defaultStyles: {
|
|
@@ -1030,7 +1030,7 @@ const xt = (e) => {
|
|
|
1030
1030
|
}],
|
|
1031
1031
|
static: !0,
|
|
1032
1032
|
noWrap: !0
|
|
1033
|
-
},
|
|
1033
|
+
}, Nt = {
|
|
1034
1034
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1035
1035
|
name: "Columns",
|
|
1036
1036
|
isRSC: !0,
|
|
@@ -1209,7 +1209,7 @@ const xt = (e) => {
|
|
|
1209
1209
|
});
|
|
1210
1210
|
}
|
|
1211
1211
|
const n = e.get("columns");
|
|
1212
|
-
Array.isArray(n) && n.find((i) => i.get("width")) && (n.find((
|
|
1212
|
+
Array.isArray(n) && n.find((i) => i.get("width")) && (n.find((r) => !r.get("width")) || n.reduce((s, c) => s + c.get("width"), 0) !== 100) && t();
|
|
1213
1213
|
}
|
|
1214
1214
|
}, {
|
|
1215
1215
|
name: "space",
|
|
@@ -1231,7 +1231,7 @@ const xt = (e) => {
|
|
|
1231
1231
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1232
1232
|
advanced: !0
|
|
1233
1233
|
}]
|
|
1234
|
-
},
|
|
1234
|
+
}, Ft = {
|
|
1235
1235
|
name: "Custom Code",
|
|
1236
1236
|
static: !0,
|
|
1237
1237
|
requiredPermissions: ["editCode"],
|
|
@@ -1253,7 +1253,7 @@ const xt = (e) => {
|
|
|
1253
1253
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1254
1254
|
advanced: !0
|
|
1255
1255
|
}]
|
|
1256
|
-
},
|
|
1256
|
+
}, Lt = {
|
|
1257
1257
|
name: "Embed",
|
|
1258
1258
|
static: !0,
|
|
1259
1259
|
inputs: [{
|
|
@@ -1278,13 +1278,13 @@ const xt = (e) => {
|
|
|
1278
1278
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1279
1279
|
hideFromUI: !0
|
|
1280
1280
|
}]
|
|
1281
|
-
},
|
|
1281
|
+
}, Ut = ["text/javascript", "application/javascript", "application/ecmascript"], io = (e) => Ut.includes(e.type), _t = {
|
|
1282
1282
|
name: "Fragment",
|
|
1283
1283
|
static: !0,
|
|
1284
1284
|
hidden: !0,
|
|
1285
1285
|
canHaveChildren: !0,
|
|
1286
1286
|
noWrap: !0
|
|
1287
|
-
},
|
|
1287
|
+
}, Dt = {
|
|
1288
1288
|
name: "Image",
|
|
1289
1289
|
static: !0,
|
|
1290
1290
|
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",
|
|
@@ -1304,7 +1304,7 @@ const xt = (e) => {
|
|
|
1304
1304
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
1305
1305
|
onChange: (e) => {
|
|
1306
1306
|
e.delete("srcset"), e.delete("noWebp");
|
|
1307
|
-
function n(
|
|
1307
|
+
function n(a, s = 6e4) {
|
|
1308
1308
|
return new Promise((c, m) => {
|
|
1309
1309
|
const g = document.createElement("img");
|
|
1310
1310
|
let p = !1;
|
|
@@ -1312,21 +1312,21 @@ const xt = (e) => {
|
|
|
1312
1312
|
p = !0, c(g);
|
|
1313
1313
|
}, g.addEventListener("error", (f) => {
|
|
1314
1314
|
console.warn("Image load failed", f.error), m(f.error);
|
|
1315
|
-
}), g.src =
|
|
1315
|
+
}), g.src = a, setTimeout(() => {
|
|
1316
1316
|
p || m(new Error("Image load timed out"));
|
|
1317
1317
|
}, s);
|
|
1318
1318
|
});
|
|
1319
1319
|
}
|
|
1320
|
-
function o(
|
|
1321
|
-
return Math.round(
|
|
1320
|
+
function o(a) {
|
|
1321
|
+
return Math.round(a * 1e3) / 1e3;
|
|
1322
1322
|
}
|
|
1323
|
-
const i = e.get("image"),
|
|
1324
|
-
if (fetch(i).then((
|
|
1325
|
-
|
|
1326
|
-
}), i && (!
|
|
1327
|
-
return n(i).then((
|
|
1323
|
+
const i = e.get("image"), r = e.get("aspectRatio");
|
|
1324
|
+
if (fetch(i).then((a) => a.blob()).then((a) => {
|
|
1325
|
+
a.type.includes("svg") && e.set("noWebp", !0);
|
|
1326
|
+
}), i && (!r || r === 0.7041))
|
|
1327
|
+
return n(i).then((a) => {
|
|
1328
1328
|
const s = e.get("aspectRatio");
|
|
1329
|
-
e.get("image") === i && (!s || s === 0.7041) &&
|
|
1329
|
+
e.get("image") === i && (!s || s === 0.7041) && a.width && a.height && (e.set("aspectRatio", o(a.height / a.width)), e.set("height", a.height), e.set("width", a.width));
|
|
1330
1330
|
});
|
|
1331
1331
|
}
|
|
1332
1332
|
}, {
|
|
@@ -1384,7 +1384,7 @@ const xt = (e) => {
|
|
|
1384
1384
|
advanced: !0,
|
|
1385
1385
|
defaultValue: 0.7041
|
|
1386
1386
|
}]
|
|
1387
|
-
},
|
|
1387
|
+
}, Mt = {
|
|
1388
1388
|
// friendlyName?
|
|
1389
1389
|
name: "Raw:Img",
|
|
1390
1390
|
hideFromInsertMenu: !0,
|
|
@@ -1398,7 +1398,7 @@ const xt = (e) => {
|
|
|
1398
1398
|
}],
|
|
1399
1399
|
noWrap: !0,
|
|
1400
1400
|
static: !0
|
|
1401
|
-
},
|
|
1401
|
+
}, jt = {
|
|
1402
1402
|
name: "Core:Section",
|
|
1403
1403
|
static: !0,
|
|
1404
1404
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1437,7 +1437,7 @@ const xt = (e) => {
|
|
|
1437
1437
|
}
|
|
1438
1438
|
}
|
|
1439
1439
|
}]
|
|
1440
|
-
},
|
|
1440
|
+
}, Ht = {
|
|
1441
1441
|
name: "Slot",
|
|
1442
1442
|
isRSC: !0,
|
|
1443
1443
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -1451,7 +1451,7 @@ const xt = (e) => {
|
|
|
1451
1451
|
defaultValue: "children"
|
|
1452
1452
|
}]
|
|
1453
1453
|
};
|
|
1454
|
-
function
|
|
1454
|
+
function Kt(e) {
|
|
1455
1455
|
var t, n, o;
|
|
1456
1456
|
return /* @__PURE__ */ l(
|
|
1457
1457
|
"div",
|
|
@@ -1474,7 +1474,7 @@ function jt(e) {
|
|
|
1474
1474
|
}
|
|
1475
1475
|
);
|
|
1476
1476
|
}
|
|
1477
|
-
const
|
|
1477
|
+
const zt = {
|
|
1478
1478
|
name: "Symbol",
|
|
1479
1479
|
noWrap: !0,
|
|
1480
1480
|
static: !0,
|
|
@@ -1507,7 +1507,7 @@ const Ht = {
|
|
|
1507
1507
|
hideFromUI: !0,
|
|
1508
1508
|
type: "boolean"
|
|
1509
1509
|
}]
|
|
1510
|
-
},
|
|
1510
|
+
}, qt = {
|
|
1511
1511
|
name: "Text",
|
|
1512
1512
|
static: !0,
|
|
1513
1513
|
isRSC: !0,
|
|
@@ -1526,7 +1526,7 @@ const Ht = {
|
|
|
1526
1526
|
textAlign: "center"
|
|
1527
1527
|
}
|
|
1528
1528
|
};
|
|
1529
|
-
function
|
|
1529
|
+
function Gt(e) {
|
|
1530
1530
|
var t;
|
|
1531
1531
|
return /* @__PURE__ */ l(
|
|
1532
1532
|
"div",
|
|
@@ -1539,7 +1539,7 @@ function zt(e) {
|
|
|
1539
1539
|
}
|
|
1540
1540
|
);
|
|
1541
1541
|
}
|
|
1542
|
-
const
|
|
1542
|
+
const Jt = {
|
|
1543
1543
|
name: "Video",
|
|
1544
1544
|
canHaveChildren: !0,
|
|
1545
1545
|
defaultStyles: {
|
|
@@ -1621,57 +1621,57 @@ const qt = {
|
|
|
1621
1621
|
advanced: !0
|
|
1622
1622
|
}]
|
|
1623
1623
|
}, X = () => [{
|
|
1624
|
-
component:
|
|
1625
|
-
...Wt
|
|
1626
|
-
}, {
|
|
1627
|
-
component: kt,
|
|
1628
|
-
...$t
|
|
1629
|
-
}, {
|
|
1630
|
-
component: Fe,
|
|
1624
|
+
component: Le,
|
|
1631
1625
|
...Ot
|
|
1632
1626
|
}, {
|
|
1633
|
-
component:
|
|
1627
|
+
component: vt,
|
|
1634
1628
|
...Nt
|
|
1629
|
+
}, {
|
|
1630
|
+
component: Ue,
|
|
1631
|
+
...Ft
|
|
1635
1632
|
}, {
|
|
1636
1633
|
component: _e,
|
|
1637
1634
|
...Lt
|
|
1638
|
-
}, {
|
|
1639
|
-
component: Ue,
|
|
1640
|
-
..._t
|
|
1641
1635
|
}, {
|
|
1642
1636
|
component: De,
|
|
1643
|
-
...
|
|
1637
|
+
..._t
|
|
1644
1638
|
}, {
|
|
1645
1639
|
component: Me,
|
|
1646
1640
|
...Dt
|
|
1647
1641
|
}, {
|
|
1648
|
-
component:
|
|
1649
|
-
...
|
|
1642
|
+
component: je,
|
|
1643
|
+
...Mt
|
|
1650
1644
|
}, {
|
|
1651
|
-
component:
|
|
1652
|
-
...
|
|
1645
|
+
component: He,
|
|
1646
|
+
...jt
|
|
1653
1647
|
}, {
|
|
1654
|
-
component:
|
|
1648
|
+
component: Jn,
|
|
1649
|
+
...zt
|
|
1650
|
+
}, {
|
|
1651
|
+
component: Gt,
|
|
1655
1652
|
...qt
|
|
1656
1653
|
}, {
|
|
1657
|
-
component:
|
|
1658
|
-
...
|
|
1659
|
-
}
|
|
1654
|
+
component: Ke,
|
|
1655
|
+
...Jt
|
|
1656
|
+
}, {
|
|
1657
|
+
component: Kt,
|
|
1658
|
+
...Ht
|
|
1659
|
+
}], Z = [], ro = (e) => ({
|
|
1660
1660
|
type: "builder.registerComponent",
|
|
1661
|
-
data:
|
|
1662
|
-
}),
|
|
1661
|
+
data: _(e)
|
|
1662
|
+
}), Yt = (e) => {
|
|
1663
1663
|
const t = e.toString().trim();
|
|
1664
1664
|
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
1665
|
-
},
|
|
1665
|
+
}, Qt = (e) => typeof e == "function" ? Yt(e) : W(e), _ = ({
|
|
1666
1666
|
inputs: e,
|
|
1667
1667
|
...t
|
|
1668
1668
|
}) => ({
|
|
1669
|
-
|
|
1670
|
-
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i,
|
|
1669
|
+
...W(t),
|
|
1670
|
+
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i, r]) => ({
|
|
1671
1671
|
...o,
|
|
1672
|
-
[i]:
|
|
1672
|
+
[i]: Qt(r)
|
|
1673
1673
|
}), {}))
|
|
1674
|
-
}),
|
|
1674
|
+
}), Xt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
1675
1675
|
function getAndSetVariantId() {
|
|
1676
1676
|
function setCookie(name, value, days) {
|
|
1677
1677
|
let expires = '';
|
|
@@ -1727,7 +1727,7 @@ const qt = {
|
|
|
1727
1727
|
}).join('');
|
|
1728
1728
|
styleEl.innerHTML = newStyleStr;
|
|
1729
1729
|
}
|
|
1730
|
-
}`,
|
|
1730
|
+
}`, Zt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
1731
1731
|
if (!navigator.cookieEnabled) {
|
|
1732
1732
|
return;
|
|
1733
1733
|
}
|
|
@@ -1761,24 +1761,24 @@ const qt = {
|
|
|
1761
1761
|
thisScriptEl?.remove();
|
|
1762
1762
|
}
|
|
1763
1763
|
return;
|
|
1764
|
-
}`,
|
|
1764
|
+
}`, ve = "builderIoAbTest", xe = "builderIoRenderContent", B = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1765
1765
|
...t,
|
|
1766
1766
|
testVariationId: t.id,
|
|
1767
1767
|
id: e == null ? void 0 : e.id
|
|
1768
|
-
})),
|
|
1768
|
+
})), en = ({
|
|
1769
1769
|
canTrack: e,
|
|
1770
1770
|
content: t
|
|
1771
|
-
}) => !(!(
|
|
1772
|
-
window.${
|
|
1773
|
-
window.${
|
|
1774
|
-
`,
|
|
1775
|
-
window.${
|
|
1776
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
1777
|
-
)`,
|
|
1771
|
+
}) => !(!(B(t).length > 0) || !e || S()), tn = (e) => e === "react" || e === "reactNative", Ce = tn(I), nn = () => `
|
|
1772
|
+
window.${ve} = ${Xt}
|
|
1773
|
+
window.${xe} = ${Zt}
|
|
1774
|
+
`, on = (e, t) => `
|
|
1775
|
+
window.${ve}(
|
|
1776
|
+
"${t}",${JSON.stringify(e)}, ${Ce}
|
|
1777
|
+
)`, rn = ({
|
|
1778
1778
|
contentId: e,
|
|
1779
1779
|
variationId: t
|
|
1780
|
-
}) => `window.${
|
|
1781
|
-
"${t}", "${e}", ${
|
|
1780
|
+
}) => `window.${xe}(
|
|
1781
|
+
"${t}", "${e}", ${Ce}
|
|
1782
1782
|
)`;
|
|
1783
1783
|
function D(e) {
|
|
1784
1784
|
return /* @__PURE__ */ l(
|
|
@@ -1789,66 +1789,66 @@ function D(e) {
|
|
|
1789
1789
|
}
|
|
1790
1790
|
);
|
|
1791
1791
|
}
|
|
1792
|
-
const
|
|
1792
|
+
const an = (e) => {
|
|
1793
1793
|
const t = e.get("preview"), n = e.get("overrides." + t);
|
|
1794
|
-
return n ||
|
|
1794
|
+
return n || v.warn("No previewed ID found in search params."), n;
|
|
1795
1795
|
};
|
|
1796
|
-
function
|
|
1797
|
-
globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new
|
|
1796
|
+
function sn() {
|
|
1797
|
+
globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new $e({
|
|
1798
1798
|
max: 500,
|
|
1799
1799
|
// how long to live in ms
|
|
1800
1800
|
ttl: 1e3 * 60 * 5
|
|
1801
1801
|
}));
|
|
1802
1802
|
}
|
|
1803
|
-
function
|
|
1804
|
-
|
|
1805
|
-
const t =
|
|
1803
|
+
function cn(e) {
|
|
1804
|
+
sn();
|
|
1805
|
+
const t = an(e);
|
|
1806
1806
|
return typeof t == "string" ? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t) : void 0;
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1808
|
+
function ln() {
|
|
1809
1809
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
1810
1810
|
}
|
|
1811
|
-
function
|
|
1812
|
-
const e =
|
|
1811
|
+
function dn() {
|
|
1812
|
+
const e = ln().fetch;
|
|
1813
1813
|
if (typeof e > "u")
|
|
1814
1814
|
throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
1815
1815
|
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
|
|
1816
1816
|
return e;
|
|
1817
1817
|
}
|
|
1818
|
-
const
|
|
1819
|
-
function
|
|
1818
|
+
const un = dn();
|
|
1819
|
+
function V(e, t = null, n = ".") {
|
|
1820
1820
|
return Object.keys(e).reduce((o, i) => {
|
|
1821
|
-
const
|
|
1822
|
-
return [typeof
|
|
1821
|
+
const r = e[i], a = [t, i].filter(Boolean).join(n);
|
|
1822
|
+
return [typeof r == "object", r !== null, !(Array.isArray(r) && r.length === 0)].every(Boolean) ? {
|
|
1823
1823
|
...o,
|
|
1824
|
-
...
|
|
1824
|
+
...V(r, a, n)
|
|
1825
1825
|
} : {
|
|
1826
1826
|
...o,
|
|
1827
|
-
[
|
|
1827
|
+
[a]: r
|
|
1828
1828
|
};
|
|
1829
1829
|
}, {});
|
|
1830
1830
|
}
|
|
1831
|
-
const
|
|
1831
|
+
const mn = "v3", ee = "builder.", fn = "options.", hn = (e) => {
|
|
1832
1832
|
const t = {};
|
|
1833
1833
|
return e.forEach((n, o) => {
|
|
1834
1834
|
t[o] = n;
|
|
1835
1835
|
}), t;
|
|
1836
|
-
},
|
|
1836
|
+
}, we = (e) => {
|
|
1837
1837
|
if (!e)
|
|
1838
1838
|
return {};
|
|
1839
|
-
const t =
|
|
1839
|
+
const t = Ie(e), n = {};
|
|
1840
1840
|
return Object.keys(t).forEach((o) => {
|
|
1841
1841
|
if (o.startsWith(ee)) {
|
|
1842
|
-
const i = o.replace(ee, "").replace(
|
|
1842
|
+
const i = o.replace(ee, "").replace(fn, "");
|
|
1843
1843
|
n[i] = t[o];
|
|
1844
1844
|
}
|
|
1845
1845
|
}), n;
|
|
1846
|
-
},
|
|
1846
|
+
}, pn = () => {
|
|
1847
1847
|
if (!S())
|
|
1848
1848
|
return {};
|
|
1849
1849
|
const e = new URLSearchParams(window.location.search);
|
|
1850
|
-
return
|
|
1851
|
-
},
|
|
1850
|
+
return we(e);
|
|
1851
|
+
}, Ie = (e) => e instanceof URLSearchParams ? hn(e) : e, te = (e) => typeof e == "number" && !isNaN(e) && e >= 0, z = (e) => {
|
|
1852
1852
|
let {
|
|
1853
1853
|
noTraverse: t = !1
|
|
1854
1854
|
} = e;
|
|
@@ -1856,101 +1856,97 @@ const dn = "v3", ee = "builder.", un = "options.", mn = (e) => {
|
|
|
1856
1856
|
limit: n = 30,
|
|
1857
1857
|
userAttributes: o,
|
|
1858
1858
|
query: i,
|
|
1859
|
-
model:
|
|
1860
|
-
apiKey:
|
|
1859
|
+
model: r,
|
|
1860
|
+
apiKey: a,
|
|
1861
1861
|
includeRefs: s = !0,
|
|
1862
1862
|
enrich: c,
|
|
1863
1863
|
locale: m,
|
|
1864
|
-
apiVersion: g =
|
|
1864
|
+
apiVersion: g = mn,
|
|
1865
1865
|
fields: p,
|
|
1866
1866
|
omit: f,
|
|
1867
1867
|
offset: h,
|
|
1868
1868
|
cacheSeconds: u,
|
|
1869
1869
|
staleCacheSeconds: d,
|
|
1870
1870
|
sort: y,
|
|
1871
|
-
includeUnpublished:
|
|
1871
|
+
includeUnpublished: x
|
|
1872
1872
|
} = e;
|
|
1873
|
-
if (!
|
|
1873
|
+
if (!a)
|
|
1874
1874
|
throw new Error("Missing API key");
|
|
1875
1875
|
if (!["v2", "v3"].includes(g))
|
|
1876
1876
|
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${g}'`);
|
|
1877
1877
|
(e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
|
|
1878
|
-
const b = new URL(`https://cdn.builder.io/api/${g}/content/${
|
|
1879
|
-
if (b.searchParams.set("omit", f || "meta.componentsUsed"), p && b.searchParams.set("fields", p), Number.isFinite(h) && h > -1 && b.searchParams.set("offset", String(Math.floor(h))), typeof
|
|
1880
|
-
const w =
|
|
1878
|
+
const b = new URL(`https://cdn.builder.io/api/${g}/content/${r}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${s}${m ? `&locale=${m}` : ""}${c ? `&enrich=${c}` : ""}`);
|
|
1879
|
+
if (b.searchParams.set("omit", f || "meta.componentsUsed"), p && b.searchParams.set("fields", p), Number.isFinite(h) && h > -1 && b.searchParams.set("offset", String(Math.floor(h))), typeof x == "boolean" && b.searchParams.set("includeUnpublished", String(x)), u && te(u) && b.searchParams.set("cacheSeconds", String(u)), d && te(d) && b.searchParams.set("staleCacheSeconds", String(d)), y) {
|
|
1880
|
+
const w = V({
|
|
1881
1881
|
sort: y
|
|
1882
1882
|
});
|
|
1883
|
-
for (const
|
|
1884
|
-
b.searchParams.set(
|
|
1883
|
+
for (const A in w)
|
|
1884
|
+
b.searchParams.set(A, JSON.stringify(w[A]));
|
|
1885
1885
|
}
|
|
1886
1886
|
const E = {
|
|
1887
|
-
...
|
|
1888
|
-
...
|
|
1889
|
-
}, T =
|
|
1887
|
+
...pn(),
|
|
1888
|
+
...Ie(e.options || {})
|
|
1889
|
+
}, T = V(E);
|
|
1890
1890
|
for (const w in T)
|
|
1891
1891
|
b.searchParams.set(w, String(T[w]));
|
|
1892
1892
|
if (o && b.searchParams.set("userAttributes", JSON.stringify(o)), i) {
|
|
1893
|
-
const w =
|
|
1893
|
+
const w = V({
|
|
1894
1894
|
query: i
|
|
1895
1895
|
});
|
|
1896
|
-
for (const
|
|
1897
|
-
b.searchParams.set(
|
|
1896
|
+
for (const A in w)
|
|
1897
|
+
b.searchParams.set(A, JSON.stringify(w[A]));
|
|
1898
1898
|
}
|
|
1899
1899
|
return b;
|
|
1900
|
-
},
|
|
1900
|
+
}, gn = (e) => "results" in e;
|
|
1901
1901
|
async function q(e) {
|
|
1902
|
-
const t = await
|
|
1902
|
+
const t = await Te({
|
|
1903
1903
|
...e,
|
|
1904
1904
|
limit: 1
|
|
1905
1905
|
});
|
|
1906
1906
|
return t && t[0] || null;
|
|
1907
1907
|
}
|
|
1908
|
-
const
|
|
1908
|
+
const ao = q, bn = async (e) => {
|
|
1909
1909
|
const t = z(e);
|
|
1910
|
-
return await (await
|
|
1911
|
-
},
|
|
1912
|
-
const o =
|
|
1910
|
+
return await (await un(t.href)).json();
|
|
1911
|
+
}, yn = async (e, t, n = z(e)) => {
|
|
1912
|
+
const o = U(e.canTrack);
|
|
1913
1913
|
if (n.search.includes("preview=")) {
|
|
1914
|
-
const
|
|
1915
|
-
for (const
|
|
1916
|
-
const s =
|
|
1917
|
-
|
|
1914
|
+
const r = [];
|
|
1915
|
+
for (const a of t.results) {
|
|
1916
|
+
const s = cn(n.searchParams);
|
|
1917
|
+
r.push(s || a);
|
|
1918
1918
|
}
|
|
1919
|
-
t.results =
|
|
1919
|
+
t.results = r;
|
|
1920
1920
|
}
|
|
1921
1921
|
if (!o || !(S() || I === "reactNative"))
|
|
1922
1922
|
return t.results;
|
|
1923
1923
|
try {
|
|
1924
|
-
const
|
|
1925
|
-
for (const
|
|
1926
|
-
|
|
1927
|
-
item:
|
|
1924
|
+
const r = [];
|
|
1925
|
+
for (const a of t.results)
|
|
1926
|
+
r.push(await Wt({
|
|
1927
|
+
item: a,
|
|
1928
1928
|
canTrack: o
|
|
1929
1929
|
}));
|
|
1930
|
-
t.results =
|
|
1931
|
-
} catch (
|
|
1932
|
-
|
|
1930
|
+
t.results = r;
|
|
1931
|
+
} catch (r) {
|
|
1932
|
+
v.error("Could not process A/B tests. ", r);
|
|
1933
1933
|
}
|
|
1934
1934
|
return t.results;
|
|
1935
1935
|
};
|
|
1936
|
-
async function
|
|
1936
|
+
async function Te(e) {
|
|
1937
1937
|
try {
|
|
1938
|
-
const t = z(e), n = await
|
|
1939
|
-
return
|
|
1938
|
+
const t = z(e), n = await bn(e);
|
|
1939
|
+
return gn(n) ? yn(e, n) : (v.error("Error fetching data. ", {
|
|
1940
1940
|
url: t,
|
|
1941
1941
|
content: n,
|
|
1942
1942
|
options: e
|
|
1943
1943
|
}), null);
|
|
1944
1944
|
} catch (t) {
|
|
1945
|
-
return
|
|
1945
|
+
return v.error("Error fetching data. ", t), null;
|
|
1946
1946
|
}
|
|
1947
1947
|
}
|
|
1948
|
-
const
|
|
1949
|
-
function
|
|
1950
|
-
const n = new URL(t.origin), o = n.hostname;
|
|
1951
|
-
return (e || bn).findIndex((i) => i.startsWith("*.") ? o.endsWith(i.slice(1)) : i === o) > -1;
|
|
1952
|
-
}
|
|
1953
|
-
function to() {
|
|
1948
|
+
const so = Te;
|
|
1949
|
+
function co() {
|
|
1954
1950
|
return !S() || j() ? !1 : location.search.indexOf("builder.preview=") !== -1;
|
|
1955
1951
|
}
|
|
1956
1952
|
function kn() {
|
|
@@ -1959,16 +1955,16 @@ function kn() {
|
|
|
1959
1955
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
1960
1956
|
});
|
|
1961
1957
|
}
|
|
1962
|
-
function
|
|
1958
|
+
function Ee() {
|
|
1963
1959
|
return kn().replace(/-/g, "");
|
|
1964
1960
|
}
|
|
1965
|
-
const
|
|
1961
|
+
const Re = "builderSessionId", Sn = async ({
|
|
1966
1962
|
canTrack: e
|
|
1967
1963
|
}) => {
|
|
1968
1964
|
if (!e)
|
|
1969
1965
|
return;
|
|
1970
|
-
const t = await
|
|
1971
|
-
name:
|
|
1966
|
+
const t = await ge({
|
|
1967
|
+
name: Re,
|
|
1972
1968
|
canTrack: e
|
|
1973
1969
|
});
|
|
1974
1970
|
if (C(t))
|
|
@@ -1980,20 +1976,20 @@ const Ee = "builderSessionId", Sn = async ({
|
|
|
1980
1976
|
canTrack: e
|
|
1981
1977
|
}), n;
|
|
1982
1978
|
}
|
|
1983
|
-
}, vn = () =>
|
|
1979
|
+
}, vn = () => Ee(), xn = ({
|
|
1984
1980
|
id: e,
|
|
1985
1981
|
canTrack: t
|
|
1986
|
-
}) =>
|
|
1987
|
-
name:
|
|
1982
|
+
}) => be({
|
|
1983
|
+
name: Re,
|
|
1988
1984
|
value: e,
|
|
1989
1985
|
canTrack: t
|
|
1990
|
-
}),
|
|
1986
|
+
}), Ae = () => S() && typeof localStorage < "u" ? localStorage : void 0, Cn = ({
|
|
1991
1987
|
key: e,
|
|
1992
1988
|
canTrack: t
|
|
1993
1989
|
}) => {
|
|
1994
1990
|
var n;
|
|
1995
1991
|
try {
|
|
1996
|
-
return t ? (n =
|
|
1992
|
+
return t ? (n = Ae()) == null ? void 0 : n.getItem(e) : void 0;
|
|
1997
1993
|
} catch (o) {
|
|
1998
1994
|
console.debug("[LocalStorage] GET error: ", o);
|
|
1999
1995
|
return;
|
|
@@ -2005,7 +2001,7 @@ const Ee = "builderSessionId", Sn = async ({
|
|
|
2005
2001
|
}) => {
|
|
2006
2002
|
var o;
|
|
2007
2003
|
try {
|
|
2008
|
-
t && ((o =
|
|
2004
|
+
t && ((o = Ae()) == null || o.setItem(e, n));
|
|
2009
2005
|
} catch (i) {
|
|
2010
2006
|
console.debug("[LocalStorage] SET error: ", i);
|
|
2011
2007
|
}
|
|
@@ -2027,7 +2023,7 @@ const Ee = "builderSessionId", Sn = async ({
|
|
|
2027
2023
|
canTrack: e
|
|
2028
2024
|
}), n;
|
|
2029
2025
|
}
|
|
2030
|
-
}, Tn = () =>
|
|
2026
|
+
}, Tn = () => Ee(), En = ({
|
|
2031
2027
|
id: e,
|
|
2032
2028
|
canTrack: t
|
|
2033
2029
|
}) => wn({
|
|
@@ -2051,7 +2047,7 @@ const Ee = "builderSessionId", Sn = async ({
|
|
|
2051
2047
|
sessionId: t,
|
|
2052
2048
|
visitorId: n
|
|
2053
2049
|
};
|
|
2054
|
-
},
|
|
2050
|
+
}, An = async ({
|
|
2055
2051
|
type: e,
|
|
2056
2052
|
canTrack: t,
|
|
2057
2053
|
apiKey: n,
|
|
@@ -2068,20 +2064,20 @@ const Ee = "builderSessionId", Sn = async ({
|
|
|
2068
2064
|
...await Rn({
|
|
2069
2065
|
canTrack: t
|
|
2070
2066
|
}),
|
|
2071
|
-
userAttributes:
|
|
2067
|
+
userAttributes: le(),
|
|
2072
2068
|
ownerId: n
|
|
2073
2069
|
}
|
|
2074
2070
|
});
|
|
2075
|
-
async function
|
|
2071
|
+
async function Pn(e) {
|
|
2076
2072
|
if (!e.apiKey) {
|
|
2077
|
-
|
|
2073
|
+
v.error("Missing API key for track call. Please provide your API key.");
|
|
2078
2074
|
return;
|
|
2079
2075
|
}
|
|
2080
2076
|
if (e.canTrack && !j() && (S() || I === "reactNative"))
|
|
2081
2077
|
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
2082
2078
|
method: "POST",
|
|
2083
2079
|
body: JSON.stringify({
|
|
2084
|
-
events: [await
|
|
2080
|
+
events: [await An(e)]
|
|
2085
2081
|
}),
|
|
2086
2082
|
headers: {
|
|
2087
2083
|
"content-type": "application/json"
|
|
@@ -2091,14 +2087,14 @@ async function An(e) {
|
|
|
2091
2087
|
console.error("Failed to track: ", t);
|
|
2092
2088
|
});
|
|
2093
2089
|
}
|
|
2094
|
-
const
|
|
2090
|
+
const lo = (e) => Pn({
|
|
2095
2091
|
...e,
|
|
2096
2092
|
canTrack: !0
|
|
2097
2093
|
});
|
|
2098
2094
|
function ne(e) {
|
|
2099
2095
|
return Math.round(e * 1e3) / 1e3;
|
|
2100
2096
|
}
|
|
2101
|
-
const
|
|
2097
|
+
const Bn = (e, t, n = !0) => {
|
|
2102
2098
|
if (!(e instanceof HTMLElement))
|
|
2103
2099
|
return null;
|
|
2104
2100
|
let o = n ? e : e.parentElement;
|
|
@@ -2109,20 +2105,20 @@ const Vn = (e, t, n = !0) => {
|
|
|
2109
2105
|
return o;
|
|
2110
2106
|
} while (o = o.parentElement);
|
|
2111
2107
|
return null;
|
|
2112
|
-
},
|
|
2108
|
+
}, Vn = (e) => Bn(e, (t) => {
|
|
2113
2109
|
const n = t.getAttribute("builder-id") || t.id;
|
|
2114
2110
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
2115
2111
|
}), oe = ({
|
|
2116
2112
|
event: e,
|
|
2117
2113
|
target: t
|
|
2118
2114
|
}) => {
|
|
2119
|
-
const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top,
|
|
2115
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, r = ne(o / n.width), a = ne(i / n.height);
|
|
2120
2116
|
return {
|
|
2121
|
-
x:
|
|
2122
|
-
y:
|
|
2117
|
+
x: r,
|
|
2118
|
+
y: a
|
|
2123
2119
|
};
|
|
2124
|
-
},
|
|
2125
|
-
const t = e.target, n = t &&
|
|
2120
|
+
}, uo = (e) => {
|
|
2121
|
+
const t = e.target, n = t && Vn(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2126
2122
|
return {
|
|
2127
2123
|
targetBuilderElement: o || void 0,
|
|
2128
2124
|
metadata: {
|
|
@@ -2137,8 +2133,13 @@ const Vn = (e, t, n = !0) => {
|
|
|
2137
2133
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2138
2134
|
}
|
|
2139
2135
|
};
|
|
2140
|
-
},
|
|
2141
|
-
function
|
|
2136
|
+
}, $n = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
2137
|
+
function Be(e, t) {
|
|
2138
|
+
const n = new URL(t.origin), o = n.hostname;
|
|
2139
|
+
return (e || $n).findIndex((i) => i.startsWith("*.") ? o.endsWith(i.slice(1)) : i === o) > -1;
|
|
2140
|
+
}
|
|
2141
|
+
const Wn = "0.12.8", ie = {};
|
|
2142
|
+
function On(e, t) {
|
|
2142
2143
|
let n = ie[e];
|
|
2143
2144
|
if (n || (n = ie[e] = []), n.push(t), S()) {
|
|
2144
2145
|
const o = {
|
|
@@ -2155,8 +2156,8 @@ function $n(e, t) {
|
|
|
2155
2156
|
}
|
|
2156
2157
|
}
|
|
2157
2158
|
}
|
|
2158
|
-
const
|
|
2159
|
-
|
|
2159
|
+
const mo = () => {
|
|
2160
|
+
On("insertMenu", {
|
|
2160
2161
|
name: "_default",
|
|
2161
2162
|
default: !0,
|
|
2162
2163
|
items: [{
|
|
@@ -2178,10 +2179,10 @@ const io = () => {
|
|
|
2178
2179
|
}]
|
|
2179
2180
|
});
|
|
2180
2181
|
};
|
|
2181
|
-
let
|
|
2182
|
-
const
|
|
2182
|
+
let re = !1;
|
|
2183
|
+
const Nn = (e = {}) => {
|
|
2183
2184
|
var t, n;
|
|
2184
|
-
|
|
2185
|
+
re || (re = !0, S() && ((t = window.parent) == null || t.postMessage({
|
|
2185
2186
|
type: "builder.sdkInfo",
|
|
2186
2187
|
data: {
|
|
2187
2188
|
target: I,
|
|
@@ -2198,8 +2199,8 @@ const ao = (e = {}) => {
|
|
|
2198
2199
|
options: e
|
|
2199
2200
|
}
|
|
2200
2201
|
}, "*"), window.addEventListener("message", (o) => {
|
|
2201
|
-
var
|
|
2202
|
-
if (!
|
|
2202
|
+
var r, a;
|
|
2203
|
+
if (!Be(e.trustedHosts, o))
|
|
2203
2204
|
return;
|
|
2204
2205
|
const {
|
|
2205
2206
|
data: i
|
|
@@ -2214,7 +2215,7 @@ const ao = (e = {}) => {
|
|
|
2214
2215
|
} catch (h) {
|
|
2215
2216
|
f = h;
|
|
2216
2217
|
}
|
|
2217
|
-
f ? (
|
|
2218
|
+
f ? (r = window.parent) == null || r.postMessage({
|
|
2218
2219
|
type: "builder.evaluateError",
|
|
2219
2220
|
data: {
|
|
2220
2221
|
id: m,
|
|
@@ -2229,7 +2230,7 @@ const ao = (e = {}) => {
|
|
|
2229
2230
|
result: h
|
|
2230
2231
|
}
|
|
2231
2232
|
}, "*");
|
|
2232
|
-
}).catch(console.error) : (
|
|
2233
|
+
}).catch(console.error) : (a = window.parent) == null || a.postMessage({
|
|
2233
2234
|
type: "builder.evaluateResult",
|
|
2234
2235
|
data: {
|
|
2235
2236
|
result: p,
|
|
@@ -2240,9 +2241,96 @@ const ao = (e = {}) => {
|
|
|
2240
2241
|
}
|
|
2241
2242
|
}
|
|
2242
2243
|
})));
|
|
2243
|
-
},
|
|
2244
|
-
|
|
2245
|
-
|
|
2244
|
+
}, Fn = ({
|
|
2245
|
+
model: e,
|
|
2246
|
+
trustedHosts: t,
|
|
2247
|
+
callbacks: n
|
|
2248
|
+
}) => (o) => {
|
|
2249
|
+
if (!Be(t, o))
|
|
2250
|
+
return;
|
|
2251
|
+
const {
|
|
2252
|
+
data: i
|
|
2253
|
+
} = o;
|
|
2254
|
+
if (i)
|
|
2255
|
+
switch (i.type) {
|
|
2256
|
+
case "builder.configureSdk": {
|
|
2257
|
+
n.configureSdk(i.data);
|
|
2258
|
+
break;
|
|
2259
|
+
}
|
|
2260
|
+
case "builder.triggerAnimation": {
|
|
2261
|
+
n.animation(i.data);
|
|
2262
|
+
break;
|
|
2263
|
+
}
|
|
2264
|
+
case "builder.contentUpdate": {
|
|
2265
|
+
const r = i.data, a = r.key || r.alias || r.entry || r.modelName, s = r.data;
|
|
2266
|
+
a === e && n.contentUpdate(s);
|
|
2267
|
+
break;
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
2270
|
+
}, fo = (e, t, n) => {
|
|
2271
|
+
if (!S)
|
|
2272
|
+
return v.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
|
|
2273
|
+
};
|
|
2274
|
+
Nn();
|
|
2275
|
+
const o = Fn({
|
|
2276
|
+
callbacks: {
|
|
2277
|
+
contentUpdate: t,
|
|
2278
|
+
animation: () => {
|
|
2279
|
+
},
|
|
2280
|
+
configureSdk: () => {
|
|
2281
|
+
}
|
|
2282
|
+
},
|
|
2283
|
+
model: e,
|
|
2284
|
+
trustedHosts: n == null ? void 0 : n.trustedHosts
|
|
2285
|
+
});
|
|
2286
|
+
return window.addEventListener("message", o), () => {
|
|
2287
|
+
window.removeEventListener("message", o);
|
|
2288
|
+
};
|
|
2289
|
+
};
|
|
2290
|
+
function ae(e, ...t) {
|
|
2291
|
+
const n = Object(e);
|
|
2292
|
+
for (let o = 1; o < arguments.length; o++) {
|
|
2293
|
+
const i = arguments[o];
|
|
2294
|
+
if (i != null)
|
|
2295
|
+
for (const r in i)
|
|
2296
|
+
Object.prototype.hasOwnProperty.call(i, r) && (n[r] = i[r]);
|
|
2297
|
+
}
|
|
2298
|
+
return n;
|
|
2299
|
+
}
|
|
2300
|
+
const Ln = (e) => e ? e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`) : "";
|
|
2301
|
+
function Un(e) {
|
|
2302
|
+
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
2303
|
+
}
|
|
2304
|
+
function _n(e, t) {
|
|
2305
|
+
const n = Dn(e), o = getComputedStyle(t), i = e.steps[0].styles, r = e.steps[e.steps.length - 1].styles, a = [i, r];
|
|
2306
|
+
for (const s of a)
|
|
2307
|
+
for (const c of n)
|
|
2308
|
+
c in s || (s[c] = o[c]);
|
|
2309
|
+
}
|
|
2310
|
+
function Dn(e) {
|
|
2311
|
+
const t = [];
|
|
2312
|
+
for (const n of e.steps)
|
|
2313
|
+
for (const o in n.styles)
|
|
2314
|
+
t.indexOf(o) === -1 && t.push(o);
|
|
2315
|
+
return t;
|
|
2316
|
+
}
|
|
2317
|
+
function ho(e) {
|
|
2318
|
+
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
2319
|
+
if (!t.length) {
|
|
2320
|
+
Un(e.elementId || e.id || "");
|
|
2321
|
+
return;
|
|
2322
|
+
}
|
|
2323
|
+
Array.from(t).forEach((n) => {
|
|
2324
|
+
_n(e, n), n.style.transition = "none", n.style.transitionDelay = "0", ae(n.style, e.steps[0].styles), setTimeout(() => {
|
|
2325
|
+
n.style.transition = `all ${e.duration}s ${Ln(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), ae(n.style, e.steps[1].styles), setTimeout(() => {
|
|
2326
|
+
n.style.transition = "", n.style.transitionDelay = "";
|
|
2327
|
+
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
2328
|
+
});
|
|
2329
|
+
});
|
|
2330
|
+
}
|
|
2331
|
+
const Mn = (e) => {
|
|
2332
|
+
var r;
|
|
2333
|
+
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);
|
|
2246
2334
|
let i = "";
|
|
2247
2335
|
if (o && t && n && (i += `
|
|
2248
2336
|
@font-face {
|
|
@@ -2252,36 +2340,36 @@ font-display: fallback;
|
|
|
2252
2340
|
font-weight: 400;
|
|
2253
2341
|
}
|
|
2254
2342
|
`.trim()), e.files)
|
|
2255
|
-
for (const
|
|
2256
|
-
if (!(String(Number(
|
|
2343
|
+
for (const a in e.files) {
|
|
2344
|
+
if (!(String(Number(a)) === a))
|
|
2257
2345
|
continue;
|
|
2258
|
-
const c = e.files[
|
|
2346
|
+
const c = e.files[a];
|
|
2259
2347
|
c && c !== o && (i += `
|
|
2260
2348
|
@font-face {
|
|
2261
2349
|
font-family: "${t}";
|
|
2262
2350
|
src: url('${c}') format('woff2');
|
|
2263
2351
|
font-display: fallback;
|
|
2264
|
-
font-weight: ${
|
|
2352
|
+
font-weight: ${a};
|
|
2265
2353
|
}
|
|
2266
2354
|
`.trim());
|
|
2267
2355
|
}
|
|
2268
2356
|
return i;
|
|
2269
|
-
},
|
|
2357
|
+
}, jn = ({
|
|
2270
2358
|
customFonts: e
|
|
2271
2359
|
}) => {
|
|
2272
2360
|
var t;
|
|
2273
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
2274
|
-
},
|
|
2361
|
+
return ((t = e == null ? void 0 : e.map((n) => Mn(n))) == null ? void 0 : t.join(" ")) || "";
|
|
2362
|
+
}, Hn = ({
|
|
2275
2363
|
cssCode: e,
|
|
2276
2364
|
contentId: t
|
|
2277
2365
|
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
|
|
2278
|
-
function
|
|
2366
|
+
function Kn(e) {
|
|
2279
2367
|
const t = `
|
|
2280
|
-
${
|
|
2368
|
+
${Hn({
|
|
2281
2369
|
cssCode: e.cssCode,
|
|
2282
2370
|
contentId: e.contentId
|
|
2283
2371
|
})}
|
|
2284
|
-
${
|
|
2372
|
+
${jn({
|
|
2285
2373
|
customFonts: e.customFonts
|
|
2286
2374
|
})}
|
|
2287
2375
|
|
|
@@ -2304,14 +2392,14 @@ ${Nn({
|
|
|
2304
2392
|
`.trim();
|
|
2305
2393
|
return /* @__PURE__ */ l(O, { styles: t });
|
|
2306
2394
|
}
|
|
2307
|
-
const
|
|
2395
|
+
const zn = ({
|
|
2308
2396
|
content: e,
|
|
2309
2397
|
data: t,
|
|
2310
2398
|
locale: n
|
|
2311
2399
|
}) => {
|
|
2312
|
-
var
|
|
2313
|
-
const o = {}, i = ((
|
|
2314
|
-
return (s = (
|
|
2400
|
+
var r, a, s;
|
|
2401
|
+
const o = {}, i = ((r = e == null ? void 0 : e.data) == null ? void 0 : r.state) || {};
|
|
2402
|
+
return (s = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || s.forEach((c) => {
|
|
2315
2403
|
c.name && c.defaultValue !== void 0 && (o[c.name] = c.defaultValue);
|
|
2316
2404
|
}), {
|
|
2317
2405
|
...o,
|
|
@@ -2321,7 +2409,7 @@ const _n = ({
|
|
|
2321
2409
|
locale: n
|
|
2322
2410
|
} : {}
|
|
2323
2411
|
};
|
|
2324
|
-
},
|
|
2412
|
+
}, qn = ({
|
|
2325
2413
|
content: e,
|
|
2326
2414
|
data: t
|
|
2327
2415
|
}) => e ? {
|
|
@@ -2332,13 +2420,13 @@ const _n = ({
|
|
|
2332
2420
|
},
|
|
2333
2421
|
meta: e == null ? void 0 : e.meta
|
|
2334
2422
|
} : void 0;
|
|
2335
|
-
function
|
|
2336
|
-
var i,
|
|
2337
|
-
const t =
|
|
2423
|
+
function se(e) {
|
|
2424
|
+
var i, r, a, s, c, m, g, p, f;
|
|
2425
|
+
const t = rn({
|
|
2338
2426
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2339
2427
|
variationId: (i = e.content) == null ? void 0 : i.testVariationId,
|
|
2340
2428
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2341
|
-
contentId: (
|
|
2429
|
+
contentId: (r = e.content) == null ? void 0 : r.id
|
|
2342
2430
|
}), n = [
|
|
2343
2431
|
...X(),
|
|
2344
2432
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
@@ -2353,17 +2441,17 @@ function re(e) {
|
|
|
2353
2441
|
...h,
|
|
2354
2442
|
[d.name]: {
|
|
2355
2443
|
component: u,
|
|
2356
|
-
...
|
|
2444
|
+
..._(d)
|
|
2357
2445
|
}
|
|
2358
2446
|
}),
|
|
2359
2447
|
{}
|
|
2360
2448
|
), o = {
|
|
2361
|
-
content:
|
|
2449
|
+
content: qn({
|
|
2362
2450
|
content: e.content,
|
|
2363
2451
|
data: e.data
|
|
2364
2452
|
}),
|
|
2365
2453
|
localState: void 0,
|
|
2366
|
-
rootState:
|
|
2454
|
+
rootState: zn({
|
|
2367
2455
|
content: e.content,
|
|
2368
2456
|
data: e.data,
|
|
2369
2457
|
locale: e.locale
|
|
@@ -2384,7 +2472,7 @@ function re(e) {
|
|
|
2384
2472
|
].reduce(
|
|
2385
2473
|
(h, { component: u, ...d }) => ({
|
|
2386
2474
|
...h,
|
|
2387
|
-
[d.name]:
|
|
2475
|
+
[d.name]: _(d)
|
|
2388
2476
|
}),
|
|
2389
2477
|
{}
|
|
2390
2478
|
),
|
|
@@ -2393,7 +2481,7 @@ function re(e) {
|
|
|
2393
2481
|
BlocksWrapperProps: e.blocksWrapperProps || {}
|
|
2394
2482
|
};
|
|
2395
2483
|
return /* @__PURE__ */ R(
|
|
2396
|
-
|
|
2484
|
+
ze,
|
|
2397
2485
|
{
|
|
2398
2486
|
content: e.content,
|
|
2399
2487
|
data: e.data,
|
|
@@ -2413,9 +2501,9 @@ function re(e) {
|
|
|
2413
2501
|
children: [
|
|
2414
2502
|
e.isSsrAbTest ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(D, { scriptStr: t }) }) : null,
|
|
2415
2503
|
/* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(
|
|
2416
|
-
|
|
2504
|
+
Kn,
|
|
2417
2505
|
{
|
|
2418
|
-
contentId: (
|
|
2506
|
+
contentId: (a = o.content) == null ? void 0 : a.id,
|
|
2419
2507
|
cssCode: (c = (s = o.content) == null ? void 0 : s.data) == null ? void 0 : c.cssCode,
|
|
2420
2508
|
customFonts: (g = (m = o.content) == null ? void 0 : m.data) == null ? void 0 : g.customFonts
|
|
2421
2509
|
}
|
|
@@ -2433,45 +2521,45 @@ function re(e) {
|
|
|
2433
2521
|
}
|
|
2434
2522
|
);
|
|
2435
2523
|
}
|
|
2436
|
-
function
|
|
2437
|
-
var
|
|
2438
|
-
const t =
|
|
2439
|
-
canTrack:
|
|
2524
|
+
function Ve(e) {
|
|
2525
|
+
var r, a;
|
|
2526
|
+
const t = en({
|
|
2527
|
+
canTrack: U(e.canTrack),
|
|
2440
2528
|
content: e.content
|
|
2441
2529
|
}), n = function() {
|
|
2442
2530
|
var c;
|
|
2443
|
-
return
|
|
2444
|
-
|
|
2531
|
+
return on(
|
|
2532
|
+
B(e.content).map((m) => ({
|
|
2445
2533
|
id: m.testVariationId,
|
|
2446
2534
|
testRatio: m.testRatio
|
|
2447
2535
|
})),
|
|
2448
2536
|
((c = e.content) == null ? void 0 : c.id) || ""
|
|
2449
2537
|
);
|
|
2450
2538
|
}, o = function() {
|
|
2451
|
-
return
|
|
2539
|
+
return B(e.content).map((c) => `.variant-${c.testVariationId} { display: none; } `).join("");
|
|
2452
2540
|
}, i = function() {
|
|
2453
2541
|
var c;
|
|
2454
2542
|
return t ? {
|
|
2455
2543
|
...e.content,
|
|
2456
2544
|
testVariationId: (c = e.content) == null ? void 0 : c.id
|
|
2457
|
-
} :
|
|
2545
|
+
} : $t({
|
|
2458
2546
|
item: e.content,
|
|
2459
|
-
canTrack:
|
|
2547
|
+
canTrack: U(e.canTrack)
|
|
2460
2548
|
});
|
|
2461
2549
|
};
|
|
2462
2550
|
return /* @__PURE__ */ R(k, { children: [
|
|
2463
|
-
!e.__isNestedRender && I !== "reactNative" ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(D, { scriptStr:
|
|
2551
|
+
!e.__isNestedRender && I !== "reactNative" ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(D, { scriptStr: nn() }) }) : null,
|
|
2464
2552
|
t ? /* @__PURE__ */ R(k, { children: [
|
|
2465
2553
|
/* @__PURE__ */ l(
|
|
2466
2554
|
O,
|
|
2467
2555
|
{
|
|
2468
|
-
id: `variants-styles-${(
|
|
2556
|
+
id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
|
|
2469
2557
|
styles: o()
|
|
2470
2558
|
}
|
|
2471
2559
|
),
|
|
2472
2560
|
/* @__PURE__ */ l(D, { scriptStr: n() }),
|
|
2473
|
-
(
|
|
2474
|
-
|
|
2561
|
+
(a = B(e.content)) == null ? void 0 : a.map((s) => /* @__PURE__ */ l(
|
|
2562
|
+
se,
|
|
2475
2563
|
{
|
|
2476
2564
|
content: s,
|
|
2477
2565
|
showContent: !1,
|
|
@@ -2497,7 +2585,7 @@ function Ae(e) {
|
|
|
2497
2585
|
))
|
|
2498
2586
|
] }) : null,
|
|
2499
2587
|
/* @__PURE__ */ l(
|
|
2500
|
-
|
|
2588
|
+
se,
|
|
2501
2589
|
{
|
|
2502
2590
|
content: i(),
|
|
2503
2591
|
showContent: !0,
|
|
@@ -2522,7 +2610,7 @@ function Ae(e) {
|
|
|
2522
2610
|
)
|
|
2523
2611
|
] });
|
|
2524
2612
|
}
|
|
2525
|
-
const
|
|
2613
|
+
const Gn = async ({
|
|
2526
2614
|
builderContextValue: e,
|
|
2527
2615
|
symbol: t
|
|
2528
2616
|
}) => {
|
|
@@ -2538,11 +2626,11 @@ const Dn = async ({
|
|
|
2538
2626
|
}
|
|
2539
2627
|
}
|
|
2540
2628
|
}).catch((n) => {
|
|
2541
|
-
|
|
2629
|
+
v.error("Could not fetch symbol content: ", n);
|
|
2542
2630
|
});
|
|
2543
2631
|
};
|
|
2544
|
-
async function
|
|
2545
|
-
var o, i,
|
|
2632
|
+
async function Jn(e) {
|
|
2633
|
+
var o, i, r, a, s;
|
|
2546
2634
|
const t = function() {
|
|
2547
2635
|
var m, g;
|
|
2548
2636
|
return [
|
|
@@ -2551,12 +2639,12 @@ async function Mn(e) {
|
|
|
2551
2639
|
(m = e.symbol) != null && m.inline ? "builder-inline-symbol" : void 0,
|
|
2552
2640
|
(g = e.symbol) != null && g.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
2553
2641
|
].filter(Boolean).join(" ");
|
|
2554
|
-
}, n = ((o = e.symbol) == null ? void 0 : o.content) || await
|
|
2642
|
+
}, n = ((o = e.symbol) == null ? void 0 : o.content) || await Gn({
|
|
2555
2643
|
symbol: e.symbol,
|
|
2556
2644
|
builderContextValue: e.builderContext
|
|
2557
2645
|
});
|
|
2558
2646
|
return /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
|
|
2559
|
-
|
|
2647
|
+
Ve,
|
|
2560
2648
|
{
|
|
2561
2649
|
__isNestedRender: !0,
|
|
2562
2650
|
apiVersion: e.builderContext.apiVersion,
|
|
@@ -2567,9 +2655,9 @@ async function Mn(e) {
|
|
|
2567
2655
|
},
|
|
2568
2656
|
customComponents: Object.values(e.builderComponents),
|
|
2569
2657
|
data: {
|
|
2570
|
-
...(
|
|
2658
|
+
...(r = e.symbol) == null ? void 0 : r.data,
|
|
2571
2659
|
...e.builderContext.localState,
|
|
2572
|
-
...(
|
|
2660
|
+
...(a = n == null ? void 0 : n.data) == null ? void 0 : a.state
|
|
2573
2661
|
},
|
|
2574
2662
|
model: (s = e.symbol) == null ? void 0 : s.model,
|
|
2575
2663
|
content: n,
|
|
@@ -2577,19 +2665,19 @@ async function Mn(e) {
|
|
|
2577
2665
|
}
|
|
2578
2666
|
) });
|
|
2579
2667
|
}
|
|
2580
|
-
const
|
|
2581
|
-
function
|
|
2668
|
+
const po = F, go = Ve, ce = {};
|
|
2669
|
+
function bo(e) {
|
|
2582
2670
|
if (S()) {
|
|
2583
|
-
Object.assign(
|
|
2671
|
+
Object.assign(ce, e);
|
|
2584
2672
|
const t = {
|
|
2585
2673
|
type: "builder.settingsChange",
|
|
2586
|
-
data:
|
|
2674
|
+
data: ce
|
|
2587
2675
|
};
|
|
2588
2676
|
parent.postMessage(t, "*");
|
|
2589
2677
|
}
|
|
2590
2678
|
}
|
|
2591
|
-
const
|
|
2592
|
-
var o, i,
|
|
2679
|
+
const yo = async (e) => {
|
|
2680
|
+
var o, i, r;
|
|
2593
2681
|
const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((i = e.userAttributes) == null ? void 0 : i.urlPath), n = {
|
|
2594
2682
|
...e,
|
|
2595
2683
|
apiKey: e.apiKey,
|
|
@@ -2600,7 +2688,7 @@ const lo = async (e) => {
|
|
|
2600
2688
|
urlPath: t
|
|
2601
2689
|
} : {}
|
|
2602
2690
|
},
|
|
2603
|
-
options:
|
|
2691
|
+
options: we(e.searchParams || ((r = e.url) == null ? void 0 : r.searchParams) || e.options)
|
|
2604
2692
|
};
|
|
2605
2693
|
return {
|
|
2606
2694
|
apiKey: n.apiKey,
|
|
@@ -2609,42 +2697,44 @@ const lo = async (e) => {
|
|
|
2609
2697
|
};
|
|
2610
2698
|
};
|
|
2611
2699
|
export {
|
|
2612
|
-
|
|
2700
|
+
we as A,
|
|
2613
2701
|
F as B,
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2702
|
+
Ve as C,
|
|
2703
|
+
lo as D,
|
|
2704
|
+
fo as E,
|
|
2705
|
+
yo as F,
|
|
2706
|
+
yn as G,
|
|
2707
|
+
Te as H,
|
|
2708
|
+
so as I,
|
|
2709
|
+
ao as J,
|
|
2710
|
+
po as R,
|
|
2711
|
+
Jn as S,
|
|
2712
|
+
Gt as T,
|
|
2713
|
+
Pn as _,
|
|
2714
|
+
yt as a,
|
|
2715
|
+
no as b,
|
|
2626
2716
|
j as c,
|
|
2627
|
-
|
|
2628
|
-
|
|
2717
|
+
oo as d,
|
|
2718
|
+
io as e,
|
|
2629
2719
|
S as f,
|
|
2630
2720
|
M as g,
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2721
|
+
U as h,
|
|
2722
|
+
to as i,
|
|
2723
|
+
co as j,
|
|
2724
|
+
Fn as k,
|
|
2725
|
+
v as l,
|
|
2636
2726
|
H as m,
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2727
|
+
uo as n,
|
|
2728
|
+
W as o,
|
|
2729
|
+
ro as p,
|
|
2640
2730
|
q,
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2731
|
+
mo as r,
|
|
2732
|
+
Nn as s,
|
|
2733
|
+
ho as t,
|
|
2734
|
+
un as u,
|
|
2735
|
+
sn as v,
|
|
2736
|
+
go as w,
|
|
2737
|
+
vt as x,
|
|
2738
|
+
On as y,
|
|
2739
|
+
bo as z
|
|
2650
2740
|
};
|