@builder.io/sdk-react 0.12.3 → 0.12.5
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/index.cjs +25 -29
- package/lib/browser/index.mjs +736 -669
- package/lib/{edge/server-entry-f978b3a5.js → browser/server-entry-b9bdd327.js} +5 -6
- package/lib/browser/{server-entry-df9eba5d.cjs → server-entry-fc715776.cjs} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/index.cjs +38 -42
- package/lib/edge/index.mjs +1280 -1212
- package/lib/{browser/server-entry-f978b3a5.js → edge/server-entry-57d4ae22.js} +4 -5
- package/lib/{node/server-entry-df9eba5d.cjs → edge/server-entry-fc715776.cjs} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/node/index.cjs +7 -11
- package/lib/node/index.mjs +321 -253
- package/lib/node/{server-entry-46908b1b.js → server-entry-0457c4c8.js} +3 -4
- package/lib/{edge/server-entry-df9eba5d.cjs → node/server-entry-bcb725be.cjs} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +1 -1
- package/types/blocks/button/button.types.d.ts +2 -1
- package/types/blocks/columns/columns.types.d.ts +3 -3
- package/types/blocks/symbol/symbol.types.d.ts +2 -2
- package/types/components/block/block.d.ts +1 -0
- package/types/components/block/components/block-wrapper.d.ts +1 -0
- package/types/components/block/components/component-ref/component-ref.helpers.d.ts +4 -1
- package/types/components/block/components/repeated-block.d.ts +3 -5
- package/types/components/blocks/blocks.types.d.ts +1 -0
- package/types/components/content-variants/content-variants.types.d.ts +6 -2
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/functions/evaluate/should-force-browser-runtime-in-node.d.ts +1 -0
- package/types/functions/get-block-properties.d.ts +5 -1
- package/types/functions/get-class-prop-name.d.ts +1 -0
- package/types/functions/get-style.d.ts +12 -0
- package/types/functions/transform-block-properties.d.ts +7 -5
- package/types/functions/transform-style-property.d.ts +7 -0
- package/types/helpers/omit.d.ts +1 -0
- package/types/types/builder-block.d.ts +1 -0
- package/types/types/builder-props.d.ts +3 -0
package/lib/browser/index.mjs
CHANGED
|
@@ -1,30 +1,47 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { i as
|
|
5
|
-
import { _ as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
2
|
+
import { jsx as l, Fragment as h, jsxs as A } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as pe, useState as v, useContext as se, useRef as ee, useEffect as E, createElement as Fe } from "react";
|
|
4
|
+
import { T as $, i as N, j as V, k as Le, l as M, m as _, n as te, r as _e, o as H, p as de, a as Oe, c as je, b as Ce, q as De, u as ue, v as me, w as Ue } from "./server-entry-b9bdd327.js";
|
|
5
|
+
import { _ as pn, h as Cn, f as wn, g as In, e as Tn, d as Rn, s as En, t as Pn } from "./server-entry-b9bdd327.js";
|
|
6
|
+
const Me = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), He = (e) => typeof e == "string" && Me.has(e.toLowerCase());
|
|
7
|
+
function ne(e) {
|
|
8
|
+
return /* @__PURE__ */ l(h, { children: He(e.TagName) ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ l(h, { children: typeof e.TagName == "string" ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) : /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) }) });
|
|
9
|
+
}
|
|
10
|
+
const O = () => {
|
|
11
|
+
switch ($) {
|
|
12
|
+
case "react":
|
|
13
|
+
case "reactNative":
|
|
14
|
+
case "rsc":
|
|
15
|
+
return "className";
|
|
16
|
+
case "svelte":
|
|
17
|
+
case "vue":
|
|
18
|
+
case "solid":
|
|
19
|
+
case "qwik":
|
|
20
|
+
return "class";
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
function Ke(e) {
|
|
24
|
+
return /* @__PURE__ */ l(
|
|
25
|
+
ne,
|
|
18
26
|
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
27
|
+
TagName: e.link ? e.builderLinkComponent || "a" : "button",
|
|
28
|
+
attributes: {
|
|
29
|
+
...e.attributes,
|
|
30
|
+
[O()]: `${e.link ? "" : "builder-button"} ${e.attributes[O()] || ""}`,
|
|
31
|
+
...e.link ? {
|
|
32
|
+
href: e.link,
|
|
33
|
+
target: e.openLinkInNewTab ? "_blank" : void 0,
|
|
34
|
+
role: "link"
|
|
35
|
+
} : {
|
|
36
|
+
role: "button"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
actionAttributes: {},
|
|
23
40
|
children: e.text
|
|
24
41
|
}
|
|
25
|
-
)
|
|
42
|
+
);
|
|
26
43
|
}
|
|
27
|
-
const
|
|
44
|
+
const ie = pe({
|
|
28
45
|
content: null,
|
|
29
46
|
context: {},
|
|
30
47
|
localState: void 0,
|
|
@@ -37,8 +54,8 @@ const ee = ve({
|
|
|
37
54
|
inheritedStyles: {},
|
|
38
55
|
BlocksWrapper: "div",
|
|
39
56
|
BlocksWrapperProps: {}
|
|
40
|
-
}),
|
|
41
|
-
function
|
|
57
|
+
}), we = pe({ registeredComponents: {} });
|
|
58
|
+
function ze(e) {
|
|
42
59
|
var t;
|
|
43
60
|
return {
|
|
44
61
|
...(t = e.component) == null ? void 0 : t.options,
|
|
@@ -49,7 +66,7 @@ function Ue(e) {
|
|
|
49
66
|
builderBlock: e
|
|
50
67
|
};
|
|
51
68
|
}
|
|
52
|
-
const
|
|
69
|
+
const qe = ({
|
|
53
70
|
builder: e,
|
|
54
71
|
context: t,
|
|
55
72
|
event: n,
|
|
@@ -61,152 +78,162 @@ const De = ({
|
|
|
61
78
|
builder: e,
|
|
62
79
|
context: t,
|
|
63
80
|
event: n
|
|
64
|
-
}),
|
|
65
|
-
isEditing:
|
|
66
|
-
isBrowser:
|
|
67
|
-
isServer:
|
|
68
|
-
getUserAttributes: () =>
|
|
69
|
-
}),
|
|
81
|
+
}), Ye = () => ({
|
|
82
|
+
isEditing: N(),
|
|
83
|
+
isBrowser: V(),
|
|
84
|
+
isServer: !V(),
|
|
85
|
+
getUserAttributes: () => Le()
|
|
86
|
+
}), Qe = (e, {
|
|
70
87
|
isExpression: t = !0
|
|
71
|
-
}) => /* 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,
|
|
88
|
+
}) => /* 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, fe = ({
|
|
72
89
|
code: e,
|
|
73
90
|
builder: t,
|
|
74
91
|
context: n,
|
|
75
92
|
event: i,
|
|
76
|
-
localState:
|
|
77
|
-
rootSetState:
|
|
78
|
-
rootState:
|
|
93
|
+
localState: o,
|
|
94
|
+
rootSetState: r,
|
|
95
|
+
rootState: a
|
|
79
96
|
}) => {
|
|
80
|
-
const c =
|
|
97
|
+
const c = qe({
|
|
81
98
|
builder: t,
|
|
82
99
|
context: n,
|
|
83
100
|
event: i,
|
|
84
|
-
state:
|
|
101
|
+
state: Ge(a, o, r)
|
|
85
102
|
});
|
|
86
103
|
return new Function(...c.map(([s]) => s), e)(...c.map(([, s]) => s));
|
|
87
104
|
};
|
|
88
|
-
function
|
|
105
|
+
function Ge(e, t, n) {
|
|
89
106
|
if (e === t)
|
|
90
107
|
throw new Error("rootState === localState");
|
|
91
108
|
return new Proxy(e, {
|
|
92
|
-
get: (i,
|
|
93
|
-
set: (i,
|
|
94
|
-
if (t &&
|
|
109
|
+
get: (i, o) => t && o in t ? t[o] : e[o],
|
|
110
|
+
set: (i, o, r) => {
|
|
111
|
+
if (t && o in t)
|
|
95
112
|
throw new Error("Writing to local state is not allowed as it is read-only.");
|
|
96
|
-
return e[
|
|
113
|
+
return e[o] = r, n == null || n(e), !0;
|
|
97
114
|
}
|
|
98
115
|
});
|
|
99
116
|
}
|
|
100
|
-
|
|
101
|
-
|
|
117
|
+
function Je() {
|
|
118
|
+
var e;
|
|
119
|
+
return typeof process != "undefined" && M((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
120
|
+
}
|
|
121
|
+
const Xe = () => {
|
|
122
|
+
var i;
|
|
123
|
+
if (!Je())
|
|
124
|
+
return !1;
|
|
125
|
+
const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (i = process.env.NODE_OPTIONS) == null ? void 0 : i.includes("--no-node-snapshot");
|
|
126
|
+
return e && t && !n ? (_.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;
|
|
127
|
+
}, Ze = (e) => (V() || Xe(), fe(e));
|
|
128
|
+
function j({
|
|
102
129
|
code: e,
|
|
103
130
|
context: t,
|
|
104
131
|
localState: n,
|
|
105
132
|
rootState: i,
|
|
106
|
-
rootSetState:
|
|
107
|
-
event:
|
|
108
|
-
isExpression:
|
|
133
|
+
rootSetState: o,
|
|
134
|
+
event: r,
|
|
135
|
+
isExpression: a = !0
|
|
109
136
|
}) {
|
|
110
137
|
if (e === "") {
|
|
111
|
-
|
|
138
|
+
_.warn("Skipping evaluation of empty code block.");
|
|
112
139
|
return;
|
|
113
140
|
}
|
|
114
141
|
const c = {
|
|
115
|
-
code:
|
|
116
|
-
isExpression:
|
|
142
|
+
code: Qe(e, {
|
|
143
|
+
isExpression: a
|
|
117
144
|
}),
|
|
118
|
-
builder:
|
|
145
|
+
builder: Ye(),
|
|
119
146
|
context: t,
|
|
120
|
-
event:
|
|
121
|
-
rootSetState:
|
|
147
|
+
event: r,
|
|
148
|
+
rootSetState: o,
|
|
122
149
|
rootState: i,
|
|
123
150
|
localState: n
|
|
124
151
|
};
|
|
125
152
|
try {
|
|
126
|
-
return
|
|
153
|
+
return Ze(c);
|
|
127
154
|
} catch (s) {
|
|
128
|
-
|
|
155
|
+
_.error("Failed code evaluation: " + s.message, {
|
|
129
156
|
code: e
|
|
130
157
|
});
|
|
131
158
|
return;
|
|
132
159
|
}
|
|
133
160
|
}
|
|
134
|
-
const
|
|
161
|
+
const et = (e, t, n) => {
|
|
135
162
|
if (Object(e) !== e)
|
|
136
163
|
return e;
|
|
137
164
|
const i = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
138
|
-
return i.slice(0, -1).reduce((
|
|
165
|
+
return i.slice(0, -1).reduce((o, r, a) => Object(o[r]) === o[r] ? o[r] : o[r] = Math.abs(Number(i[a + 1])) >> 0 === +i[a + 1] ? [] : {}, e)[i[i.length - 1]] = n, e;
|
|
139
166
|
};
|
|
140
|
-
const
|
|
167
|
+
const tt = ({
|
|
141
168
|
block: e,
|
|
142
169
|
context: t,
|
|
143
170
|
localState: n,
|
|
144
171
|
rootState: i,
|
|
145
|
-
rootSetState:
|
|
172
|
+
rootSetState: o
|
|
146
173
|
}) => {
|
|
147
174
|
if (!e.bindings)
|
|
148
175
|
return e;
|
|
149
|
-
const
|
|
150
|
-
...
|
|
176
|
+
const r = te(e), a = {
|
|
177
|
+
...r,
|
|
151
178
|
properties: {
|
|
152
|
-
...
|
|
179
|
+
...r.properties
|
|
153
180
|
},
|
|
154
181
|
actions: {
|
|
155
|
-
...
|
|
182
|
+
...r.actions
|
|
156
183
|
}
|
|
157
184
|
};
|
|
158
185
|
for (const c in e.bindings) {
|
|
159
|
-
const s = e.bindings[c], d =
|
|
186
|
+
const s = e.bindings[c], d = j({
|
|
160
187
|
code: s,
|
|
161
188
|
localState: n,
|
|
162
189
|
rootState: i,
|
|
163
|
-
rootSetState:
|
|
190
|
+
rootSetState: o,
|
|
164
191
|
context: t
|
|
165
192
|
});
|
|
166
|
-
|
|
193
|
+
et(a, c, d);
|
|
167
194
|
}
|
|
168
|
-
return
|
|
195
|
+
return a;
|
|
169
196
|
};
|
|
170
|
-
function
|
|
197
|
+
function K({
|
|
171
198
|
block: e,
|
|
172
199
|
context: t,
|
|
173
200
|
shouldEvaluateBindings: n,
|
|
174
201
|
localState: i,
|
|
175
|
-
rootState:
|
|
176
|
-
rootSetState:
|
|
202
|
+
rootState: o,
|
|
203
|
+
rootSetState: r
|
|
177
204
|
}) {
|
|
178
|
-
const
|
|
179
|
-
return n ?
|
|
180
|
-
block:
|
|
205
|
+
const a = e;
|
|
206
|
+
return n ? tt({
|
|
207
|
+
block: a,
|
|
181
208
|
localState: i,
|
|
182
|
-
rootState:
|
|
183
|
-
rootSetState:
|
|
209
|
+
rootState: o,
|
|
210
|
+
rootSetState: r,
|
|
184
211
|
context: t
|
|
185
|
-
}) :
|
|
212
|
+
}) : a;
|
|
186
213
|
}
|
|
187
|
-
const
|
|
214
|
+
const nt = ({
|
|
188
215
|
block: e,
|
|
189
216
|
context: t,
|
|
190
217
|
registeredComponents: n
|
|
191
218
|
}) => {
|
|
192
|
-
var
|
|
193
|
-
const i = (
|
|
219
|
+
var r;
|
|
220
|
+
const i = (r = K({
|
|
194
221
|
block: e,
|
|
195
222
|
localState: t.localState,
|
|
196
223
|
rootState: t.rootState,
|
|
197
224
|
rootSetState: t.rootSetState,
|
|
198
225
|
context: t.context,
|
|
199
226
|
shouldEvaluateBindings: !1
|
|
200
|
-
}).component) == null ? void 0 :
|
|
227
|
+
}).component) == null ? void 0 : r.name;
|
|
201
228
|
if (!i)
|
|
202
229
|
return null;
|
|
203
|
-
const
|
|
204
|
-
if (
|
|
205
|
-
return
|
|
230
|
+
const o = n[i];
|
|
231
|
+
if (o)
|
|
232
|
+
return o;
|
|
206
233
|
console.warn(`
|
|
207
234
|
Could not find a registered component named "${i}".
|
|
208
235
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
209
|
-
},
|
|
236
|
+
}, it = ({
|
|
210
237
|
block: e,
|
|
211
238
|
context: t
|
|
212
239
|
}) => {
|
|
@@ -216,30 +243,30 @@ const Qe = ({
|
|
|
216
243
|
} = e;
|
|
217
244
|
if (!(n != null && n.collection))
|
|
218
245
|
return;
|
|
219
|
-
const
|
|
246
|
+
const o = j({
|
|
220
247
|
code: n.collection,
|
|
221
248
|
localState: t.localState,
|
|
222
249
|
rootState: t.rootState,
|
|
223
250
|
rootSetState: t.rootSetState,
|
|
224
251
|
context: t.context
|
|
225
252
|
});
|
|
226
|
-
if (!Array.isArray(
|
|
253
|
+
if (!Array.isArray(o))
|
|
227
254
|
return;
|
|
228
|
-
const
|
|
229
|
-
return
|
|
255
|
+
const r = n.collection.split(".").pop(), a = n.itemName || (r ? r + "Item" : "item");
|
|
256
|
+
return o.map((s, d) => ({
|
|
230
257
|
context: {
|
|
231
258
|
...t,
|
|
232
259
|
localState: {
|
|
233
260
|
...t.localState,
|
|
234
261
|
$index: d,
|
|
235
262
|
$item: s,
|
|
236
|
-
[
|
|
237
|
-
[`$${
|
|
263
|
+
[a]: s,
|
|
264
|
+
[`$${a}Index`]: d
|
|
238
265
|
}
|
|
239
266
|
},
|
|
240
267
|
block: i
|
|
241
268
|
}));
|
|
242
|
-
},
|
|
269
|
+
}, Ie = {
|
|
243
270
|
small: {
|
|
244
271
|
min: 320,
|
|
245
272
|
default: 321,
|
|
@@ -255,11 +282,11 @@ const Qe = ({
|
|
|
255
282
|
default: 991,
|
|
256
283
|
max: 1200
|
|
257
284
|
}
|
|
258
|
-
},
|
|
285
|
+
}, he = (e, t = Ie) => `@media (max-width: ${t[e].max}px)`, Te = ({
|
|
259
286
|
small: e,
|
|
260
287
|
medium: t
|
|
261
288
|
}) => {
|
|
262
|
-
const n =
|
|
289
|
+
const n = te(Ie);
|
|
263
290
|
if (!e || !t)
|
|
264
291
|
return n;
|
|
265
292
|
const i = Math.floor(e / 2);
|
|
@@ -268,41 +295,41 @@ const Qe = ({
|
|
|
268
295
|
min: i,
|
|
269
296
|
default: i + 1
|
|
270
297
|
};
|
|
271
|
-
const
|
|
298
|
+
const o = n.small.max + 1;
|
|
272
299
|
n.medium = {
|
|
273
300
|
max: t,
|
|
274
|
-
min:
|
|
275
|
-
default:
|
|
301
|
+
min: o,
|
|
302
|
+
default: o + 1
|
|
276
303
|
};
|
|
277
|
-
const
|
|
304
|
+
const r = n.medium.max + 1;
|
|
278
305
|
return n.large = {
|
|
279
306
|
max: 2e3,
|
|
280
307
|
// TODO: decide upper limit
|
|
281
|
-
min:
|
|
282
|
-
default:
|
|
308
|
+
min: r,
|
|
309
|
+
default: r + 1
|
|
283
310
|
}, n;
|
|
284
|
-
},
|
|
311
|
+
}, ot = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), Re = (e) => Object.entries(e).map(([n, i]) => {
|
|
285
312
|
if (typeof i == "string")
|
|
286
|
-
return `${
|
|
287
|
-
}).filter(
|
|
288
|
-
`),
|
|
313
|
+
return `${ot(n)}: ${i};`;
|
|
314
|
+
}).filter(M), at = (e) => Re(e).join(`
|
|
315
|
+
`), J = ({
|
|
289
316
|
mediaQuery: e,
|
|
290
317
|
className: t,
|
|
291
318
|
styles: n
|
|
292
319
|
}) => {
|
|
293
320
|
const i = `.${t} {
|
|
294
|
-
${
|
|
321
|
+
${at(n)}
|
|
295
322
|
}`;
|
|
296
323
|
return e ? `${e} {
|
|
297
324
|
${i}
|
|
298
325
|
}` : i;
|
|
299
326
|
};
|
|
300
|
-
function
|
|
301
|
-
return /* @__PURE__ */
|
|
327
|
+
function z(e) {
|
|
328
|
+
return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
|
|
302
329
|
}
|
|
303
|
-
function
|
|
330
|
+
function rt(e) {
|
|
304
331
|
function t() {
|
|
305
|
-
const i =
|
|
332
|
+
const i = K({
|
|
306
333
|
block: e.block,
|
|
307
334
|
localState: e.context.localState,
|
|
308
335
|
rootState: e.context.rootState,
|
|
@@ -310,48 +337,48 @@ function Ze(e) {
|
|
|
310
337
|
context: e.context.context,
|
|
311
338
|
shouldEvaluateBindings: !0
|
|
312
339
|
});
|
|
313
|
-
return
|
|
340
|
+
return M(i.hide) ? !i.hide : M(i.show) ? i.show : !0;
|
|
314
341
|
}
|
|
315
342
|
function n() {
|
|
316
|
-
var
|
|
317
|
-
const i =
|
|
343
|
+
var x;
|
|
344
|
+
const i = K({
|
|
318
345
|
block: e.block,
|
|
319
346
|
localState: e.context.localState,
|
|
320
347
|
rootState: e.context.rootState,
|
|
321
348
|
rootSetState: e.context.rootSetState,
|
|
322
349
|
context: e.context.context,
|
|
323
350
|
shouldEvaluateBindings: !0
|
|
324
|
-
}),
|
|
325
|
-
((
|
|
326
|
-
), c =
|
|
351
|
+
}), o = i.responsiveStyles, r = e.context.content, a = Te(
|
|
352
|
+
((x = r == null ? void 0 : r.meta) == null ? void 0 : x.breakpoints) || {}
|
|
353
|
+
), c = o == null ? void 0 : o.large, s = o == null ? void 0 : o.medium, d = o == null ? void 0 : o.small, m = i.id;
|
|
327
354
|
if (!m)
|
|
328
355
|
return "";
|
|
329
|
-
const g = c ?
|
|
356
|
+
const g = c ? J({
|
|
330
357
|
className: m,
|
|
331
358
|
styles: c
|
|
332
|
-
}) : "",
|
|
359
|
+
}) : "", k = s ? J({
|
|
333
360
|
className: m,
|
|
334
361
|
styles: s,
|
|
335
|
-
mediaQuery:
|
|
362
|
+
mediaQuery: he(
|
|
336
363
|
"medium",
|
|
337
|
-
|
|
364
|
+
a
|
|
338
365
|
)
|
|
339
|
-
}) : "",
|
|
366
|
+
}) : "", S = d ? J({
|
|
340
367
|
className: m,
|
|
341
368
|
styles: d,
|
|
342
|
-
mediaQuery:
|
|
369
|
+
mediaQuery: he(
|
|
343
370
|
"small",
|
|
344
|
-
|
|
371
|
+
a
|
|
345
372
|
)
|
|
346
373
|
}) : "";
|
|
347
|
-
return [g,
|
|
374
|
+
return [g, k, S].join(" ");
|
|
348
375
|
}
|
|
349
|
-
return /* @__PURE__ */
|
|
376
|
+
return /* @__PURE__ */ l(h, { children: n() && t() ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(z, { styles: n() }) }) : null });
|
|
350
377
|
}
|
|
351
|
-
function
|
|
378
|
+
function lt(e) {
|
|
352
379
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
353
380
|
}
|
|
354
|
-
const
|
|
381
|
+
const ct = (e) => `on${lt(e)}`, st = (e, t) => (n) => j({
|
|
355
382
|
code: e,
|
|
356
383
|
context: t.context,
|
|
357
384
|
localState: t.localState,
|
|
@@ -360,80 +387,92 @@ const tt = (e) => `on${et(e)}`, nt = (e, t) => (n) => _({
|
|
|
360
387
|
event: n,
|
|
361
388
|
isExpression: !1
|
|
362
389
|
});
|
|
363
|
-
function
|
|
390
|
+
function Ee(e) {
|
|
364
391
|
var i;
|
|
365
392
|
const t = {}, n = (i = e.block.actions) != null ? i : {};
|
|
366
|
-
for (const
|
|
367
|
-
if (!n.hasOwnProperty(
|
|
393
|
+
for (const o in n) {
|
|
394
|
+
if (!n.hasOwnProperty(o))
|
|
368
395
|
continue;
|
|
369
|
-
const
|
|
370
|
-
let
|
|
396
|
+
const r = n[o];
|
|
397
|
+
let a = ct(o);
|
|
371
398
|
if (e.stripPrefix)
|
|
372
|
-
switch (
|
|
399
|
+
switch ($) {
|
|
373
400
|
case "vue":
|
|
374
|
-
|
|
401
|
+
a = a.replace("v-on:", "");
|
|
375
402
|
break;
|
|
376
403
|
case "svelte":
|
|
377
|
-
|
|
404
|
+
a = a.replace("on:", "");
|
|
378
405
|
break;
|
|
379
406
|
}
|
|
380
|
-
t[
|
|
407
|
+
t[a] = st(r, e);
|
|
381
408
|
}
|
|
382
409
|
return t;
|
|
383
410
|
}
|
|
384
|
-
function
|
|
411
|
+
function dt({
|
|
412
|
+
style: e
|
|
413
|
+
}) {
|
|
414
|
+
return e;
|
|
415
|
+
}
|
|
416
|
+
const ut = ({
|
|
417
|
+
block: e,
|
|
418
|
+
context: t
|
|
419
|
+
}) => Pe(dt({
|
|
420
|
+
style: e.style || {},
|
|
421
|
+
context: t,
|
|
422
|
+
block: e
|
|
423
|
+
}));
|
|
424
|
+
function Pe(e) {
|
|
425
|
+
switch ($) {
|
|
426
|
+
case "svelte":
|
|
427
|
+
case "vue":
|
|
428
|
+
case "solid":
|
|
429
|
+
return Re(e).join(" ");
|
|
430
|
+
case "qwik":
|
|
431
|
+
case "reactNative":
|
|
432
|
+
case "react":
|
|
433
|
+
case "rsc":
|
|
434
|
+
return e;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
function mt({
|
|
385
438
|
properties: e
|
|
386
439
|
}) {
|
|
387
|
-
return e
|
|
440
|
+
return e;
|
|
388
441
|
}
|
|
389
|
-
const
|
|
442
|
+
const ft = (e) => ({
|
|
390
443
|
href: e.href
|
|
391
444
|
});
|
|
392
|
-
function
|
|
445
|
+
function oe({
|
|
393
446
|
block: e,
|
|
394
447
|
context: t
|
|
395
448
|
}) {
|
|
396
449
|
var i;
|
|
397
450
|
const n = {
|
|
398
|
-
...
|
|
451
|
+
...ft(e),
|
|
399
452
|
...e.properties,
|
|
400
453
|
"builder-id": e.id,
|
|
401
|
-
style:
|
|
402
|
-
|
|
454
|
+
style: ut({
|
|
455
|
+
block: e,
|
|
456
|
+
context: t
|
|
457
|
+
}),
|
|
458
|
+
[O()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
|
|
403
459
|
};
|
|
404
|
-
return
|
|
460
|
+
return mt({
|
|
405
461
|
properties: n,
|
|
406
462
|
context: t,
|
|
407
463
|
block: e
|
|
408
464
|
});
|
|
409
465
|
}
|
|
410
|
-
function
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
case "vue":
|
|
414
|
-
case "solid":
|
|
415
|
-
return Te(e).join(" ");
|
|
416
|
-
case "qwik":
|
|
417
|
-
case "reactNative":
|
|
418
|
-
case "react":
|
|
419
|
-
case "rsc":
|
|
420
|
-
return e;
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
const rt = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), lt = (e) => typeof e == "string" && rt.has(e.toLowerCase());
|
|
424
|
-
function ct(e) {
|
|
425
|
-
return /* @__PURE__ */ o(h, { children: lt(e.TagName) ? /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ o(h, { children: typeof e.TagName == "string" ? /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) : /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) }) });
|
|
426
|
-
}
|
|
427
|
-
function st(e) {
|
|
428
|
-
return /* @__PURE__ */ o(
|
|
429
|
-
ct,
|
|
466
|
+
function ht(e) {
|
|
467
|
+
return /* @__PURE__ */ l(
|
|
468
|
+
ne,
|
|
430
469
|
{
|
|
431
470
|
TagName: e.Wrapper,
|
|
432
|
-
attributes:
|
|
471
|
+
attributes: oe({
|
|
433
472
|
block: e.block,
|
|
434
473
|
context: e.context
|
|
435
474
|
}),
|
|
436
|
-
actionAttributes:
|
|
475
|
+
actionAttributes: Ee({
|
|
437
476
|
block: e.block,
|
|
438
477
|
rootState: e.context.rootState,
|
|
439
478
|
rootSetState: e.context.rootSetState,
|
|
@@ -445,17 +484,17 @@ function st(e) {
|
|
|
445
484
|
}
|
|
446
485
|
);
|
|
447
486
|
}
|
|
448
|
-
function
|
|
449
|
-
return /* @__PURE__ */
|
|
487
|
+
function gt(e) {
|
|
488
|
+
return /* @__PURE__ */ l(
|
|
450
489
|
e.Wrapper,
|
|
451
490
|
{
|
|
452
491
|
...e.wrapperProps,
|
|
453
492
|
attributes: e.includeBlockProps ? {
|
|
454
|
-
...
|
|
493
|
+
...oe({
|
|
455
494
|
block: e.block,
|
|
456
495
|
context: e.context
|
|
457
496
|
}),
|
|
458
|
-
...
|
|
497
|
+
...Ee({
|
|
459
498
|
block: e.block,
|
|
460
499
|
rootState: e.context.rootState,
|
|
461
500
|
rootSetState: e.context.rootSetState,
|
|
@@ -467,14 +506,14 @@ function dt(e) {
|
|
|
467
506
|
}
|
|
468
507
|
);
|
|
469
508
|
}
|
|
470
|
-
const
|
|
509
|
+
const bt = ({
|
|
471
510
|
componentOptions: e,
|
|
472
511
|
builderBlock: t,
|
|
473
512
|
context: n,
|
|
474
513
|
componentRef: i,
|
|
475
|
-
includeBlockProps:
|
|
476
|
-
isInteractive:
|
|
477
|
-
contextValue:
|
|
514
|
+
includeBlockProps: o,
|
|
515
|
+
isInteractive: r,
|
|
516
|
+
contextValue: a
|
|
478
517
|
}) => {
|
|
479
518
|
const c = {
|
|
480
519
|
...e,
|
|
@@ -482,79 +521,82 @@ const ut = ({
|
|
|
482
521
|
* If `noWrap` is set to `true`, then the block's props/attributes are provided to the
|
|
483
522
|
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
484
523
|
*/
|
|
485
|
-
...
|
|
486
|
-
attributes:
|
|
524
|
+
...o ? {
|
|
525
|
+
attributes: oe({
|
|
487
526
|
block: t,
|
|
488
|
-
context:
|
|
527
|
+
context: a
|
|
489
528
|
})
|
|
490
529
|
} : {}
|
|
491
530
|
};
|
|
492
|
-
return
|
|
531
|
+
return r ? {
|
|
493
532
|
Wrapper: i,
|
|
494
533
|
block: t,
|
|
495
534
|
context: n,
|
|
496
535
|
wrapperProps: e,
|
|
497
|
-
includeBlockProps:
|
|
536
|
+
includeBlockProps: o
|
|
498
537
|
} : c;
|
|
499
538
|
};
|
|
500
|
-
function
|
|
539
|
+
function ge(e) {
|
|
501
540
|
var i;
|
|
502
|
-
const [t, n] =
|
|
503
|
-
() => e.isInteractive ?
|
|
541
|
+
const [t, n] = v(
|
|
542
|
+
() => e.isInteractive ? gt : e.componentRef
|
|
504
543
|
);
|
|
505
|
-
return /* @__PURE__ */
|
|
544
|
+
return /* @__PURE__ */ l(h, { children: e.componentRef ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
|
|
506
545
|
t,
|
|
507
546
|
{
|
|
508
|
-
...
|
|
547
|
+
...bt({
|
|
509
548
|
componentOptions: e.componentOptions,
|
|
510
549
|
builderBlock: e.builderBlock,
|
|
511
550
|
context: e.context,
|
|
512
551
|
componentRef: e.componentRef,
|
|
552
|
+
linkComponent: e.linkComponent,
|
|
513
553
|
includeBlockProps: e.includeBlockProps,
|
|
514
554
|
isInteractive: e.isInteractive,
|
|
515
555
|
contextValue: e.context
|
|
516
556
|
}),
|
|
517
|
-
children: (i = e.blockChildren) == null ? void 0 : i.map((
|
|
518
|
-
|
|
557
|
+
children: (i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */ l(
|
|
558
|
+
q,
|
|
519
559
|
{
|
|
520
|
-
block:
|
|
560
|
+
block: o,
|
|
521
561
|
context: e.context,
|
|
522
|
-
registeredComponents: e.registeredComponents
|
|
562
|
+
registeredComponents: e.registeredComponents,
|
|
563
|
+
linkComponent: e.linkComponent
|
|
523
564
|
},
|
|
524
|
-
|
|
565
|
+
o.id
|
|
525
566
|
))
|
|
526
567
|
}
|
|
527
568
|
) }) : null });
|
|
528
569
|
}
|
|
529
|
-
function
|
|
530
|
-
const [t, n] =
|
|
531
|
-
return /* @__PURE__ */
|
|
532
|
-
|
|
570
|
+
function yt(e) {
|
|
571
|
+
const [t, n] = v(() => e.repeatContext);
|
|
572
|
+
return /* @__PURE__ */ l(ie.Provider, { value: t, children: /* @__PURE__ */ l(
|
|
573
|
+
q,
|
|
533
574
|
{
|
|
534
575
|
block: e.block,
|
|
535
576
|
context: t,
|
|
536
|
-
registeredComponents: e.registeredComponents
|
|
577
|
+
registeredComponents: e.registeredComponents,
|
|
578
|
+
linkComponent: e.linkComponent
|
|
537
579
|
}
|
|
538
580
|
) });
|
|
539
581
|
}
|
|
540
|
-
function
|
|
541
|
-
var m, g,
|
|
582
|
+
function q(e) {
|
|
583
|
+
var m, g, k;
|
|
542
584
|
function t() {
|
|
543
|
-
return
|
|
585
|
+
return nt({
|
|
544
586
|
block: e.block,
|
|
545
587
|
context: e.context,
|
|
546
588
|
registeredComponents: e.registeredComponents
|
|
547
589
|
});
|
|
548
590
|
}
|
|
549
591
|
function n() {
|
|
550
|
-
return
|
|
592
|
+
return it({
|
|
551
593
|
block: e.block,
|
|
552
594
|
context: e.context
|
|
553
595
|
});
|
|
554
596
|
}
|
|
555
597
|
function i() {
|
|
556
|
-
var
|
|
557
|
-
return (
|
|
598
|
+
var S;
|
|
599
|
+
return (S = e.block.repeat) != null && S.collection ? e.block : K({
|
|
558
600
|
block: e.block,
|
|
559
601
|
localState: e.context.localState,
|
|
560
602
|
rootState: e.context.rootState,
|
|
@@ -563,104 +605,114 @@ function K(e) {
|
|
|
563
605
|
shouldEvaluateBindings: !0
|
|
564
606
|
});
|
|
565
607
|
}
|
|
566
|
-
function
|
|
567
|
-
|
|
608
|
+
function o() {
|
|
609
|
+
var x;
|
|
610
|
+
return e.block.tagName === "a" || ((x = i().properties) == null ? void 0 : x.href) || i().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
568
611
|
}
|
|
569
|
-
function
|
|
612
|
+
function r() {
|
|
570
613
|
var C, R;
|
|
571
614
|
if ((C = e.block.repeat) != null && C.collection)
|
|
572
615
|
return !!((R = n == null ? void 0 : n()) != null && R.length);
|
|
573
|
-
const
|
|
574
|
-
return ("show" in i() ? i().show : !0) && !
|
|
616
|
+
const S = "hide" in i() ? i().hide : !1;
|
|
617
|
+
return ("show" in i() ? i().show : !0) && !S;
|
|
575
618
|
}
|
|
576
|
-
function
|
|
577
|
-
var
|
|
578
|
-
return !((
|
|
619
|
+
function a() {
|
|
620
|
+
var x, C;
|
|
621
|
+
return !((x = t == null ? void 0 : t()) != null && x.component) && !n() ? (C = i().children) != null ? C : [] : [];
|
|
579
622
|
}
|
|
580
623
|
function c() {
|
|
581
|
-
var
|
|
624
|
+
var S, x, C, R, B, w, I, P, W;
|
|
582
625
|
return {
|
|
583
|
-
blockChildren: (
|
|
584
|
-
componentRef: (
|
|
626
|
+
blockChildren: (S = i().children) != null ? S : [],
|
|
627
|
+
componentRef: (x = t == null ? void 0 : t()) == null ? void 0 : x.component,
|
|
585
628
|
componentOptions: {
|
|
586
|
-
...
|
|
629
|
+
...ze(i()),
|
|
587
630
|
builderContext: e.context,
|
|
588
|
-
...((C = t == null ? void 0 : t()) == null ? void 0 : C.name) === "
|
|
631
|
+
...((C = t == null ? void 0 : t()) == null ? void 0 : C.name) === "Core:Button" || ((R = t == null ? void 0 : t()) == null ? void 0 : R.name) === "Symbol" || ((B = t == null ? void 0 : t()) == null ? void 0 : B.name) === "Columns" ? {
|
|
632
|
+
builderLinkComponent: e.linkComponent
|
|
633
|
+
} : {},
|
|
634
|
+
...((w = t == null ? void 0 : t()) == null ? void 0 : w.name) === "Symbol" || ((I = t == null ? void 0 : t()) == null ? void 0 : I.name) === "Columns" ? {
|
|
589
635
|
builderComponents: e.registeredComponents
|
|
590
636
|
} : {}
|
|
591
637
|
},
|
|
592
638
|
context: s,
|
|
639
|
+
linkComponent: e.linkComponent,
|
|
593
640
|
registeredComponents: e.registeredComponents,
|
|
594
641
|
builderBlock: i(),
|
|
595
642
|
includeBlockProps: ((P = t == null ? void 0 : t()) == null ? void 0 : P.noWrap) === !0,
|
|
596
|
-
isInteractive: !((
|
|
643
|
+
isInteractive: !((W = t == null ? void 0 : t()) != null && W.isRSC)
|
|
597
644
|
};
|
|
598
645
|
}
|
|
599
|
-
const [s, d] =
|
|
600
|
-
return /* @__PURE__ */
|
|
601
|
-
/* @__PURE__ */
|
|
602
|
-
(m = t == null ? void 0 : t()) != null && m.noWrap ? /* @__PURE__ */
|
|
603
|
-
|
|
646
|
+
const [s, d] = v(() => e.context);
|
|
647
|
+
return /* @__PURE__ */ l(h, { children: r() ? /* @__PURE__ */ A(h, { children: [
|
|
648
|
+
/* @__PURE__ */ l(rt, { block: e.block, context: e.context }),
|
|
649
|
+
(m = t == null ? void 0 : t()) != null && m.noWrap ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
|
|
650
|
+
ge,
|
|
604
651
|
{
|
|
605
652
|
componentRef: c().componentRef,
|
|
606
653
|
componentOptions: c().componentOptions,
|
|
607
654
|
blockChildren: c().blockChildren,
|
|
608
655
|
context: c().context,
|
|
609
656
|
registeredComponents: c().registeredComponents,
|
|
657
|
+
linkComponent: c().linkComponent,
|
|
610
658
|
builderBlock: c().builderBlock,
|
|
611
659
|
includeBlockProps: c().includeBlockProps,
|
|
612
660
|
isInteractive: c().isInteractive
|
|
613
661
|
}
|
|
614
|
-
) }) : /* @__PURE__ */
|
|
615
|
-
|
|
662
|
+
) }) : /* @__PURE__ */ l(h, { children: n() ? /* @__PURE__ */ l(h, { children: (k = n()) == null ? void 0 : k.map((S, x) => /* @__PURE__ */ l(
|
|
663
|
+
yt,
|
|
616
664
|
{
|
|
617
|
-
repeatContext:
|
|
618
|
-
block:
|
|
619
|
-
registeredComponents: e.registeredComponents
|
|
665
|
+
repeatContext: S.context,
|
|
666
|
+
block: S.block,
|
|
667
|
+
registeredComponents: e.registeredComponents,
|
|
668
|
+
linkComponent: e.linkComponent
|
|
620
669
|
},
|
|
621
|
-
|
|
622
|
-
)) }) : /* @__PURE__ */
|
|
623
|
-
|
|
670
|
+
x
|
|
671
|
+
)) }) : /* @__PURE__ */ l(h, { children: /* @__PURE__ */ A(
|
|
672
|
+
ht,
|
|
624
673
|
{
|
|
625
|
-
Wrapper:
|
|
674
|
+
Wrapper: o(),
|
|
626
675
|
block: i(),
|
|
627
676
|
context: e.context,
|
|
677
|
+
linkComponent: e.linkComponent,
|
|
628
678
|
children: [
|
|
629
|
-
/* @__PURE__ */
|
|
630
|
-
|
|
679
|
+
/* @__PURE__ */ l(
|
|
680
|
+
ge,
|
|
631
681
|
{
|
|
632
682
|
componentRef: c().componentRef,
|
|
633
683
|
componentOptions: c().componentOptions,
|
|
634
684
|
blockChildren: c().blockChildren,
|
|
635
685
|
context: c().context,
|
|
636
686
|
registeredComponents: c().registeredComponents,
|
|
687
|
+
linkComponent: c().linkComponent,
|
|
637
688
|
builderBlock: c().builderBlock,
|
|
638
689
|
includeBlockProps: c().includeBlockProps,
|
|
639
690
|
isInteractive: c().isInteractive
|
|
640
691
|
}
|
|
641
692
|
),
|
|
642
|
-
(g =
|
|
643
|
-
|
|
693
|
+
(g = a()) == null ? void 0 : g.map((S) => /* @__PURE__ */ l(
|
|
694
|
+
q,
|
|
644
695
|
{
|
|
645
|
-
block:
|
|
696
|
+
block: S,
|
|
646
697
|
context: s,
|
|
647
|
-
registeredComponents: e.registeredComponents
|
|
698
|
+
registeredComponents: e.registeredComponents,
|
|
699
|
+
linkComponent: e.linkComponent
|
|
648
700
|
},
|
|
649
|
-
|
|
701
|
+
S.id
|
|
650
702
|
))
|
|
651
703
|
]
|
|
652
704
|
}
|
|
653
705
|
) }) })
|
|
654
706
|
] }) : null });
|
|
655
707
|
}
|
|
656
|
-
function
|
|
708
|
+
function St(e) {
|
|
657
709
|
function t() {
|
|
658
|
-
var
|
|
659
|
-
return "builder-blocks" + ((
|
|
710
|
+
var o;
|
|
711
|
+
return "builder-blocks" + ((o = e.blocks) != null && o.length ? "" : " no-blocks");
|
|
660
712
|
}
|
|
661
713
|
function n() {
|
|
662
|
-
var
|
|
663
|
-
|
|
714
|
+
var o, r;
|
|
715
|
+
N() && !((o = e.blocks) != null && o.length) && ((r = window.parent) == null || r.postMessage(
|
|
664
716
|
{
|
|
665
717
|
type: "builder.clickEmptyBlocks",
|
|
666
718
|
data: {
|
|
@@ -672,8 +724,8 @@ function ft(e) {
|
|
|
672
724
|
));
|
|
673
725
|
}
|
|
674
726
|
function i() {
|
|
675
|
-
var
|
|
676
|
-
|
|
727
|
+
var o, r;
|
|
728
|
+
N() && !((o = e.blocks) != null && o.length) && ((r = window.parent) == null || r.postMessage(
|
|
677
729
|
{
|
|
678
730
|
type: "builder.hoverEmptyBlocks",
|
|
679
731
|
data: {
|
|
@@ -684,57 +736,58 @@ function ft(e) {
|
|
|
684
736
|
"*"
|
|
685
737
|
));
|
|
686
738
|
}
|
|
687
|
-
return /* @__PURE__ */
|
|
688
|
-
/* @__PURE__ */
|
|
739
|
+
return /* @__PURE__ */ A(h, { children: [
|
|
740
|
+
/* @__PURE__ */ l(
|
|
689
741
|
e.BlocksWrapper,
|
|
690
742
|
{
|
|
691
743
|
className: t() + " props-blocks-wrapper-4f2c12d8",
|
|
692
744
|
"builder-path": e.path,
|
|
693
745
|
"builder-parent-id": e.parent,
|
|
694
746
|
style: e.styleProp,
|
|
695
|
-
onClick: (
|
|
696
|
-
onMouseEnter: (
|
|
697
|
-
onKeyPress: (
|
|
747
|
+
onClick: (o) => n(),
|
|
748
|
+
onMouseEnter: (o) => i(),
|
|
749
|
+
onKeyPress: (o) => n(),
|
|
698
750
|
...e.BlocksWrapperProps,
|
|
699
751
|
children: e.children
|
|
700
752
|
}
|
|
701
753
|
),
|
|
702
|
-
/* @__PURE__ */
|
|
754
|
+
/* @__PURE__ */ l("style", { children: `.props-blocks-wrapper-4f2c12d8 {
|
|
703
755
|
display: flex;
|
|
704
756
|
flex-direction: column;
|
|
705
757
|
align-items: stretch;
|
|
706
758
|
}` })
|
|
707
759
|
] });
|
|
708
760
|
}
|
|
709
|
-
function
|
|
710
|
-
var i,
|
|
711
|
-
const t =
|
|
712
|
-
return /* @__PURE__ */
|
|
713
|
-
|
|
761
|
+
function Y(e) {
|
|
762
|
+
var i, o, r;
|
|
763
|
+
const t = se(ie), n = se(we);
|
|
764
|
+
return /* @__PURE__ */ l(
|
|
765
|
+
St,
|
|
714
766
|
{
|
|
715
767
|
blocks: e.blocks,
|
|
716
768
|
parent: e.parent,
|
|
717
769
|
path: e.path,
|
|
718
770
|
styleProp: e.styleProp,
|
|
719
771
|
BlocksWrapper: (i = e.context) == null ? void 0 : i.BlocksWrapper,
|
|
720
|
-
BlocksWrapperProps: (
|
|
721
|
-
children: e.blocks ? /* @__PURE__ */
|
|
722
|
-
|
|
772
|
+
BlocksWrapperProps: (o = e.context) == null ? void 0 : o.BlocksWrapperProps,
|
|
773
|
+
children: e.blocks ? /* @__PURE__ */ l(h, { children: (r = e.blocks) == null ? void 0 : r.map((a) => /* @__PURE__ */ l(
|
|
774
|
+
q,
|
|
723
775
|
{
|
|
724
|
-
block:
|
|
776
|
+
block: a,
|
|
777
|
+
linkComponent: e.linkComponent,
|
|
725
778
|
context: e.context || t,
|
|
726
779
|
registeredComponents: e.registeredComponents || n.registeredComponents
|
|
727
780
|
},
|
|
728
|
-
|
|
781
|
+
a.id
|
|
729
782
|
)) }) : null
|
|
730
783
|
}
|
|
731
784
|
);
|
|
732
785
|
}
|
|
733
|
-
function
|
|
734
|
-
var
|
|
735
|
-
const [t, n] =
|
|
786
|
+
function xt(e) {
|
|
787
|
+
var B;
|
|
788
|
+
const [t, n] = v(
|
|
736
789
|
() => typeof e.space == "number" ? e.space || 0 : 20
|
|
737
|
-
), [i,
|
|
790
|
+
), [i, o] = v(() => e.columns || []), [r, a] = v(
|
|
738
791
|
() => e.stackColumnsAt || "tablet"
|
|
739
792
|
);
|
|
740
793
|
function c(w) {
|
|
@@ -749,18 +802,18 @@ function ht(e) {
|
|
|
749
802
|
stackedStyle: w,
|
|
750
803
|
desktopStyle: I
|
|
751
804
|
}) {
|
|
752
|
-
return
|
|
805
|
+
return r === "tablet" ? w : I;
|
|
753
806
|
}
|
|
754
807
|
function m({
|
|
755
808
|
stackedStyle: w,
|
|
756
809
|
desktopStyle: I
|
|
757
810
|
}) {
|
|
758
|
-
return
|
|
811
|
+
return r === "never" ? I : w;
|
|
759
812
|
}
|
|
760
|
-
const [g,
|
|
813
|
+
const [g, k] = v(
|
|
761
814
|
() => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
762
815
|
);
|
|
763
|
-
function
|
|
816
|
+
function S() {
|
|
764
817
|
return {
|
|
765
818
|
"--flex-dir": g,
|
|
766
819
|
"--flex-dir-tablet": d({
|
|
@@ -769,33 +822,38 @@ function ht(e) {
|
|
|
769
822
|
})
|
|
770
823
|
};
|
|
771
824
|
}
|
|
772
|
-
function
|
|
773
|
-
const I = w === 0 ? 0 : t,
|
|
825
|
+
function x(w) {
|
|
826
|
+
const I = w === 0 ? 0 : t, P = s(w), W = `${I}px`, F = "100%", L = 0;
|
|
774
827
|
return {
|
|
775
|
-
|
|
776
|
-
|
|
828
|
+
...{
|
|
829
|
+
display: "flex",
|
|
830
|
+
flexDirection: "column",
|
|
831
|
+
alignItems: "stretch"
|
|
832
|
+
},
|
|
833
|
+
width: P,
|
|
834
|
+
["marginLeft"]: W,
|
|
777
835
|
"--column-width-mobile": m({
|
|
778
|
-
stackedStyle:
|
|
779
|
-
desktopStyle:
|
|
836
|
+
stackedStyle: F,
|
|
837
|
+
desktopStyle: P
|
|
780
838
|
}),
|
|
781
839
|
"--column-margin-left-mobile": m({
|
|
782
|
-
stackedStyle:
|
|
783
|
-
desktopStyle:
|
|
840
|
+
stackedStyle: L,
|
|
841
|
+
desktopStyle: W
|
|
784
842
|
}),
|
|
785
843
|
"--column-width-tablet": d({
|
|
786
|
-
stackedStyle:
|
|
787
|
-
desktopStyle:
|
|
844
|
+
stackedStyle: F,
|
|
845
|
+
desktopStyle: P
|
|
788
846
|
}),
|
|
789
847
|
"--column-margin-left-tablet": d({
|
|
790
|
-
stackedStyle:
|
|
791
|
-
desktopStyle:
|
|
848
|
+
stackedStyle: L,
|
|
849
|
+
desktopStyle: W
|
|
792
850
|
})
|
|
793
851
|
};
|
|
794
852
|
}
|
|
795
853
|
function C(w) {
|
|
796
|
-
var
|
|
797
|
-
return
|
|
798
|
-
((
|
|
854
|
+
var P, W;
|
|
855
|
+
return Te(
|
|
856
|
+
((W = (P = e.builderContext.content) == null ? void 0 : P.meta) == null ? void 0 : W.breakpoints) || {}
|
|
799
857
|
)[w].max;
|
|
800
858
|
}
|
|
801
859
|
function R() {
|
|
@@ -825,83 +883,87 @@ function ht(e) {
|
|
|
825
883
|
},
|
|
826
884
|
`;
|
|
827
885
|
}
|
|
828
|
-
return /* @__PURE__ */
|
|
829
|
-
/* @__PURE__ */
|
|
886
|
+
return /* @__PURE__ */ A(h, { children: [
|
|
887
|
+
/* @__PURE__ */ A(
|
|
830
888
|
"div",
|
|
831
889
|
{
|
|
832
|
-
className: `builder-columns ${e.builderBlock.id}-breakpoints div-
|
|
833
|
-
style:
|
|
890
|
+
className: `builder-columns ${e.builderBlock.id}-breakpoints div-6f826264`,
|
|
891
|
+
style: S(),
|
|
834
892
|
children: [
|
|
835
|
-
/* @__PURE__ */
|
|
836
|
-
(
|
|
837
|
-
|
|
893
|
+
/* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(z, { styles: R() }) }),
|
|
894
|
+
(B = e.columns) == null ? void 0 : B.map((w, I) => /* @__PURE__ */ l(
|
|
895
|
+
ne,
|
|
838
896
|
{
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
897
|
+
TagName: w.link ? e.builderLinkComponent || "a" : "div",
|
|
898
|
+
actionAttributes: {},
|
|
899
|
+
attributes: {
|
|
900
|
+
...w.link ? {
|
|
901
|
+
href: w.link
|
|
902
|
+
} : {},
|
|
903
|
+
[O()]: "builder-column",
|
|
904
|
+
style: Pe(x(I))
|
|
905
|
+
},
|
|
906
|
+
children: /* @__PURE__ */ l(
|
|
907
|
+
Y,
|
|
908
|
+
{
|
|
909
|
+
path: `component.options.columns.${I}.blocks`,
|
|
910
|
+
parent: e.builderBlock.id,
|
|
911
|
+
styleProp: {
|
|
912
|
+
flexGrow: "1"
|
|
913
|
+
},
|
|
914
|
+
context: e.builderContext,
|
|
915
|
+
registeredComponents: e.builderComponents,
|
|
916
|
+
linkComponent: e.builderLinkComponent,
|
|
917
|
+
blocks: w.blocks
|
|
918
|
+
}
|
|
919
|
+
)
|
|
842
920
|
},
|
|
843
|
-
|
|
844
|
-
z,
|
|
845
|
-
{
|
|
846
|
-
path: `component.options.columns.${I}.blocks`,
|
|
847
|
-
parent: e.builderBlock.id,
|
|
848
|
-
styleProp: {
|
|
849
|
-
flexGrow: "1"
|
|
850
|
-
},
|
|
851
|
-
context: e.builderContext,
|
|
852
|
-
registeredComponents: e.builderComponents,
|
|
853
|
-
blocks: w.blocks
|
|
854
|
-
}
|
|
855
|
-
)
|
|
921
|
+
I
|
|
856
922
|
))
|
|
857
923
|
]
|
|
858
924
|
}
|
|
859
925
|
),
|
|
860
|
-
/* @__PURE__ */
|
|
926
|
+
/* @__PURE__ */ l("style", { children: `.div-6f826264 {
|
|
861
927
|
display: flex;
|
|
862
928
|
line-height: normal;
|
|
863
|
-
}.div-3c01d6ec-2 {
|
|
864
|
-
display: flex;
|
|
865
|
-
flex-direction: column;
|
|
866
|
-
align-items: stretch;
|
|
867
929
|
}` })
|
|
868
930
|
] });
|
|
869
931
|
}
|
|
870
|
-
function
|
|
871
|
-
return /* @__PURE__ */
|
|
932
|
+
function vt(e) {
|
|
933
|
+
return /* @__PURE__ */ l("span", { children: e.children });
|
|
872
934
|
}
|
|
873
|
-
function
|
|
935
|
+
function be(e) {
|
|
874
936
|
return e.replace(/http(s)?:/, "");
|
|
875
937
|
}
|
|
876
|
-
function
|
|
877
|
-
const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"),
|
|
878
|
-
return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e +
|
|
938
|
+
function kt(e = "", t, n) {
|
|
939
|
+
const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), o = e.indexOf("?") !== -1 ? "&" : "?";
|
|
940
|
+
return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + o + t + "=" + encodeURIComponent(n);
|
|
879
941
|
}
|
|
880
|
-
function
|
|
942
|
+
function pt(e, t) {
|
|
881
943
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
882
944
|
return e;
|
|
883
945
|
if (t === "master")
|
|
884
|
-
return
|
|
946
|
+
return be(e);
|
|
885
947
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
886
948
|
if (n) {
|
|
887
|
-
const i = e.split(n[0]),
|
|
888
|
-
return
|
|
949
|
+
const i = e.split(n[0]), o = n[3], r = t.match("x") ? t : `${t}x`;
|
|
950
|
+
return be(`${i[0]}_${r}${o}`);
|
|
889
951
|
}
|
|
890
952
|
return null;
|
|
891
953
|
}
|
|
892
|
-
function
|
|
954
|
+
function X(e) {
|
|
893
955
|
if (!e)
|
|
894
956
|
return e;
|
|
895
957
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
896
958
|
if (e.match(/builder\.io/)) {
|
|
897
959
|
let n = e;
|
|
898
960
|
const i = Number(e.split("?width=")[1]);
|
|
899
|
-
return isNaN(i) || (n = `${n} ${i}w`), t.filter((
|
|
961
|
+
return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${kt(e, "width", o)} ${o}w`).concat([n]).join(", ");
|
|
900
962
|
}
|
|
901
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
963
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [pt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
|
|
902
964
|
}
|
|
903
|
-
function
|
|
904
|
-
var
|
|
965
|
+
function Ct(e) {
|
|
966
|
+
var o, r, a, c;
|
|
905
967
|
function t() {
|
|
906
968
|
var m;
|
|
907
969
|
const d = e.image || e.src;
|
|
@@ -911,10 +973,10 @@ function yt(e) {
|
|
|
911
973
|
return e.srcset;
|
|
912
974
|
if (e.srcset && ((m = e.image) != null && m.includes("builder.io/api/v1/image"))) {
|
|
913
975
|
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
914
|
-
return console.debug("Removed given srcset"),
|
|
976
|
+
return console.debug("Removed given srcset"), X(d);
|
|
915
977
|
} else if (e.image && !e.srcset)
|
|
916
|
-
return
|
|
917
|
-
return
|
|
978
|
+
return X(d);
|
|
979
|
+
return X(d);
|
|
918
980
|
}
|
|
919
981
|
function n() {
|
|
920
982
|
var s;
|
|
@@ -930,11 +992,11 @@ function yt(e) {
|
|
|
930
992
|
};
|
|
931
993
|
return e.aspectRatio ? s : void 0;
|
|
932
994
|
}
|
|
933
|
-
return /* @__PURE__ */
|
|
934
|
-
/* @__PURE__ */
|
|
935
|
-
/* @__PURE__ */
|
|
936
|
-
n() ? /* @__PURE__ */
|
|
937
|
-
/* @__PURE__ */
|
|
995
|
+
return /* @__PURE__ */ A(h, { children: [
|
|
996
|
+
/* @__PURE__ */ A(h, { children: [
|
|
997
|
+
/* @__PURE__ */ A("picture", { children: [
|
|
998
|
+
n() ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l("source", { type: "image/webp", srcSet: n() }) }) : null,
|
|
999
|
+
/* @__PURE__ */ l(
|
|
938
1000
|
"img",
|
|
939
1001
|
{
|
|
940
1002
|
loading: "lazy",
|
|
@@ -952,7 +1014,7 @@ function yt(e) {
|
|
|
952
1014
|
}
|
|
953
1015
|
)
|
|
954
1016
|
] }),
|
|
955
|
-
e.aspectRatio && !((
|
|
1017
|
+
e.aspectRatio && !((r = (o = e.builderBlock) == null ? void 0 : o.children) != null && r.length && e.fitContent) ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
|
|
956
1018
|
"div",
|
|
957
1019
|
{
|
|
958
1020
|
className: "builder-image-sizer div-40c70c9b",
|
|
@@ -961,10 +1023,10 @@ function yt(e) {
|
|
|
961
1023
|
}
|
|
962
1024
|
}
|
|
963
1025
|
) }) : null,
|
|
964
|
-
(c = (
|
|
965
|
-
!e.fitContent && e.children ? /* @__PURE__ */
|
|
1026
|
+
(c = (a = e.builderBlock) == null ? void 0 : a.children) != null && c.length && e.fitContent ? /* @__PURE__ */ l(h, { children: e.children }) : null,
|
|
1027
|
+
!e.fitContent && e.children ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l("div", { className: "div-40c70c9b-2", children: e.children }) }) : null
|
|
966
1028
|
] }),
|
|
967
|
-
/* @__PURE__ */
|
|
1029
|
+
/* @__PURE__ */ l("style", { children: `.img-40c70c9b {
|
|
968
1030
|
opacity: 1;
|
|
969
1031
|
transition: opacity 0.2s ease-in-out;
|
|
970
1032
|
}.div-40c70c9b {
|
|
@@ -983,8 +1045,8 @@ function yt(e) {
|
|
|
983
1045
|
}` })
|
|
984
1046
|
] });
|
|
985
1047
|
}
|
|
986
|
-
function
|
|
987
|
-
return /* @__PURE__ */
|
|
1048
|
+
function wt(e) {
|
|
1049
|
+
return /* @__PURE__ */ l(
|
|
988
1050
|
"section",
|
|
989
1051
|
{
|
|
990
1052
|
...e.attributes,
|
|
@@ -1004,7 +1066,7 @@ function St(e) {
|
|
|
1004
1066
|
}
|
|
1005
1067
|
);
|
|
1006
1068
|
}
|
|
1007
|
-
const
|
|
1069
|
+
const It = {
|
|
1008
1070
|
name: "Core:Button",
|
|
1009
1071
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1010
1072
|
defaultStyles: {
|
|
@@ -1037,7 +1099,7 @@ const vt = {
|
|
|
1037
1099
|
}],
|
|
1038
1100
|
static: !0,
|
|
1039
1101
|
noWrap: !0
|
|
1040
|
-
},
|
|
1102
|
+
}, Tt = {
|
|
1041
1103
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1042
1104
|
name: "Columns",
|
|
1043
1105
|
isRSC: !0,
|
|
@@ -1216,7 +1278,7 @@ const vt = {
|
|
|
1216
1278
|
});
|
|
1217
1279
|
}
|
|
1218
1280
|
const n = e.get("columns");
|
|
1219
|
-
Array.isArray(n) && n.find((
|
|
1281
|
+
Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((r) => !r.get("width")) || n.reduce((c, s) => c + s.get("width"), 0) !== 100) && t();
|
|
1220
1282
|
}
|
|
1221
1283
|
}, {
|
|
1222
1284
|
name: "space",
|
|
@@ -1238,7 +1300,7 @@ const vt = {
|
|
|
1238
1300
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1239
1301
|
advanced: !0
|
|
1240
1302
|
}]
|
|
1241
|
-
},
|
|
1303
|
+
}, Rt = {
|
|
1242
1304
|
name: "Custom Code",
|
|
1243
1305
|
static: !0,
|
|
1244
1306
|
requiredPermissions: ["editCode"],
|
|
@@ -1261,15 +1323,15 @@ const vt = {
|
|
|
1261
1323
|
advanced: !0
|
|
1262
1324
|
}]
|
|
1263
1325
|
};
|
|
1264
|
-
function
|
|
1265
|
-
const t =
|
|
1326
|
+
function Et(e) {
|
|
1327
|
+
const t = ee(null), [n, i] = v(() => []), [o, r] = v(() => []);
|
|
1266
1328
|
return E(() => {
|
|
1267
1329
|
var c;
|
|
1268
1330
|
if (!((c = t.current) != null && c.getElementsByTagName) || typeof window == "undefined")
|
|
1269
1331
|
return;
|
|
1270
|
-
const
|
|
1271
|
-
for (let s = 0; s <
|
|
1272
|
-
const d =
|
|
1332
|
+
const a = t.current.getElementsByTagName("script");
|
|
1333
|
+
for (let s = 0; s < a.length; s++) {
|
|
1334
|
+
const d = a[s];
|
|
1273
1335
|
if (d.src) {
|
|
1274
1336
|
if (n.includes(d.src))
|
|
1275
1337
|
continue;
|
|
@@ -1281,16 +1343,16 @@ function Ct(e) {
|
|
|
1281
1343
|
"application/javascript",
|
|
1282
1344
|
"application/ecmascript"
|
|
1283
1345
|
].includes(d.type)) {
|
|
1284
|
-
if (
|
|
1346
|
+
if (o.includes(d.innerText))
|
|
1285
1347
|
continue;
|
|
1286
1348
|
try {
|
|
1287
|
-
|
|
1349
|
+
o.push(d.innerText), new Function(d.innerText)();
|
|
1288
1350
|
} catch (m) {
|
|
1289
1351
|
console.warn("`CustomCode`: Error running script:", m);
|
|
1290
1352
|
}
|
|
1291
1353
|
}
|
|
1292
1354
|
}
|
|
1293
|
-
}, []), /* @__PURE__ */
|
|
1355
|
+
}, []), /* @__PURE__ */ l(
|
|
1294
1356
|
"div",
|
|
1295
1357
|
{
|
|
1296
1358
|
ref: t,
|
|
@@ -1299,7 +1361,7 @@ function Ct(e) {
|
|
|
1299
1361
|
}
|
|
1300
1362
|
);
|
|
1301
1363
|
}
|
|
1302
|
-
const
|
|
1364
|
+
const Pt = {
|
|
1303
1365
|
name: "Embed",
|
|
1304
1366
|
static: !0,
|
|
1305
1367
|
inputs: [{
|
|
@@ -1324,9 +1386,9 @@ const wt = {
|
|
|
1324
1386
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1325
1387
|
hideFromUI: !0
|
|
1326
1388
|
}]
|
|
1327
|
-
},
|
|
1328
|
-
function
|
|
1329
|
-
const t =
|
|
1389
|
+
}, Bt = ["text/javascript", "application/javascript", "application/ecmascript"], Wt = (e) => Bt.includes(e.type);
|
|
1390
|
+
function At(e) {
|
|
1391
|
+
const t = ee(null), [n, i] = v(() => []), [o, r] = v(() => []), [a, c] = v(() => !1);
|
|
1330
1392
|
function s() {
|
|
1331
1393
|
if (!t.current || !t.current.getElementsByTagName)
|
|
1332
1394
|
return;
|
|
@@ -1335,19 +1397,19 @@ function Rt(e) {
|
|
|
1335
1397
|
const g = d[m];
|
|
1336
1398
|
if (g.src && !n.includes(g.src)) {
|
|
1337
1399
|
n.push(g.src);
|
|
1338
|
-
const
|
|
1339
|
-
|
|
1340
|
-
} else if (
|
|
1400
|
+
const k = document.createElement("script");
|
|
1401
|
+
k.async = !0, k.src = g.src, document.head.appendChild(k);
|
|
1402
|
+
} else if (Wt(g) && !o.includes(g.innerText))
|
|
1341
1403
|
try {
|
|
1342
|
-
|
|
1343
|
-
} catch (
|
|
1344
|
-
console.warn("`Embed`: Error running script:",
|
|
1404
|
+
o.push(g.innerText), new Function(g.innerText)();
|
|
1405
|
+
} catch (k) {
|
|
1406
|
+
console.warn("`Embed`: Error running script:", k);
|
|
1345
1407
|
}
|
|
1346
1408
|
}
|
|
1347
1409
|
}
|
|
1348
1410
|
return E(() => {
|
|
1349
|
-
t.current && !
|
|
1350
|
-
}, [t.current,
|
|
1411
|
+
t.current && !a && (c(!0), s());
|
|
1412
|
+
}, [t.current, a]), /* @__PURE__ */ l(
|
|
1351
1413
|
"div",
|
|
1352
1414
|
{
|
|
1353
1415
|
className: "builder-embed",
|
|
@@ -1356,13 +1418,13 @@ function Rt(e) {
|
|
|
1356
1418
|
}
|
|
1357
1419
|
);
|
|
1358
1420
|
}
|
|
1359
|
-
const
|
|
1421
|
+
const Nt = {
|
|
1360
1422
|
name: "Fragment",
|
|
1361
1423
|
static: !0,
|
|
1362
1424
|
hidden: !0,
|
|
1363
1425
|
canHaveChildren: !0,
|
|
1364
1426
|
noWrap: !0
|
|
1365
|
-
},
|
|
1427
|
+
}, Vt = {
|
|
1366
1428
|
name: "Image",
|
|
1367
1429
|
static: !0,
|
|
1368
1430
|
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",
|
|
@@ -1382,29 +1444,29 @@ const Et = {
|
|
|
1382
1444
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
1383
1445
|
onChange: (e) => {
|
|
1384
1446
|
e.delete("srcset"), e.delete("noWebp");
|
|
1385
|
-
function n(
|
|
1447
|
+
function n(a, c = 6e4) {
|
|
1386
1448
|
return new Promise((s, d) => {
|
|
1387
1449
|
const m = document.createElement("img");
|
|
1388
1450
|
let g = !1;
|
|
1389
1451
|
m.onload = () => {
|
|
1390
1452
|
g = !0, s(m);
|
|
1391
|
-
}, m.addEventListener("error", (
|
|
1392
|
-
console.warn("Image load failed",
|
|
1393
|
-
}), m.src =
|
|
1453
|
+
}, m.addEventListener("error", (k) => {
|
|
1454
|
+
console.warn("Image load failed", k.error), d(k.error);
|
|
1455
|
+
}), m.src = a, setTimeout(() => {
|
|
1394
1456
|
g || d(new Error("Image load timed out"));
|
|
1395
1457
|
}, c);
|
|
1396
1458
|
});
|
|
1397
1459
|
}
|
|
1398
|
-
function i(
|
|
1399
|
-
return Math.round(
|
|
1460
|
+
function i(a) {
|
|
1461
|
+
return Math.round(a * 1e3) / 1e3;
|
|
1400
1462
|
}
|
|
1401
|
-
const
|
|
1402
|
-
if (fetch(
|
|
1403
|
-
|
|
1404
|
-
}),
|
|
1405
|
-
return n(
|
|
1463
|
+
const o = e.get("image"), r = e.get("aspectRatio");
|
|
1464
|
+
if (fetch(o).then((a) => a.blob()).then((a) => {
|
|
1465
|
+
a.type.includes("svg") && e.set("noWebp", !0);
|
|
1466
|
+
}), o && (!r || r === 0.7041))
|
|
1467
|
+
return n(o).then((a) => {
|
|
1406
1468
|
const c = e.get("aspectRatio");
|
|
1407
|
-
e.get("image") ===
|
|
1469
|
+
e.get("image") === o && (!c || c === 0.7041) && a.width && a.height && (e.set("aspectRatio", i(a.height / a.width)), e.set("height", a.height), e.set("width", a.width));
|
|
1408
1470
|
});
|
|
1409
1471
|
}
|
|
1410
1472
|
}, {
|
|
@@ -1462,7 +1524,7 @@ const Et = {
|
|
|
1462
1524
|
advanced: !0,
|
|
1463
1525
|
defaultValue: 0.7041
|
|
1464
1526
|
}]
|
|
1465
|
-
},
|
|
1527
|
+
}, $t = {
|
|
1466
1528
|
// friendlyName?
|
|
1467
1529
|
name: "Raw:Img",
|
|
1468
1530
|
hideFromInsertMenu: !0,
|
|
@@ -1477,8 +1539,8 @@ const Et = {
|
|
|
1477
1539
|
noWrap: !0,
|
|
1478
1540
|
static: !0
|
|
1479
1541
|
};
|
|
1480
|
-
function
|
|
1481
|
-
return /* @__PURE__ */
|
|
1542
|
+
function Ft(e) {
|
|
1543
|
+
return /* @__PURE__ */ l(
|
|
1482
1544
|
"img",
|
|
1483
1545
|
{
|
|
1484
1546
|
style: {
|
|
@@ -1489,10 +1551,10 @@ function Wt(e) {
|
|
|
1489
1551
|
src: e.imgSrc || e.image,
|
|
1490
1552
|
...e.attributes
|
|
1491
1553
|
},
|
|
1492
|
-
|
|
1554
|
+
N() && e.imgSrc || "default-key"
|
|
1493
1555
|
);
|
|
1494
1556
|
}
|
|
1495
|
-
const
|
|
1557
|
+
const Lt = {
|
|
1496
1558
|
name: "Core:Section",
|
|
1497
1559
|
static: !0,
|
|
1498
1560
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1531,7 +1593,7 @@ const At = {
|
|
|
1531
1593
|
}
|
|
1532
1594
|
}
|
|
1533
1595
|
}]
|
|
1534
|
-
},
|
|
1596
|
+
}, _t = {
|
|
1535
1597
|
name: "Slot",
|
|
1536
1598
|
isRSC: !0,
|
|
1537
1599
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -1545,9 +1607,9 @@ const At = {
|
|
|
1545
1607
|
defaultValue: "children"
|
|
1546
1608
|
}]
|
|
1547
1609
|
};
|
|
1548
|
-
function
|
|
1610
|
+
function Ot(e) {
|
|
1549
1611
|
var t, n, i;
|
|
1550
|
-
return /* @__PURE__ */
|
|
1612
|
+
return /* @__PURE__ */ l(
|
|
1551
1613
|
"div",
|
|
1552
1614
|
{
|
|
1553
1615
|
style: {
|
|
@@ -1556,8 +1618,8 @@ function $t(e) {
|
|
|
1556
1618
|
...!((t = e.builderContext.context) != null && t.symbolId) && {
|
|
1557
1619
|
"builder-slot": e.name
|
|
1558
1620
|
},
|
|
1559
|
-
children: /* @__PURE__ */
|
|
1560
|
-
|
|
1621
|
+
children: /* @__PURE__ */ l(
|
|
1622
|
+
Y,
|
|
1561
1623
|
{
|
|
1562
1624
|
parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
|
|
1563
1625
|
path: `symbol.data.${e.name}`,
|
|
@@ -1568,7 +1630,7 @@ function $t(e) {
|
|
|
1568
1630
|
}
|
|
1569
1631
|
);
|
|
1570
1632
|
}
|
|
1571
|
-
const
|
|
1633
|
+
const jt = {
|
|
1572
1634
|
name: "Symbol",
|
|
1573
1635
|
noWrap: !0,
|
|
1574
1636
|
static: !0,
|
|
@@ -1601,7 +1663,7 @@ const Nt = {
|
|
|
1601
1663
|
hideFromUI: !0,
|
|
1602
1664
|
type: "boolean"
|
|
1603
1665
|
}]
|
|
1604
|
-
},
|
|
1666
|
+
}, Dt = {
|
|
1605
1667
|
name: "Text",
|
|
1606
1668
|
static: !0,
|
|
1607
1669
|
isRSC: !0,
|
|
@@ -1620,9 +1682,9 @@ const Nt = {
|
|
|
1620
1682
|
textAlign: "center"
|
|
1621
1683
|
}
|
|
1622
1684
|
};
|
|
1623
|
-
function
|
|
1685
|
+
function Ut(e) {
|
|
1624
1686
|
var t;
|
|
1625
|
-
return /* @__PURE__ */
|
|
1687
|
+
return /* @__PURE__ */ l(
|
|
1626
1688
|
"div",
|
|
1627
1689
|
{
|
|
1628
1690
|
className: "builder-text",
|
|
@@ -1633,7 +1695,7 @@ function _t(e) {
|
|
|
1633
1695
|
}
|
|
1634
1696
|
);
|
|
1635
1697
|
}
|
|
1636
|
-
const
|
|
1698
|
+
const Mt = {
|
|
1637
1699
|
name: "Video",
|
|
1638
1700
|
canHaveChildren: !0,
|
|
1639
1701
|
defaultStyles: {
|
|
@@ -1715,8 +1777,8 @@ const Lt = {
|
|
|
1715
1777
|
advanced: !0
|
|
1716
1778
|
}]
|
|
1717
1779
|
};
|
|
1718
|
-
function
|
|
1719
|
-
var i,
|
|
1780
|
+
function Ht(e) {
|
|
1781
|
+
var i, o, r, a, c, s, d;
|
|
1720
1782
|
function t() {
|
|
1721
1783
|
return {
|
|
1722
1784
|
...e.autoPlay === !0 ? {
|
|
@@ -1741,14 +1803,14 @@ function jt(e) {
|
|
|
1741
1803
|
...t()
|
|
1742
1804
|
};
|
|
1743
1805
|
}
|
|
1744
|
-
return /* @__PURE__ */
|
|
1806
|
+
return /* @__PURE__ */ A(
|
|
1745
1807
|
"div",
|
|
1746
1808
|
{
|
|
1747
1809
|
style: {
|
|
1748
1810
|
position: "relative"
|
|
1749
1811
|
},
|
|
1750
1812
|
children: [
|
|
1751
|
-
/* @__PURE__ */
|
|
1813
|
+
/* @__PURE__ */ l(
|
|
1752
1814
|
"video",
|
|
1753
1815
|
{
|
|
1754
1816
|
className: "builder-video",
|
|
@@ -1770,10 +1832,10 @@ function jt(e) {
|
|
|
1770
1832
|
},
|
|
1771
1833
|
src: e.video || "no-src",
|
|
1772
1834
|
poster: e.posterImage,
|
|
1773
|
-
children: e.lazyLoad ? null : /* @__PURE__ */
|
|
1835
|
+
children: e.lazyLoad ? null : /* @__PURE__ */ l("source", { type: "video/mp4", src: e.video })
|
|
1774
1836
|
}
|
|
1775
1837
|
),
|
|
1776
|
-
e.aspectRatio && !(e.fitContent && ((
|
|
1838
|
+
e.aspectRatio && !(e.fitContent && ((r = (o = e.builderBlock) == null ? void 0 : o.children) != null && r.length)) ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
|
|
1777
1839
|
"div",
|
|
1778
1840
|
{
|
|
1779
1841
|
style: {
|
|
@@ -1784,7 +1846,7 @@ function jt(e) {
|
|
|
1784
1846
|
}
|
|
1785
1847
|
}
|
|
1786
1848
|
) }) : null,
|
|
1787
|
-
(c = (
|
|
1849
|
+
(c = (a = e.builderBlock) == null ? void 0 : a.children) != null && c.length && e.fitContent ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
|
|
1788
1850
|
"div",
|
|
1789
1851
|
{
|
|
1790
1852
|
style: {
|
|
@@ -1795,7 +1857,7 @@ function jt(e) {
|
|
|
1795
1857
|
children: e.children
|
|
1796
1858
|
}
|
|
1797
1859
|
) }) : null,
|
|
1798
|
-
(d = (s = e.builderBlock) == null ? void 0 : s.children) != null && d.length && !e.fitContent ? /* @__PURE__ */
|
|
1860
|
+
(d = (s = e.builderBlock) == null ? void 0 : s.children) != null && d.length && !e.fitContent ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
|
|
1799
1861
|
"div",
|
|
1800
1862
|
{
|
|
1801
1863
|
style: {
|
|
@@ -1816,43 +1878,43 @@ function jt(e) {
|
|
|
1816
1878
|
}
|
|
1817
1879
|
);
|
|
1818
1880
|
}
|
|
1819
|
-
const
|
|
1820
|
-
component:
|
|
1821
|
-
...
|
|
1881
|
+
const ye = () => [{
|
|
1882
|
+
component: Ke,
|
|
1883
|
+
...It
|
|
1822
1884
|
}, {
|
|
1823
|
-
component:
|
|
1824
|
-
...
|
|
1885
|
+
component: xt,
|
|
1886
|
+
...Tt
|
|
1825
1887
|
}, {
|
|
1826
|
-
component:
|
|
1827
|
-
...
|
|
1888
|
+
component: Et,
|
|
1889
|
+
...Rt
|
|
1828
1890
|
}, {
|
|
1829
|
-
component:
|
|
1830
|
-
...
|
|
1891
|
+
component: At,
|
|
1892
|
+
...Pt
|
|
1831
1893
|
}, {
|
|
1832
|
-
component:
|
|
1833
|
-
...
|
|
1894
|
+
component: vt,
|
|
1895
|
+
...Nt
|
|
1834
1896
|
}, {
|
|
1835
|
-
component:
|
|
1836
|
-
...
|
|
1897
|
+
component: Ct,
|
|
1898
|
+
...Vt
|
|
1837
1899
|
}, {
|
|
1838
|
-
component:
|
|
1839
|
-
|
|
1900
|
+
component: Ft,
|
|
1901
|
+
...$t
|
|
1840
1902
|
}, {
|
|
1841
|
-
component:
|
|
1842
|
-
...
|
|
1903
|
+
component: wt,
|
|
1904
|
+
...Lt
|
|
1843
1905
|
}, {
|
|
1844
|
-
component:
|
|
1845
|
-
...
|
|
1906
|
+
component: hn,
|
|
1907
|
+
...jt
|
|
1846
1908
|
}, {
|
|
1847
|
-
component:
|
|
1848
|
-
...
|
|
1909
|
+
component: Ut,
|
|
1910
|
+
...Dt
|
|
1849
1911
|
}, {
|
|
1850
|
-
component:
|
|
1851
|
-
...
|
|
1912
|
+
component: Ht,
|
|
1913
|
+
...Mt
|
|
1852
1914
|
}, {
|
|
1853
|
-
component:
|
|
1854
|
-
...
|
|
1855
|
-
}],
|
|
1915
|
+
component: Ot,
|
|
1916
|
+
..._t
|
|
1917
|
+
}], Kt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
1856
1918
|
function getAndSetVariantId() {
|
|
1857
1919
|
function setCookie(name, value, days) {
|
|
1858
1920
|
let expires = '';
|
|
@@ -1908,7 +1970,7 @@ const ge = () => [{
|
|
|
1908
1970
|
}).join('');
|
|
1909
1971
|
styleEl.innerHTML = newStyleStr;
|
|
1910
1972
|
}
|
|
1911
|
-
}`,
|
|
1973
|
+
}`, zt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
1912
1974
|
if (!navigator.cookieEnabled) {
|
|
1913
1975
|
return;
|
|
1914
1976
|
}
|
|
@@ -1942,27 +2004,27 @@ const ge = () => [{
|
|
|
1942
2004
|
thisScriptEl?.remove();
|
|
1943
2005
|
}
|
|
1944
2006
|
return;
|
|
1945
|
-
}`,
|
|
2007
|
+
}`, Be = "builderIoAbTest", We = "builderIoRenderContent", U = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1946
2008
|
...t,
|
|
1947
2009
|
testVariationId: t.id,
|
|
1948
2010
|
id: e == null ? void 0 : e.id
|
|
1949
|
-
})),
|
|
2011
|
+
})), qt = ({
|
|
1950
2012
|
canTrack: e,
|
|
1951
2013
|
content: t
|
|
1952
|
-
}) => !(!(
|
|
1953
|
-
window.${
|
|
1954
|
-
window.${
|
|
1955
|
-
`,
|
|
1956
|
-
window.${
|
|
1957
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
1958
|
-
)`,
|
|
2014
|
+
}) => !(!(U(t).length > 0) || !e || V()), Yt = (e) => e === "react" || e === "reactNative", Ae = Yt($), Qt = () => `
|
|
2015
|
+
window.${Be} = ${Kt}
|
|
2016
|
+
window.${We} = ${zt}
|
|
2017
|
+
`, Gt = (e, t) => `
|
|
2018
|
+
window.${Be}(
|
|
2019
|
+
"${t}",${JSON.stringify(e)}, ${Ae}
|
|
2020
|
+
)`, Jt = ({
|
|
1959
2021
|
contentId: e,
|
|
1960
2022
|
variationId: t
|
|
1961
|
-
}) => `window.${
|
|
1962
|
-
"${t}", "${e}", ${
|
|
2023
|
+
}) => `window.${We}(
|
|
2024
|
+
"${t}", "${e}", ${Ae}
|
|
1963
2025
|
)`;
|
|
1964
|
-
function
|
|
1965
|
-
return /* @__PURE__ */
|
|
2026
|
+
function Z(e) {
|
|
2027
|
+
return /* @__PURE__ */ l(
|
|
1966
2028
|
"script",
|
|
1967
2029
|
{
|
|
1968
2030
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
@@ -1970,15 +2032,15 @@ function J(e) {
|
|
|
1970
2032
|
}
|
|
1971
2033
|
);
|
|
1972
2034
|
}
|
|
1973
|
-
const
|
|
1974
|
-
function
|
|
2035
|
+
const Xt = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
2036
|
+
function Ne(e, t) {
|
|
1975
2037
|
const n = new URL(t.origin), i = n.hostname;
|
|
1976
|
-
return (e ||
|
|
2038
|
+
return (e || Xt).findIndex((o) => o.startsWith("*.") ? i.endsWith(o.slice(1)) : o === i) > -1;
|
|
1977
2039
|
}
|
|
1978
|
-
function
|
|
2040
|
+
function Se(e) {
|
|
1979
2041
|
return Math.round(e * 1e3) / 1e3;
|
|
1980
2042
|
}
|
|
1981
|
-
const
|
|
2043
|
+
const Zt = (e, t, n = !0) => {
|
|
1982
2044
|
if (!(e instanceof HTMLElement))
|
|
1983
2045
|
return null;
|
|
1984
2046
|
let i = n ? e : e.parentElement;
|
|
@@ -1989,20 +2051,20 @@ const Yt = (e, t, n = !0) => {
|
|
|
1989
2051
|
return i;
|
|
1990
2052
|
} while (i = i.parentElement);
|
|
1991
2053
|
return null;
|
|
1992
|
-
},
|
|
2054
|
+
}, en = (e) => Zt(e, (t) => {
|
|
1993
2055
|
const n = t.getAttribute("builder-id") || t.id;
|
|
1994
2056
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
1995
2057
|
}), xe = ({
|
|
1996
2058
|
event: e,
|
|
1997
2059
|
target: t
|
|
1998
2060
|
}) => {
|
|
1999
|
-
const n = t.getBoundingClientRect(), i = e.clientX - n.left,
|
|
2061
|
+
const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, r = Se(i / n.width), a = Se(o / n.height);
|
|
2000
2062
|
return {
|
|
2001
|
-
x:
|
|
2002
|
-
y:
|
|
2063
|
+
x: r,
|
|
2064
|
+
y: a
|
|
2003
2065
|
};
|
|
2004
|
-
},
|
|
2005
|
-
const t = e.target, n = t &&
|
|
2066
|
+
}, tn = (e) => {
|
|
2067
|
+
const t = e.target, n = t && en(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2006
2068
|
return {
|
|
2007
2069
|
targetBuilderElement: i || void 0,
|
|
2008
2070
|
metadata: {
|
|
@@ -2017,8 +2079,8 @@ const Yt = (e, t, n = !0) => {
|
|
|
2017
2079
|
builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
|
|
2018
2080
|
}
|
|
2019
2081
|
};
|
|
2020
|
-
},
|
|
2021
|
-
|
|
2082
|
+
}, nn = "0.12.5", on = () => {
|
|
2083
|
+
_e("insertMenu", {
|
|
2022
2084
|
name: "_default",
|
|
2023
2085
|
default: !0,
|
|
2024
2086
|
items: [{
|
|
@@ -2040,14 +2102,14 @@ const Yt = (e, t, n = !0) => {
|
|
|
2040
2102
|
}]
|
|
2041
2103
|
});
|
|
2042
2104
|
};
|
|
2043
|
-
let
|
|
2044
|
-
const
|
|
2105
|
+
let ve = !1;
|
|
2106
|
+
const an = (e = {}) => {
|
|
2045
2107
|
var t, n;
|
|
2046
|
-
|
|
2108
|
+
ve || (ve = !0, V() && ((t = window.parent) == null || t.postMessage({
|
|
2047
2109
|
type: "builder.sdkInfo",
|
|
2048
2110
|
data: {
|
|
2049
|
-
target:
|
|
2050
|
-
version:
|
|
2111
|
+
target: $,
|
|
2112
|
+
version: nn,
|
|
2051
2113
|
supportsPatchUpdates: !1,
|
|
2052
2114
|
// Supports builder-model="..." attribute which is needed to
|
|
2053
2115
|
// scope our '+ add block' button styling
|
|
@@ -2060,38 +2122,38 @@ const Zt = (e = {}) => {
|
|
|
2060
2122
|
options: e
|
|
2061
2123
|
}
|
|
2062
2124
|
}, "*"), window.addEventListener("message", (i) => {
|
|
2063
|
-
var
|
|
2064
|
-
if (!
|
|
2125
|
+
var r, a;
|
|
2126
|
+
if (!Ne(e.trustedHosts, i))
|
|
2065
2127
|
return;
|
|
2066
2128
|
const {
|
|
2067
|
-
data:
|
|
2129
|
+
data: o
|
|
2068
2130
|
} = i;
|
|
2069
|
-
if (
|
|
2070
|
-
switch (
|
|
2131
|
+
if (o != null && o.type)
|
|
2132
|
+
switch (o.type) {
|
|
2071
2133
|
case "builder.evaluate": {
|
|
2072
|
-
const c =
|
|
2073
|
-
let g,
|
|
2134
|
+
const c = o.data.text, s = o.data.arguments || [], d = o.data.id, m = new Function(c);
|
|
2135
|
+
let g, k = null;
|
|
2074
2136
|
try {
|
|
2075
2137
|
g = m.apply(null, s);
|
|
2076
|
-
} catch (
|
|
2077
|
-
|
|
2138
|
+
} catch (S) {
|
|
2139
|
+
k = S;
|
|
2078
2140
|
}
|
|
2079
|
-
|
|
2141
|
+
k ? (r = window.parent) == null || r.postMessage({
|
|
2080
2142
|
type: "builder.evaluateError",
|
|
2081
2143
|
data: {
|
|
2082
2144
|
id: d,
|
|
2083
|
-
error:
|
|
2145
|
+
error: k.message
|
|
2084
2146
|
}
|
|
2085
|
-
}, "*") : g && typeof g.then == "function" ? g.then((
|
|
2086
|
-
var
|
|
2087
|
-
(
|
|
2147
|
+
}, "*") : g && typeof g.then == "function" ? g.then((S) => {
|
|
2148
|
+
var x;
|
|
2149
|
+
(x = window.parent) == null || x.postMessage({
|
|
2088
2150
|
type: "builder.evaluateResult",
|
|
2089
2151
|
data: {
|
|
2090
2152
|
id: d,
|
|
2091
|
-
result:
|
|
2153
|
+
result: S
|
|
2092
2154
|
}
|
|
2093
2155
|
}, "*");
|
|
2094
|
-
}).catch(console.error) : (
|
|
2156
|
+
}).catch(console.error) : (a = window.parent) == null || a.postMessage({
|
|
2095
2157
|
type: "builder.evaluateResult",
|
|
2096
2158
|
data: {
|
|
2097
2159
|
result: g,
|
|
@@ -2103,23 +2165,23 @@ const Zt = (e = {}) => {
|
|
|
2103
2165
|
}
|
|
2104
2166
|
})));
|
|
2105
2167
|
};
|
|
2106
|
-
function
|
|
2107
|
-
var
|
|
2108
|
-
const t =
|
|
2109
|
-
|
|
2110
|
-
function
|
|
2111
|
-
var b,
|
|
2168
|
+
function rn(e) {
|
|
2169
|
+
var L, Q, G, ae, re, le, ce;
|
|
2170
|
+
const t = ee(null), [n, i] = v(() => 0);
|
|
2171
|
+
v(() => !0);
|
|
2172
|
+
function o(u) {
|
|
2173
|
+
var b, y;
|
|
2112
2174
|
const f = {
|
|
2113
2175
|
...e.builderContextSignal.rootState,
|
|
2114
2176
|
...u
|
|
2115
2177
|
};
|
|
2116
|
-
e.builderContextSignal.rootSetState ? (
|
|
2178
|
+
e.builderContextSignal.rootSetState ? (y = (b = e.builderContextSignal).rootSetState) == null || y.call(b, f) : e.setBuilderContextSignal((p) => ({
|
|
2117
2179
|
...p,
|
|
2118
2180
|
rootState: f
|
|
2119
2181
|
}));
|
|
2120
2182
|
}
|
|
2121
|
-
function
|
|
2122
|
-
var b,
|
|
2183
|
+
function r(u) {
|
|
2184
|
+
var b, y, p, T, D;
|
|
2123
2185
|
const f = {
|
|
2124
2186
|
...e.builderContextSignal.content,
|
|
2125
2187
|
...u,
|
|
@@ -2128,34 +2190,34 @@ function en(e) {
|
|
|
2128
2190
|
...u == null ? void 0 : u.data
|
|
2129
2191
|
},
|
|
2130
2192
|
meta: {
|
|
2131
|
-
...(
|
|
2193
|
+
...(y = e.builderContextSignal.content) == null ? void 0 : y.meta,
|
|
2132
2194
|
...u == null ? void 0 : u.meta,
|
|
2133
|
-
breakpoints: ((p = u == null ? void 0 : u.meta) == null ? void 0 : p.breakpoints) || ((
|
|
2195
|
+
breakpoints: ((p = u == null ? void 0 : u.meta) == null ? void 0 : p.breakpoints) || ((D = (T = e.builderContextSignal.content) == null ? void 0 : T.meta) == null ? void 0 : D.breakpoints)
|
|
2134
2196
|
}
|
|
2135
2197
|
};
|
|
2136
|
-
e.setBuilderContextSignal((
|
|
2137
|
-
|
|
2198
|
+
e.setBuilderContextSignal(($e) => ({
|
|
2199
|
+
...$e,
|
|
2138
2200
|
content: f
|
|
2139
2201
|
}));
|
|
2140
2202
|
}
|
|
2141
|
-
|
|
2142
|
-
const [
|
|
2203
|
+
v(() => 0);
|
|
2204
|
+
const [a, c] = v(
|
|
2143
2205
|
() => !1
|
|
2144
|
-
), [s, d] =
|
|
2206
|
+
), [s, d] = v(
|
|
2145
2207
|
() => e.contentWrapper || "div"
|
|
2146
2208
|
);
|
|
2147
2209
|
function m(u) {
|
|
2148
2210
|
var b;
|
|
2149
|
-
if (!
|
|
2211
|
+
if (!Ne(e.trustedHosts, u))
|
|
2150
2212
|
return;
|
|
2151
2213
|
const { data: f } = u;
|
|
2152
2214
|
if (f)
|
|
2153
2215
|
switch (f.type) {
|
|
2154
2216
|
case "builder.configureSdk": {
|
|
2155
|
-
const
|
|
2217
|
+
const y = f.data, { breakpoints: p, contentId: T } = y;
|
|
2156
2218
|
if (!T || T !== ((b = e.builderContextSignal.content) == null ? void 0 : b.id))
|
|
2157
2219
|
return;
|
|
2158
|
-
p &&
|
|
2220
|
+
p && r({
|
|
2159
2221
|
meta: {
|
|
2160
2222
|
breakpoints: p
|
|
2161
2223
|
}
|
|
@@ -2163,8 +2225,8 @@ function en(e) {
|
|
|
2163
2225
|
break;
|
|
2164
2226
|
}
|
|
2165
2227
|
case "builder.contentUpdate": {
|
|
2166
|
-
const
|
|
2167
|
-
p === e.model && (
|
|
2228
|
+
const y = f.data, p = y.key || y.alias || y.entry || y.modelName, T = y.data;
|
|
2229
|
+
p === e.model && (r(T), i(n + 1));
|
|
2168
2230
|
break;
|
|
2169
2231
|
}
|
|
2170
2232
|
}
|
|
@@ -2172,7 +2234,7 @@ function en(e) {
|
|
|
2172
2234
|
function g() {
|
|
2173
2235
|
var f, b;
|
|
2174
2236
|
const u = (b = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : b.jsCode;
|
|
2175
|
-
u &&
|
|
2237
|
+
u && j({
|
|
2176
2238
|
code: u,
|
|
2177
2239
|
context: e.context || {},
|
|
2178
2240
|
localState: void 0,
|
|
@@ -2180,27 +2242,27 @@ function en(e) {
|
|
|
2180
2242
|
rootSetState: e.builderContextSignal.rootSetState
|
|
2181
2243
|
});
|
|
2182
2244
|
}
|
|
2183
|
-
const [
|
|
2245
|
+
const [k, S] = v(() => ({})), [x, C] = v(() => !1);
|
|
2184
2246
|
function R(u) {
|
|
2185
2247
|
var f, b;
|
|
2186
2248
|
if (e.builderContextSignal.content) {
|
|
2187
|
-
const
|
|
2188
|
-
|
|
2249
|
+
const y = (f = e.builderContextSignal.content) == null ? void 0 : f.testVariationId, p = (b = e.builderContextSignal.content) == null ? void 0 : b.id;
|
|
2250
|
+
de({
|
|
2189
2251
|
type: "click",
|
|
2190
|
-
canTrack:
|
|
2252
|
+
canTrack: H(e.canTrack),
|
|
2191
2253
|
contentId: p,
|
|
2192
2254
|
apiKey: e.apiKey,
|
|
2193
|
-
variationId:
|
|
2194
|
-
...
|
|
2195
|
-
unique: !
|
|
2255
|
+
variationId: y !== p ? y : void 0,
|
|
2256
|
+
...tn(u),
|
|
2257
|
+
unique: !x
|
|
2196
2258
|
});
|
|
2197
2259
|
}
|
|
2198
|
-
|
|
2260
|
+
x || C(!0);
|
|
2199
2261
|
}
|
|
2200
|
-
function
|
|
2262
|
+
function B(u) {
|
|
2201
2263
|
return u.replace(
|
|
2202
2264
|
/{{([^}]+)}}/g,
|
|
2203
|
-
(f, b) =>
|
|
2265
|
+
(f, b) => j({
|
|
2204
2266
|
code: b,
|
|
2205
2267
|
context: e.context || {},
|
|
2206
2268
|
localState: void 0,
|
|
@@ -2210,37 +2272,37 @@ function en(e) {
|
|
|
2210
2272
|
);
|
|
2211
2273
|
}
|
|
2212
2274
|
function w({ url: u, key: f }) {
|
|
2213
|
-
|
|
2275
|
+
De(u).then((b) => b.json()).then((b) => {
|
|
2214
2276
|
var p, T;
|
|
2215
|
-
const
|
|
2277
|
+
const y = {
|
|
2216
2278
|
...e.builderContextSignal.rootState,
|
|
2217
2279
|
[f]: b
|
|
2218
2280
|
};
|
|
2219
|
-
(T = (p = e.builderContextSignal).rootSetState) == null || T.call(p,
|
|
2281
|
+
(T = (p = e.builderContextSignal).rootSetState) == null || T.call(p, y), k[f] = !0;
|
|
2220
2282
|
}).catch((b) => {
|
|
2221
2283
|
console.error("error fetching dynamic data", u, b);
|
|
2222
2284
|
});
|
|
2223
2285
|
}
|
|
2224
2286
|
function I() {
|
|
2225
|
-
var f, b,
|
|
2226
|
-
const u = (
|
|
2287
|
+
var f, b, y;
|
|
2288
|
+
const u = (y = (b = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : b.httpRequests) != null ? y : {};
|
|
2227
2289
|
Object.entries(u).forEach(([p, T]) => {
|
|
2228
|
-
if (T && (!
|
|
2229
|
-
const
|
|
2290
|
+
if (T && (!k[p] || N())) {
|
|
2291
|
+
const D = B(T);
|
|
2230
2292
|
w({
|
|
2231
|
-
url:
|
|
2293
|
+
url: D,
|
|
2232
2294
|
key: p
|
|
2233
2295
|
});
|
|
2234
2296
|
}
|
|
2235
2297
|
});
|
|
2236
2298
|
}
|
|
2237
|
-
function
|
|
2238
|
-
|
|
2299
|
+
function P() {
|
|
2300
|
+
N() && window.dispatchEvent(
|
|
2239
2301
|
new CustomEvent(
|
|
2240
2302
|
"builder:component:stateChange",
|
|
2241
2303
|
{
|
|
2242
2304
|
detail: {
|
|
2243
|
-
state:
|
|
2305
|
+
state: te(e.builderContextSignal.rootState),
|
|
2244
2306
|
ref: {
|
|
2245
2307
|
name: e.model
|
|
2246
2308
|
}
|
|
@@ -2249,8 +2311,8 @@ function en(e) {
|
|
|
2249
2311
|
)
|
|
2250
2312
|
);
|
|
2251
2313
|
}
|
|
2252
|
-
function
|
|
2253
|
-
i(n + 1), window.addEventListener("message", m),
|
|
2314
|
+
function W(u) {
|
|
2315
|
+
i(n + 1), window.addEventListener("message", m), on(), an({
|
|
2254
2316
|
...e.locale ? {
|
|
2255
2317
|
locale: e.locale
|
|
2256
2318
|
} : {},
|
|
@@ -2266,115 +2328,115 @@ function en(e) {
|
|
|
2266
2328
|
}), Object.values(
|
|
2267
2329
|
e.builderContextSignal.componentInfos
|
|
2268
2330
|
).forEach((f) => {
|
|
2269
|
-
var
|
|
2270
|
-
const b =
|
|
2271
|
-
(
|
|
2331
|
+
var y;
|
|
2332
|
+
const b = je(f);
|
|
2333
|
+
(y = window.parent) == null || y.postMessage(b, "*");
|
|
2272
2334
|
}), window.addEventListener(
|
|
2273
2335
|
"builder:component:stateChangeListenerActivated",
|
|
2274
|
-
|
|
2336
|
+
P
|
|
2275
2337
|
);
|
|
2276
2338
|
}
|
|
2277
|
-
function
|
|
2278
|
-
const f = new URL(location.href).searchParams, b = f.get("builder.preview"),
|
|
2339
|
+
function F(u) {
|
|
2340
|
+
const f = new URL(location.href).searchParams, b = f.get("builder.preview"), y = f.get(
|
|
2279
2341
|
`builder.preview.${b}`
|
|
2280
2342
|
), p = f.get("apiKey") || f.get("builder.space");
|
|
2281
|
-
b === e.model && p === e.apiKey && (!e.content ||
|
|
2343
|
+
b === e.model && p === e.apiKey && (!e.content || y === e.content.id) && Ce({
|
|
2282
2344
|
model: e.model,
|
|
2283
2345
|
apiKey: e.apiKey,
|
|
2284
2346
|
apiVersion: e.builderContextSignal.apiVersion
|
|
2285
2347
|
}).then((T) => {
|
|
2286
|
-
T &&
|
|
2348
|
+
T && r(T);
|
|
2287
2349
|
});
|
|
2288
2350
|
}
|
|
2289
2351
|
return E(() => {
|
|
2290
2352
|
var u;
|
|
2291
2353
|
return (u = t.current) == null || u.addEventListener(
|
|
2292
2354
|
"initeditingbldr",
|
|
2293
|
-
|
|
2355
|
+
W
|
|
2294
2356
|
), () => {
|
|
2295
2357
|
var f;
|
|
2296
2358
|
return (f = t.current) == null ? void 0 : f.removeEventListener(
|
|
2297
2359
|
"initeditingbldr",
|
|
2298
|
-
|
|
2360
|
+
W
|
|
2299
2361
|
);
|
|
2300
2362
|
};
|
|
2301
2363
|
}, []), E(() => {
|
|
2302
2364
|
var u;
|
|
2303
2365
|
return (u = t.current) == null || u.addEventListener(
|
|
2304
2366
|
"initpreviewingbldr",
|
|
2305
|
-
|
|
2367
|
+
F
|
|
2306
2368
|
), () => {
|
|
2307
2369
|
var f;
|
|
2308
2370
|
return (f = t.current) == null ? void 0 : f.removeEventListener(
|
|
2309
2371
|
"initpreviewingbldr",
|
|
2310
|
-
|
|
2372
|
+
F
|
|
2311
2373
|
);
|
|
2312
2374
|
};
|
|
2313
2375
|
}, []), E(() => {
|
|
2314
2376
|
var u, f;
|
|
2315
|
-
if (
|
|
2316
|
-
if (
|
|
2317
|
-
const
|
|
2318
|
-
|
|
2377
|
+
if (V()) {
|
|
2378
|
+
if (N() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && H(e.canTrack)) {
|
|
2379
|
+
const y = (u = e.builderContextSignal.content) == null ? void 0 : u.testVariationId, p = (f = e.builderContextSignal.content) == null ? void 0 : f.id, T = e.apiKey;
|
|
2380
|
+
de({
|
|
2319
2381
|
type: "impression",
|
|
2320
2382
|
canTrack: !0,
|
|
2321
2383
|
contentId: p,
|
|
2322
2384
|
apiKey: T,
|
|
2323
|
-
variationId:
|
|
2385
|
+
variationId: y !== p ? y : void 0
|
|
2324
2386
|
});
|
|
2325
2387
|
}
|
|
2326
|
-
|
|
2388
|
+
Oe() && t.current && t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"));
|
|
2327
2389
|
}
|
|
2328
2390
|
}, []), E(() => {
|
|
2329
|
-
e.apiKey ||
|
|
2391
|
+
e.apiKey || _.error(
|
|
2330
2392
|
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2331
|
-
), g(), I(),
|
|
2393
|
+
), g(), I(), P();
|
|
2332
2394
|
}, []), E(() => {
|
|
2333
|
-
e.content &&
|
|
2395
|
+
e.content && r(e.content);
|
|
2334
2396
|
}, [e.content]), E(() => {
|
|
2335
|
-
}, [
|
|
2397
|
+
}, [a]), E(() => {
|
|
2336
2398
|
g();
|
|
2337
2399
|
}, [
|
|
2338
|
-
(
|
|
2400
|
+
(Q = (L = e.builderContextSignal.content) == null ? void 0 : L.data) == null ? void 0 : Q.jsCode,
|
|
2339
2401
|
e.builderContextSignal.rootState
|
|
2340
2402
|
]), E(() => {
|
|
2341
2403
|
I();
|
|
2342
|
-
}, [(
|
|
2343
|
-
|
|
2404
|
+
}, [(ae = (G = e.builderContextSignal.content) == null ? void 0 : G.data) == null ? void 0 : ae.httpRequests]), E(() => {
|
|
2405
|
+
P();
|
|
2344
2406
|
}, [e.builderContextSignal.rootState]), E(() => {
|
|
2345
|
-
e.data &&
|
|
2407
|
+
e.data && o(e.data);
|
|
2346
2408
|
}, [e.data]), E(() => {
|
|
2347
|
-
e.locale &&
|
|
2409
|
+
e.locale && o({
|
|
2348
2410
|
locale: e.locale
|
|
2349
2411
|
});
|
|
2350
2412
|
}, [e.locale]), E(() => () => {
|
|
2351
|
-
|
|
2413
|
+
V() && (window.removeEventListener("message", m), window.removeEventListener(
|
|
2352
2414
|
"builder:component:stateChangeListenerActivated",
|
|
2353
|
-
|
|
2415
|
+
P
|
|
2354
2416
|
));
|
|
2355
|
-
}, []), /* @__PURE__ */
|
|
2417
|
+
}, []), /* @__PURE__ */ l(ie.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ Fe(
|
|
2356
2418
|
s,
|
|
2357
2419
|
{
|
|
2358
2420
|
key: n,
|
|
2359
2421
|
ref: t,
|
|
2360
2422
|
onClick: (u) => R(u),
|
|
2361
|
-
"builder-content-id": (
|
|
2423
|
+
"builder-content-id": (re = e.builderContextSignal.content) == null ? void 0 : re.id,
|
|
2362
2424
|
"builder-model": e.model,
|
|
2363
2425
|
...e.showContent ? {} : {
|
|
2364
2426
|
hidden: !0,
|
|
2365
2427
|
"aria-hidden": !0
|
|
2366
2428
|
},
|
|
2367
2429
|
...e.contentWrapperProps,
|
|
2368
|
-
className: `variant-${((
|
|
2430
|
+
className: `variant-${((le = e.content) == null ? void 0 : le.testVariationId) || ((ce = e.content) == null ? void 0 : ce.id)}`
|
|
2369
2431
|
},
|
|
2370
2432
|
e.children
|
|
2371
2433
|
) }) : null });
|
|
2372
2434
|
}
|
|
2373
|
-
const
|
|
2374
|
-
var
|
|
2375
|
-
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (
|
|
2376
|
-
let
|
|
2377
|
-
if (i && t && n && (
|
|
2435
|
+
const ln = (e) => {
|
|
2436
|
+
var r, a;
|
|
2437
|
+
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (r = e == null ? void 0 : e.files) == null ? void 0 : r.regular;
|
|
2438
|
+
let o = "";
|
|
2439
|
+
if (i && t && n && (o += `
|
|
2378
2440
|
@font-face {
|
|
2379
2441
|
font-family: "${t}";
|
|
2380
2442
|
src: local("${n}"), url('${i}') format('woff2');
|
|
@@ -2386,7 +2448,7 @@ font-weight: 400;
|
|
|
2386
2448
|
if (!(String(Number(c)) === c))
|
|
2387
2449
|
continue;
|
|
2388
2450
|
const d = e.files[c];
|
|
2389
|
-
d && d !== i && (
|
|
2451
|
+
d && d !== i && (o += `
|
|
2390
2452
|
@font-face {
|
|
2391
2453
|
font-family: "${t}";
|
|
2392
2454
|
src: url('${d}') format('woff2');
|
|
@@ -2395,24 +2457,24 @@ font-weight: ${c};
|
|
|
2395
2457
|
}
|
|
2396
2458
|
`.trim());
|
|
2397
2459
|
}
|
|
2398
|
-
return
|
|
2399
|
-
},
|
|
2460
|
+
return o;
|
|
2461
|
+
}, cn = ({
|
|
2400
2462
|
customFonts: e
|
|
2401
2463
|
}) => {
|
|
2402
2464
|
var t;
|
|
2403
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
2404
|
-
},
|
|
2465
|
+
return ((t = e == null ? void 0 : e.map((n) => ln(n))) == null ? void 0 : t.join(" ")) || "";
|
|
2466
|
+
}, sn = ({
|
|
2405
2467
|
cssCode: e,
|
|
2406
2468
|
contentId: t
|
|
2407
2469
|
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
|
|
2408
|
-
function
|
|
2409
|
-
const [t, n] =
|
|
2470
|
+
function dn(e) {
|
|
2471
|
+
const [t, n] = v(
|
|
2410
2472
|
() => `
|
|
2411
|
-
${
|
|
2473
|
+
${sn({
|
|
2412
2474
|
cssCode: e.cssCode,
|
|
2413
2475
|
contentId: e.contentId
|
|
2414
2476
|
})}
|
|
2415
|
-
${
|
|
2477
|
+
${cn({
|
|
2416
2478
|
customFonts: e.customFonts
|
|
2417
2479
|
})}
|
|
2418
2480
|
|
|
@@ -2434,26 +2496,26 @@ ${nn({
|
|
|
2434
2496
|
}
|
|
2435
2497
|
`.trim()
|
|
2436
2498
|
);
|
|
2437
|
-
return /* @__PURE__ */
|
|
2499
|
+
return /* @__PURE__ */ l(z, { styles: t });
|
|
2438
2500
|
}
|
|
2439
|
-
const
|
|
2501
|
+
const un = ({
|
|
2440
2502
|
content: e,
|
|
2441
2503
|
data: t,
|
|
2442
2504
|
locale: n
|
|
2443
2505
|
}) => {
|
|
2444
|
-
var
|
|
2445
|
-
const i = {},
|
|
2446
|
-
return (c = (
|
|
2506
|
+
var r, a, c;
|
|
2507
|
+
const i = {}, o = ((r = e == null ? void 0 : e.data) == null ? void 0 : r.state) || {};
|
|
2508
|
+
return (c = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || c.forEach((s) => {
|
|
2447
2509
|
s.name && s.defaultValue !== void 0 && (i[s.name] = s.defaultValue);
|
|
2448
2510
|
}), {
|
|
2449
2511
|
...i,
|
|
2450
|
-
...
|
|
2512
|
+
...o,
|
|
2451
2513
|
...t,
|
|
2452
2514
|
...n ? {
|
|
2453
2515
|
locale: n
|
|
2454
2516
|
} : {}
|
|
2455
2517
|
};
|
|
2456
|
-
},
|
|
2518
|
+
}, mn = ({
|
|
2457
2519
|
content: e,
|
|
2458
2520
|
data: t
|
|
2459
2521
|
}) => e ? {
|
|
@@ -2464,12 +2526,12 @@ const rn = ({
|
|
|
2464
2526
|
},
|
|
2465
2527
|
meta: e == null ? void 0 : e.meta
|
|
2466
2528
|
} : void 0;
|
|
2467
|
-
function
|
|
2468
|
-
var s, d, m, g,
|
|
2469
|
-
const [t, n] =
|
|
2529
|
+
function ke(e) {
|
|
2530
|
+
var s, d, m, g, k, S, x;
|
|
2531
|
+
const [t, n] = v(
|
|
2470
2532
|
() => {
|
|
2471
2533
|
var C, R;
|
|
2472
|
-
return
|
|
2534
|
+
return Jt({
|
|
2473
2535
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2474
2536
|
variationId: (C = e.content) == null ? void 0 : C.testVariationId,
|
|
2475
2537
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
@@ -2483,33 +2545,33 @@ function Se(e) {
|
|
|
2483
2545
|
rootState: C
|
|
2484
2546
|
}));
|
|
2485
2547
|
}
|
|
2486
|
-
const [
|
|
2548
|
+
const [o, r] = v(
|
|
2487
2549
|
() => [
|
|
2488
|
-
...
|
|
2550
|
+
...ye(),
|
|
2489
2551
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
2490
2552
|
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
2491
2553
|
// existing usage.
|
|
2492
2554
|
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
2493
2555
|
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
2494
|
-
...
|
|
2556
|
+
...ue,
|
|
2495
2557
|
...e.customComponents || []
|
|
2496
2558
|
].reduce(
|
|
2497
|
-
(C, { component: R, ...
|
|
2559
|
+
(C, { component: R, ...B }) => ({
|
|
2498
2560
|
...C,
|
|
2499
|
-
[
|
|
2561
|
+
[B.name]: {
|
|
2500
2562
|
component: R,
|
|
2501
|
-
...
|
|
2563
|
+
...me(B)
|
|
2502
2564
|
}
|
|
2503
2565
|
}),
|
|
2504
2566
|
{}
|
|
2505
2567
|
)
|
|
2506
|
-
), [
|
|
2507
|
-
content:
|
|
2568
|
+
), [a, c] = v(() => ({
|
|
2569
|
+
content: mn({
|
|
2508
2570
|
content: e.content,
|
|
2509
2571
|
data: e.data
|
|
2510
2572
|
}),
|
|
2511
2573
|
localState: void 0,
|
|
2512
|
-
rootState:
|
|
2574
|
+
rootState: un({
|
|
2513
2575
|
content: e.content,
|
|
2514
2576
|
data: e.data,
|
|
2515
2577
|
locale: e.locale
|
|
@@ -2519,18 +2581,18 @@ function Se(e) {
|
|
|
2519
2581
|
apiKey: e.apiKey,
|
|
2520
2582
|
apiVersion: e.apiVersion,
|
|
2521
2583
|
componentInfos: [
|
|
2522
|
-
...
|
|
2584
|
+
...ye(),
|
|
2523
2585
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
2524
2586
|
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
2525
2587
|
// existing usage.
|
|
2526
2588
|
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
2527
2589
|
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
2528
|
-
...
|
|
2590
|
+
...ue,
|
|
2529
2591
|
...e.customComponents || []
|
|
2530
2592
|
].reduce(
|
|
2531
|
-
(C, { component: R, ...
|
|
2593
|
+
(C, { component: R, ...B }) => ({
|
|
2532
2594
|
...C,
|
|
2533
|
-
[
|
|
2595
|
+
[B.name]: me(B)
|
|
2534
2596
|
}),
|
|
2535
2597
|
{}
|
|
2536
2598
|
),
|
|
@@ -2538,14 +2600,14 @@ function Se(e) {
|
|
|
2538
2600
|
BlocksWrapper: e.blocksWrapper || "div",
|
|
2539
2601
|
BlocksWrapperProps: e.blocksWrapperProps || {}
|
|
2540
2602
|
}));
|
|
2541
|
-
return /* @__PURE__ */
|
|
2542
|
-
|
|
2603
|
+
return /* @__PURE__ */ l(
|
|
2604
|
+
we.Provider,
|
|
2543
2605
|
{
|
|
2544
2606
|
value: {
|
|
2545
|
-
registeredComponents:
|
|
2607
|
+
registeredComponents: o
|
|
2546
2608
|
},
|
|
2547
|
-
children: /* @__PURE__ */
|
|
2548
|
-
|
|
2609
|
+
children: /* @__PURE__ */ A(
|
|
2610
|
+
rn,
|
|
2549
2611
|
{
|
|
2550
2612
|
content: e.content,
|
|
2551
2613
|
data: e.data,
|
|
@@ -2557,27 +2619,29 @@ function Se(e) {
|
|
|
2557
2619
|
includeRefs: e.includeRefs,
|
|
2558
2620
|
enrich: e.enrich,
|
|
2559
2621
|
showContent: e.showContent,
|
|
2560
|
-
builderContextSignal:
|
|
2622
|
+
builderContextSignal: a,
|
|
2561
2623
|
contentWrapper: e.contentWrapper,
|
|
2562
2624
|
contentWrapperProps: e.contentWrapperProps,
|
|
2625
|
+
linkComponent: e.linkComponent,
|
|
2563
2626
|
trustedHosts: e.trustedHosts,
|
|
2564
2627
|
setBuilderContextSignal: c,
|
|
2565
2628
|
children: [
|
|
2566
|
-
e.isSsrAbTest ? /* @__PURE__ */
|
|
2567
|
-
/* @__PURE__ */
|
|
2568
|
-
|
|
2629
|
+
e.isSsrAbTest ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(Z, { scriptStr: t }) }) : null,
|
|
2630
|
+
/* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(
|
|
2631
|
+
dn,
|
|
2569
2632
|
{
|
|
2570
|
-
contentId: (s =
|
|
2571
|
-
cssCode: (m = (d =
|
|
2572
|
-
customFonts: (
|
|
2633
|
+
contentId: (s = a.content) == null ? void 0 : s.id,
|
|
2634
|
+
cssCode: (m = (d = a.content) == null ? void 0 : d.data) == null ? void 0 : m.cssCode,
|
|
2635
|
+
customFonts: (k = (g = a.content) == null ? void 0 : g.data) == null ? void 0 : k.customFonts
|
|
2573
2636
|
}
|
|
2574
2637
|
) }),
|
|
2575
|
-
/* @__PURE__ */
|
|
2576
|
-
|
|
2638
|
+
/* @__PURE__ */ l(
|
|
2639
|
+
Y,
|
|
2577
2640
|
{
|
|
2578
|
-
blocks: (
|
|
2579
|
-
context:
|
|
2580
|
-
registeredComponents:
|
|
2641
|
+
blocks: (x = (S = a.content) == null ? void 0 : S.data) == null ? void 0 : x.blocks,
|
|
2642
|
+
context: a,
|
|
2643
|
+
registeredComponents: o,
|
|
2644
|
+
linkComponent: e.linkComponent
|
|
2581
2645
|
}
|
|
2582
2646
|
)
|
|
2583
2647
|
]
|
|
@@ -2586,51 +2650,51 @@ function Se(e) {
|
|
|
2586
2650
|
}
|
|
2587
2651
|
);
|
|
2588
2652
|
}
|
|
2589
|
-
function
|
|
2590
|
-
var
|
|
2591
|
-
const [t, n] =
|
|
2592
|
-
() =>
|
|
2593
|
-
canTrack:
|
|
2653
|
+
function Ve(e) {
|
|
2654
|
+
var a, c;
|
|
2655
|
+
const [t, n] = v(
|
|
2656
|
+
() => qt({
|
|
2657
|
+
canTrack: H(e.canTrack),
|
|
2594
2658
|
content: e.content
|
|
2595
2659
|
})
|
|
2596
2660
|
);
|
|
2597
2661
|
function i() {
|
|
2598
2662
|
var s;
|
|
2599
|
-
return
|
|
2600
|
-
|
|
2663
|
+
return Gt(
|
|
2664
|
+
U(e.content).map((d) => ({
|
|
2601
2665
|
id: d.testVariationId,
|
|
2602
2666
|
testRatio: d.testRatio
|
|
2603
2667
|
})),
|
|
2604
2668
|
((s = e.content) == null ? void 0 : s.id) || ""
|
|
2605
2669
|
);
|
|
2606
2670
|
}
|
|
2607
|
-
function
|
|
2608
|
-
return
|
|
2671
|
+
function o() {
|
|
2672
|
+
return U(e.content).map((s) => `.variant-${s.testVariationId} { display: none; } `).join("");
|
|
2609
2673
|
}
|
|
2610
|
-
function
|
|
2674
|
+
function r() {
|
|
2611
2675
|
var s;
|
|
2612
2676
|
return t ? {
|
|
2613
2677
|
...e.content,
|
|
2614
2678
|
testVariationId: (s = e.content) == null ? void 0 : s.id
|
|
2615
|
-
} :
|
|
2679
|
+
} : Ue({
|
|
2616
2680
|
item: e.content,
|
|
2617
|
-
canTrack:
|
|
2681
|
+
canTrack: H(e.canTrack)
|
|
2618
2682
|
});
|
|
2619
2683
|
}
|
|
2620
2684
|
return E(() => {
|
|
2621
|
-
}, []), /* @__PURE__ */
|
|
2622
|
-
!e.__isNestedRender &&
|
|
2623
|
-
t ? /* @__PURE__ */
|
|
2624
|
-
/* @__PURE__ */
|
|
2625
|
-
|
|
2685
|
+
}, []), /* @__PURE__ */ A(h, { children: [
|
|
2686
|
+
!e.__isNestedRender && $ !== "reactNative" ? /* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(Z, { scriptStr: Qt() }) }) : null,
|
|
2687
|
+
t ? /* @__PURE__ */ A(h, { children: [
|
|
2688
|
+
/* @__PURE__ */ l(
|
|
2689
|
+
z,
|
|
2626
2690
|
{
|
|
2627
|
-
id: `variants-styles-${(
|
|
2628
|
-
styles:
|
|
2691
|
+
id: `variants-styles-${(a = e.content) == null ? void 0 : a.id}`,
|
|
2692
|
+
styles: o()
|
|
2629
2693
|
}
|
|
2630
2694
|
),
|
|
2631
|
-
/* @__PURE__ */
|
|
2632
|
-
(c =
|
|
2633
|
-
|
|
2695
|
+
/* @__PURE__ */ l(Z, { scriptStr: i() }),
|
|
2696
|
+
(c = U(e.content)) == null ? void 0 : c.map((s) => /* @__PURE__ */ l(
|
|
2697
|
+
ke,
|
|
2634
2698
|
{
|
|
2635
2699
|
content: s,
|
|
2636
2700
|
showContent: !1,
|
|
@@ -2640,6 +2704,7 @@ function Ae(e) {
|
|
|
2640
2704
|
apiKey: e.apiKey,
|
|
2641
2705
|
apiVersion: e.apiVersion,
|
|
2642
2706
|
customComponents: e.customComponents,
|
|
2707
|
+
linkComponent: e.linkComponent,
|
|
2643
2708
|
canTrack: e.canTrack,
|
|
2644
2709
|
locale: e.locale,
|
|
2645
2710
|
includeRefs: e.includeRefs,
|
|
@@ -2654,10 +2719,10 @@ function Ae(e) {
|
|
|
2654
2719
|
s.testVariationId
|
|
2655
2720
|
))
|
|
2656
2721
|
] }) : null,
|
|
2657
|
-
/* @__PURE__ */
|
|
2658
|
-
|
|
2722
|
+
/* @__PURE__ */ l(
|
|
2723
|
+
ke,
|
|
2659
2724
|
{
|
|
2660
|
-
content:
|
|
2725
|
+
content: r(),
|
|
2661
2726
|
showContent: !0,
|
|
2662
2727
|
model: e.model,
|
|
2663
2728
|
data: e.data,
|
|
@@ -2665,6 +2730,7 @@ function Ae(e) {
|
|
|
2665
2730
|
apiKey: e.apiKey,
|
|
2666
2731
|
apiVersion: e.apiVersion,
|
|
2667
2732
|
customComponents: e.customComponents,
|
|
2733
|
+
linkComponent: e.linkComponent,
|
|
2668
2734
|
canTrack: e.canTrack,
|
|
2669
2735
|
locale: e.locale,
|
|
2670
2736
|
includeRefs: e.includeRefs,
|
|
@@ -2679,13 +2745,13 @@ function Ae(e) {
|
|
|
2679
2745
|
)
|
|
2680
2746
|
] });
|
|
2681
2747
|
}
|
|
2682
|
-
const
|
|
2748
|
+
const fn = async ({
|
|
2683
2749
|
builderContextValue: e,
|
|
2684
2750
|
symbol: t
|
|
2685
2751
|
}) => {
|
|
2686
2752
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
2687
2753
|
(e != null && e.apiKey))
|
|
2688
|
-
return
|
|
2754
|
+
return Ce({
|
|
2689
2755
|
model: t.model,
|
|
2690
2756
|
apiKey: e.apiKey,
|
|
2691
2757
|
apiVersion: e.apiVersion,
|
|
@@ -2695,26 +2761,26 @@ const cn = async ({
|
|
|
2695
2761
|
}
|
|
2696
2762
|
}
|
|
2697
2763
|
}).catch((n) => {
|
|
2698
|
-
|
|
2764
|
+
_.error("Could not fetch symbol content: ", n);
|
|
2699
2765
|
});
|
|
2700
2766
|
};
|
|
2701
|
-
function
|
|
2702
|
-
var
|
|
2767
|
+
function hn(e) {
|
|
2768
|
+
var r, a, c, s;
|
|
2703
2769
|
function t() {
|
|
2704
2770
|
var d, m;
|
|
2705
2771
|
return [
|
|
2706
|
-
e.attributes
|
|
2772
|
+
e.attributes[O()],
|
|
2707
2773
|
"builder-symbol",
|
|
2708
2774
|
(d = e.symbol) != null && d.inline ? "builder-inline-symbol" : void 0,
|
|
2709
2775
|
(m = e.symbol) != null && m.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
2710
2776
|
].filter(Boolean).join(" ");
|
|
2711
2777
|
}
|
|
2712
|
-
const [n, i] =
|
|
2778
|
+
const [n, i] = v(() => {
|
|
2713
2779
|
var d;
|
|
2714
2780
|
return (d = e.symbol) == null ? void 0 : d.content;
|
|
2715
2781
|
});
|
|
2716
|
-
function
|
|
2717
|
-
n ||
|
|
2782
|
+
function o() {
|
|
2783
|
+
n || fn({
|
|
2718
2784
|
symbol: e.symbol,
|
|
2719
2785
|
builderContextValue: e.builderContext
|
|
2720
2786
|
}).then((d) => {
|
|
@@ -2723,53 +2789,54 @@ function sn(e) {
|
|
|
2723
2789
|
}
|
|
2724
2790
|
return E(() => {
|
|
2725
2791
|
}, []), E(() => {
|
|
2726
|
-
|
|
2727
|
-
}, [e.symbol]), /* @__PURE__ */
|
|
2728
|
-
|
|
2792
|
+
o();
|
|
2793
|
+
}, [e.symbol]), /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
|
|
2794
|
+
Ve,
|
|
2729
2795
|
{
|
|
2730
2796
|
__isNestedRender: !0,
|
|
2731
2797
|
apiVersion: e.builderContext.apiVersion,
|
|
2732
2798
|
apiKey: e.builderContext.apiKey,
|
|
2733
2799
|
context: {
|
|
2734
2800
|
...e.builderContext.context,
|
|
2735
|
-
symbolId: (
|
|
2801
|
+
symbolId: (r = e.builderBlock) == null ? void 0 : r.id
|
|
2736
2802
|
},
|
|
2737
2803
|
customComponents: Object.values(e.builderComponents),
|
|
2738
2804
|
data: {
|
|
2739
|
-
...(
|
|
2805
|
+
...(a = e.symbol) == null ? void 0 : a.data,
|
|
2740
2806
|
...e.builderContext.localState,
|
|
2741
2807
|
...(c = n == null ? void 0 : n.data) == null ? void 0 : c.state
|
|
2742
2808
|
},
|
|
2743
2809
|
model: (s = e.symbol) == null ? void 0 : s.model,
|
|
2744
|
-
content: n
|
|
2810
|
+
content: n,
|
|
2811
|
+
linkComponent: e.builderLinkComponent
|
|
2745
2812
|
}
|
|
2746
2813
|
) });
|
|
2747
2814
|
}
|
|
2748
|
-
const
|
|
2815
|
+
const Sn = Y, xn = Ve;
|
|
2749
2816
|
export {
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2817
|
+
Y as Blocks,
|
|
2818
|
+
Ke as Button,
|
|
2819
|
+
xt as Columns,
|
|
2820
|
+
Ve as Content,
|
|
2821
|
+
vt as Fragment,
|
|
2822
|
+
Ct as Image,
|
|
2823
|
+
Sn as RenderBlocks,
|
|
2824
|
+
xn as RenderContent,
|
|
2825
|
+
wt as Section,
|
|
2826
|
+
hn as Symbol,
|
|
2827
|
+
Ut as Text,
|
|
2828
|
+
Ht as Video,
|
|
2829
|
+
pn as _processContentResult,
|
|
2830
|
+
je as createRegisterComponentMessage,
|
|
2831
|
+
Cn as fetchBuilderProps,
|
|
2832
|
+
wn as fetchEntries,
|
|
2833
|
+
Ce as fetchOneEntry,
|
|
2834
|
+
In as getAllContent,
|
|
2835
|
+
Tn as getBuilderSearchParams,
|
|
2836
|
+
Rn as getContent,
|
|
2837
|
+
N as isEditing,
|
|
2838
|
+
Oe as isPreviewing,
|
|
2839
|
+
_e as register,
|
|
2840
|
+
En as setEditorSettings,
|
|
2841
|
+
Pn as track
|
|
2775
2842
|
};
|