@builder.io/sdk-react-nextjs 0.7.0 → 0.7.1-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/USE_CLIENT_BUNDLE-7a3bf41a.mjs +657 -0
- package/lib/browser/USE_CLIENT_BUNDLE-9195e6a5.js +23 -0
- package/lib/{edge/USE_SERVER_BUNDLE-105e9ef3.js → browser/USE_SERVER_BUNDLE-d7b13097.js} +1 -1
- package/lib/browser/USE_SERVER_BUNDLE-e5c2279a.mjs +11 -0
- package/lib/browser/{bundle-0fae602b.js → bundle-620ae296.js} +5 -5
- package/lib/browser/{bundle-3b073b16.mjs → bundle-7285a09d.mjs} +265 -268
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +7 -7
- package/lib/edge/USE_CLIENT_BUNDLE-3cca560e.js +23 -0
- package/lib/edge/USE_CLIENT_BUNDLE-4a0cfa69.mjs +657 -0
- package/lib/{node/USE_SERVER_BUNDLE-d8c698c8.js → edge/USE_SERVER_BUNDLE-3f12faf4.js} +1 -1
- package/lib/edge/USE_SERVER_BUNDLE-f184d7eb.mjs +11 -0
- package/lib/edge/{bundle-0c1d9099.js → bundle-a0f5cad2.js} +5 -5
- package/lib/edge/{bundle-ed178c62.mjs → bundle-a5949d33.mjs} +265 -268
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +7 -7
- package/lib/node/USE_CLIENT_BUNDLE-63c7fe77.js +61 -0
- package/lib/node/USE_CLIENT_BUNDLE-d9e90ed7.mjs +747 -0
- package/lib/node/USE_SERVER_BUNDLE-22e86776.mjs +11 -0
- package/lib/{browser/USE_SERVER_BUNDLE-d8c698c8.js → node/USE_SERVER_BUNDLE-cd844269.js} +1 -1
- package/lib/node/{bundle-3b073b16.mjs → bundle-0358b224.mjs} +415 -444
- package/lib/node/bundle-630ffe6d.js +76 -0
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +23 -22
- package/package.json +5 -3
- package/types/blocks/image/image.d.ts +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/lib/browser/USE_CLIENT_BUNDLE-3a41b1ba.js +0 -23
- package/lib/browser/USE_CLIENT_BUNDLE-fc8c1bc0.mjs +0 -618
- package/lib/browser/USE_SERVER_BUNDLE-226a15ac.mjs +0 -11
- package/lib/edge/USE_CLIENT_BUNDLE-0e9f8e67.mjs +0 -618
- package/lib/edge/USE_CLIENT_BUNDLE-d48583e8.js +0 -23
- package/lib/edge/USE_SERVER_BUNDLE-f6a1e321.mjs +0 -11
- package/lib/node/USE_CLIENT_BUNDLE-3a41b1ba.js +0 -23
- package/lib/node/USE_CLIENT_BUNDLE-fc8c1bc0.mjs +0 -618
- package/lib/node/USE_SERVER_BUNDLE-226a15ac.mjs +0 -11
- package/lib/node/bundle-0fae602b.js +0 -76
|
@@ -0,0 +1,657 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as w, Fragment as g, jsx as c } from "react/jsx-runtime";
|
|
3
|
+
import { g as T, a as N, i as E, b as R, c as G, d as P, e as W, _ as A, f as $, l as Q, h as D, j as X, k as Y, r as Z, s as p, m as ee, n as te, o as ne } from "./bundle-7285a09d.mjs";
|
|
4
|
+
import { useRef as j, useState as y, useEffect as x, createContext as ie, createElement as ae } from "react";
|
|
5
|
+
import { p as ce } from "./USE_SERVER_BUNDLE-e5c2279a.mjs";
|
|
6
|
+
import { useRouter as re } from "next/navigation";
|
|
7
|
+
function ge(e) {
|
|
8
|
+
return /* @__PURE__ */ w(g, { children: [
|
|
9
|
+
e.link ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
|
|
10
|
+
"a",
|
|
11
|
+
{
|
|
12
|
+
role: "button",
|
|
13
|
+
...e.attributes,
|
|
14
|
+
href: e.link,
|
|
15
|
+
target: e.openLinkInNewTab ? "_blank" : void 0,
|
|
16
|
+
children: e.text
|
|
17
|
+
}
|
|
18
|
+
) }) : /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
|
|
19
|
+
"button",
|
|
20
|
+
{
|
|
21
|
+
...e.attributes,
|
|
22
|
+
style: e.attributes.style,
|
|
23
|
+
className: e.attributes.className + " button-35669e6c",
|
|
24
|
+
children: e.text
|
|
25
|
+
}
|
|
26
|
+
) }),
|
|
27
|
+
/* @__PURE__ */ c("style", { children: `.button-35669e6c {
|
|
28
|
+
all: unset;
|
|
29
|
+
}` })
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
function he(e) {
|
|
33
|
+
return /* @__PURE__ */ c(
|
|
34
|
+
e.Wrapper,
|
|
35
|
+
{
|
|
36
|
+
...e.wrapperProps,
|
|
37
|
+
attributes: {
|
|
38
|
+
...T({
|
|
39
|
+
block: e.block,
|
|
40
|
+
context: e.context
|
|
41
|
+
}),
|
|
42
|
+
...N({
|
|
43
|
+
block: e.block,
|
|
44
|
+
rootState: e.context.rootState,
|
|
45
|
+
rootSetState: e.context.rootSetState,
|
|
46
|
+
localState: e.context.localState,
|
|
47
|
+
context: e.context.context
|
|
48
|
+
})
|
|
49
|
+
},
|
|
50
|
+
children: e.children
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
function be(e) {
|
|
55
|
+
return /* @__PURE__ */ w(g, { children: [
|
|
56
|
+
" ",
|
|
57
|
+
e.hasChildren ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ w(
|
|
58
|
+
e.Wrapper,
|
|
59
|
+
{
|
|
60
|
+
...T({
|
|
61
|
+
block: e.block,
|
|
62
|
+
context: e.context
|
|
63
|
+
}),
|
|
64
|
+
...N({
|
|
65
|
+
block: e.block,
|
|
66
|
+
rootState: e.context.rootState,
|
|
67
|
+
rootSetState: e.context.rootSetState,
|
|
68
|
+
localState: e.context.localState,
|
|
69
|
+
context: e.context.context,
|
|
70
|
+
stripPrefix: !0
|
|
71
|
+
}),
|
|
72
|
+
children: [
|
|
73
|
+
" ",
|
|
74
|
+
e.children,
|
|
75
|
+
" "
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
) }) : /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
|
|
79
|
+
e.Wrapper,
|
|
80
|
+
{
|
|
81
|
+
...T({
|
|
82
|
+
block: e.block,
|
|
83
|
+
context: e.context
|
|
84
|
+
}),
|
|
85
|
+
...N({
|
|
86
|
+
block: e.block,
|
|
87
|
+
rootState: e.context.rootState,
|
|
88
|
+
rootSetState: e.context.rootSetState,
|
|
89
|
+
localState: e.context.localState,
|
|
90
|
+
context: e.context.context,
|
|
91
|
+
stripPrefix: !0
|
|
92
|
+
})
|
|
93
|
+
}
|
|
94
|
+
) }),
|
|
95
|
+
" "
|
|
96
|
+
] });
|
|
97
|
+
}
|
|
98
|
+
function fe(e) {
|
|
99
|
+
function i() {
|
|
100
|
+
var o;
|
|
101
|
+
return "builder-blocks" + ((o = e.blocks) != null && o.length ? "" : " no-blocks");
|
|
102
|
+
}
|
|
103
|
+
function s() {
|
|
104
|
+
var o, f;
|
|
105
|
+
E() && !((o = e.blocks) != null && o.length) && ((f = window.parent) == null || f.postMessage(
|
|
106
|
+
{
|
|
107
|
+
type: "builder.clickEmptyBlocks",
|
|
108
|
+
data: {
|
|
109
|
+
parentElementId: e.parent,
|
|
110
|
+
dataPath: e.path
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"*"
|
|
114
|
+
));
|
|
115
|
+
}
|
|
116
|
+
function b() {
|
|
117
|
+
var o, f;
|
|
118
|
+
E() && !((o = e.blocks) != null && o.length) && ((f = window.parent) == null || f.postMessage(
|
|
119
|
+
{
|
|
120
|
+
type: "builder.hoverEmptyBlocks",
|
|
121
|
+
data: {
|
|
122
|
+
parentElementId: e.parent,
|
|
123
|
+
dataPath: e.path
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"*"
|
|
127
|
+
));
|
|
128
|
+
}
|
|
129
|
+
return /* @__PURE__ */ w(g, { children: [
|
|
130
|
+
/* @__PURE__ */ c(
|
|
131
|
+
"div",
|
|
132
|
+
{
|
|
133
|
+
className: i() + " div-02c7a115",
|
|
134
|
+
"builder-path": e.path,
|
|
135
|
+
"builder-parent-id": e.parent,
|
|
136
|
+
style: e.styleProp,
|
|
137
|
+
onClick: (o) => s(),
|
|
138
|
+
onMouseEnter: (o) => b(),
|
|
139
|
+
onKeyPress: (o) => s(),
|
|
140
|
+
children: e.children
|
|
141
|
+
}
|
|
142
|
+
),
|
|
143
|
+
/* @__PURE__ */ c("style", { children: `.div-02c7a115 {
|
|
144
|
+
display: flex;
|
|
145
|
+
flex-direction: column;
|
|
146
|
+
align-items: stretch;
|
|
147
|
+
}` })
|
|
148
|
+
] });
|
|
149
|
+
}
|
|
150
|
+
function Se(e) {
|
|
151
|
+
return /* @__PURE__ */ c("span", { children: e.children });
|
|
152
|
+
}
|
|
153
|
+
function xe(e) {
|
|
154
|
+
var o, f, k, S;
|
|
155
|
+
function i() {
|
|
156
|
+
var h;
|
|
157
|
+
const l = e.image || e.src;
|
|
158
|
+
if (!l || // We can auto add srcset for cdn.builder.io and shopify
|
|
159
|
+
// images, otherwise you can supply this prop manually
|
|
160
|
+
!(l.match(/builder\.io/) || l.match(/cdn\.shopify\.com/)))
|
|
161
|
+
return e.srcset;
|
|
162
|
+
if (e.srcset && ((h = e.image) != null && h.includes("builder.io/api/v1/image"))) {
|
|
163
|
+
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
164
|
+
return console.debug("Removed given srcset"), R(l);
|
|
165
|
+
} else if (e.image && !e.srcset)
|
|
166
|
+
return R(l);
|
|
167
|
+
return R(l);
|
|
168
|
+
}
|
|
169
|
+
function s() {
|
|
170
|
+
var m;
|
|
171
|
+
return (m = i == null ? void 0 : i()) != null && m.match(/builder\.io/) && !e.noWebp ? i().replace(/\?/g, "?format=webp&") : "";
|
|
172
|
+
}
|
|
173
|
+
function b() {
|
|
174
|
+
const m = {
|
|
175
|
+
position: "absolute",
|
|
176
|
+
height: "100%",
|
|
177
|
+
width: "100%",
|
|
178
|
+
left: "0px",
|
|
179
|
+
top: "0px"
|
|
180
|
+
};
|
|
181
|
+
return e.aspectRatio ? m : void 0;
|
|
182
|
+
}
|
|
183
|
+
return /* @__PURE__ */ w(g, { children: [
|
|
184
|
+
/* @__PURE__ */ w(g, { children: [
|
|
185
|
+
/* @__PURE__ */ w("picture", { children: [
|
|
186
|
+
s() ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c("source", { type: "image/webp", srcSet: s() }) }) : null,
|
|
187
|
+
/* @__PURE__ */ c(
|
|
188
|
+
"img",
|
|
189
|
+
{
|
|
190
|
+
loading: "lazy",
|
|
191
|
+
alt: e.altText,
|
|
192
|
+
role: e.altText ? "presentation" : void 0,
|
|
193
|
+
style: {
|
|
194
|
+
objectPosition: e.backgroundPosition || "center",
|
|
195
|
+
objectFit: e.backgroundSize || "cover",
|
|
196
|
+
...b()
|
|
197
|
+
},
|
|
198
|
+
className: "builder-image" + (e.className ? " " + e.className : "") + " img-497e0136",
|
|
199
|
+
src: e.image,
|
|
200
|
+
srcSet: i(),
|
|
201
|
+
sizes: e.sizes
|
|
202
|
+
}
|
|
203
|
+
)
|
|
204
|
+
] }),
|
|
205
|
+
e.aspectRatio && !((f = (o = e.builderBlock) == null ? void 0 : o.children) != null && f.length && e.fitContent) ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
|
|
206
|
+
"div",
|
|
207
|
+
{
|
|
208
|
+
className: "builder-image-sizer div-497e0136",
|
|
209
|
+
style: {
|
|
210
|
+
paddingTop: e.aspectRatio * 100 + "%"
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
) }) : null,
|
|
214
|
+
(S = (k = e.builderBlock) == null ? void 0 : k.children) != null && S.length && e.fitContent ? /* @__PURE__ */ c(g, { children: e.children }) : null,
|
|
215
|
+
!e.fitContent && e.children ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c("div", { className: "div-497e0136-2", children: e.children }) }) : null
|
|
216
|
+
] }),
|
|
217
|
+
/* @__PURE__ */ c("style", { children: `.img-497e0136 {
|
|
218
|
+
opacity: 1;
|
|
219
|
+
transition: opacity 0.2s ease-in-out;
|
|
220
|
+
}.div-497e0136 {
|
|
221
|
+
width: 100%;
|
|
222
|
+
pointer-events: none;
|
|
223
|
+
font-size: 0;
|
|
224
|
+
}.div-497e0136-2 {
|
|
225
|
+
display: flex;
|
|
226
|
+
flex-direction: column;
|
|
227
|
+
align-items: stretch;
|
|
228
|
+
position: absolute;
|
|
229
|
+
top: 0;
|
|
230
|
+
left: 0;
|
|
231
|
+
width: 100%;
|
|
232
|
+
height: 100%;
|
|
233
|
+
}` })
|
|
234
|
+
] });
|
|
235
|
+
}
|
|
236
|
+
function ve(e) {
|
|
237
|
+
return /* @__PURE__ */ c(
|
|
238
|
+
"section",
|
|
239
|
+
{
|
|
240
|
+
...e.attributes,
|
|
241
|
+
style: {
|
|
242
|
+
width: "100%",
|
|
243
|
+
alignSelf: "stretch",
|
|
244
|
+
flexGrow: 1,
|
|
245
|
+
boxSizing: "border-box",
|
|
246
|
+
maxWidth: e.maxWidth || 1200,
|
|
247
|
+
display: "flex",
|
|
248
|
+
flexDirection: "column",
|
|
249
|
+
alignItems: "stretch",
|
|
250
|
+
marginLeft: "auto",
|
|
251
|
+
marginRight: "auto"
|
|
252
|
+
},
|
|
253
|
+
children: e.children
|
|
254
|
+
}
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
function ye(e) {
|
|
258
|
+
var b;
|
|
259
|
+
function i() {
|
|
260
|
+
return {
|
|
261
|
+
...e.autoPlay === !0 ? {
|
|
262
|
+
autoPlay: !0
|
|
263
|
+
} : {},
|
|
264
|
+
...e.muted === !0 ? {
|
|
265
|
+
muted: !0
|
|
266
|
+
} : {},
|
|
267
|
+
...e.controls === !0 ? {
|
|
268
|
+
controls: !0
|
|
269
|
+
} : {},
|
|
270
|
+
...e.loop === !0 ? {
|
|
271
|
+
loop: !0
|
|
272
|
+
} : {},
|
|
273
|
+
...e.playsInline === !0 ? {
|
|
274
|
+
playsInline: !0
|
|
275
|
+
} : {}
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
function s() {
|
|
279
|
+
return {
|
|
280
|
+
...e.attributes,
|
|
281
|
+
...i()
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
return /* @__PURE__ */ c(
|
|
285
|
+
"video",
|
|
286
|
+
{
|
|
287
|
+
...s(),
|
|
288
|
+
preload: e.preload || "metadata",
|
|
289
|
+
style: {
|
|
290
|
+
width: "100%",
|
|
291
|
+
height: "100%",
|
|
292
|
+
...(b = e.attributes) == null ? void 0 : b.style,
|
|
293
|
+
objectFit: e.fit,
|
|
294
|
+
objectPosition: e.position,
|
|
295
|
+
// Hack to get object fit to work as expected and
|
|
296
|
+
// not have the video overflow
|
|
297
|
+
borderRadius: 1
|
|
298
|
+
},
|
|
299
|
+
src: e.video || "no-src",
|
|
300
|
+
poster: e.posterImage
|
|
301
|
+
}
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
function ke(e) {
|
|
305
|
+
const i = j(null), [s, b] = y(() => []), [o, f] = y(() => []), [k, S] = y(() => !1);
|
|
306
|
+
function m() {
|
|
307
|
+
if (!i.current || !i.current.getElementsByTagName)
|
|
308
|
+
return;
|
|
309
|
+
const l = i.current.getElementsByTagName("script");
|
|
310
|
+
for (let h = 0; h < l.length; h++) {
|
|
311
|
+
const v = l[h];
|
|
312
|
+
if (v.src && !s.includes(v.src)) {
|
|
313
|
+
s.push(v.src);
|
|
314
|
+
const C = document.createElement("script");
|
|
315
|
+
C.async = !0, C.src = v.src, document.head.appendChild(C);
|
|
316
|
+
} else if (G(v) && !o.includes(v.innerText))
|
|
317
|
+
try {
|
|
318
|
+
o.push(v.innerText), new Function(v.innerText)();
|
|
319
|
+
} catch (C) {
|
|
320
|
+
console.warn("`Embed`: Error running script:", C);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return x(() => {
|
|
325
|
+
i.current && !k && (S(!0), m());
|
|
326
|
+
}, [i.current, k]), /* @__PURE__ */ c(
|
|
327
|
+
"div",
|
|
328
|
+
{
|
|
329
|
+
className: "builder-embed",
|
|
330
|
+
ref: i,
|
|
331
|
+
dangerouslySetInnerHTML: { __html: e.content }
|
|
332
|
+
}
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
function Ce(e) {
|
|
336
|
+
return /* @__PURE__ */ c(
|
|
337
|
+
"img",
|
|
338
|
+
{
|
|
339
|
+
style: {
|
|
340
|
+
objectFit: e.backgroundSize || "cover",
|
|
341
|
+
objectPosition: e.backgroundPosition || "center"
|
|
342
|
+
},
|
|
343
|
+
alt: e.altText,
|
|
344
|
+
src: e.imgSrc || e.image,
|
|
345
|
+
...e.attributes
|
|
346
|
+
},
|
|
347
|
+
E() && e.imgSrc || "default-key"
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
function we(e) {
|
|
351
|
+
const i = j(null), [s, b] = y(() => []), [o, f] = y(() => []);
|
|
352
|
+
return x(() => {
|
|
353
|
+
var S;
|
|
354
|
+
if (!((S = i.current) != null && S.getElementsByTagName) || typeof window > "u")
|
|
355
|
+
return;
|
|
356
|
+
const k = i.current.getElementsByTagName("script");
|
|
357
|
+
for (let m = 0; m < k.length; m++) {
|
|
358
|
+
const l = k[m];
|
|
359
|
+
if (l.src) {
|
|
360
|
+
if (s.includes(l.src))
|
|
361
|
+
continue;
|
|
362
|
+
s.push(l.src);
|
|
363
|
+
const h = document.createElement("script");
|
|
364
|
+
h.async = !0, h.src = l.src, document.head.appendChild(h);
|
|
365
|
+
} else if (!l.type || [
|
|
366
|
+
"text/javascript",
|
|
367
|
+
"application/javascript",
|
|
368
|
+
"application/ecmascript"
|
|
369
|
+
].includes(l.type)) {
|
|
370
|
+
if (o.includes(l.innerText))
|
|
371
|
+
continue;
|
|
372
|
+
try {
|
|
373
|
+
o.push(l.innerText), new Function(l.innerText)();
|
|
374
|
+
} catch (h) {
|
|
375
|
+
console.warn("`CustomCode`: Error running script:", h);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}, []), /* @__PURE__ */ c(
|
|
380
|
+
"div",
|
|
381
|
+
{
|
|
382
|
+
ref: i,
|
|
383
|
+
className: "builder-custom-code" + (e.replaceNodes ? " replace-nodes" : ""),
|
|
384
|
+
dangerouslySetInnerHTML: { __html: e.code }
|
|
385
|
+
}
|
|
386
|
+
);
|
|
387
|
+
}
|
|
388
|
+
const oe = ie({
|
|
389
|
+
content: null,
|
|
390
|
+
context: {},
|
|
391
|
+
localState: void 0,
|
|
392
|
+
rootSetState() {
|
|
393
|
+
},
|
|
394
|
+
rootState: {},
|
|
395
|
+
apiKey: null,
|
|
396
|
+
apiVersion: void 0,
|
|
397
|
+
componentInfos: {},
|
|
398
|
+
inheritedStyles: {}
|
|
399
|
+
});
|
|
400
|
+
function Ee(e) {
|
|
401
|
+
var F, M, _, q, z;
|
|
402
|
+
const i = j(null), [s, b] = y(() => 0);
|
|
403
|
+
function o(t) {
|
|
404
|
+
var a, r, d, u, V;
|
|
405
|
+
const n = {
|
|
406
|
+
...e.builderContextSignal.content,
|
|
407
|
+
...t,
|
|
408
|
+
data: {
|
|
409
|
+
...(a = e.builderContextSignal.content) == null ? void 0 : a.data,
|
|
410
|
+
...t == null ? void 0 : t.data
|
|
411
|
+
},
|
|
412
|
+
meta: {
|
|
413
|
+
...(r = e.builderContextSignal.content) == null ? void 0 : r.meta,
|
|
414
|
+
...t == null ? void 0 : t.meta,
|
|
415
|
+
breakpoints: ((d = t == null ? void 0 : t.meta) == null ? void 0 : d.breakpoints) || ((V = (u = e.builderContextSignal.content) == null ? void 0 : u.meta) == null ? void 0 : V.breakpoints)
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
ce({
|
|
419
|
+
value: n,
|
|
420
|
+
key: n.id
|
|
421
|
+
}).then(() => {
|
|
422
|
+
J.refresh();
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
y(() => 0);
|
|
426
|
+
const [f, k] = y(
|
|
427
|
+
() => !1
|
|
428
|
+
);
|
|
429
|
+
function S(t) {
|
|
430
|
+
var a;
|
|
431
|
+
const { data: n } = t;
|
|
432
|
+
if (n)
|
|
433
|
+
switch (n.type) {
|
|
434
|
+
case "builder.configureSdk": {
|
|
435
|
+
const r = n.data, { breakpoints: d, contentId: u } = r;
|
|
436
|
+
if (!u || u !== ((a = e.builderContextSignal.content) == null ? void 0 : a.id))
|
|
437
|
+
return;
|
|
438
|
+
d && o({
|
|
439
|
+
meta: {
|
|
440
|
+
breakpoints: d
|
|
441
|
+
}
|
|
442
|
+
}), b(s + 1);
|
|
443
|
+
break;
|
|
444
|
+
}
|
|
445
|
+
case "builder.contentUpdate": {
|
|
446
|
+
const r = n.data, d = r.key || r.alias || r.entry || r.modelName, u = r.data;
|
|
447
|
+
d === e.model && (o(u), b(s + 1));
|
|
448
|
+
break;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
function m() {
|
|
453
|
+
var n, a;
|
|
454
|
+
const t = (a = (n = e.builderContextSignal.content) == null ? void 0 : n.data) == null ? void 0 : a.jsCode;
|
|
455
|
+
t && D({
|
|
456
|
+
code: t,
|
|
457
|
+
context: e.context || {},
|
|
458
|
+
localState: void 0,
|
|
459
|
+
rootState: e.builderContextSignal.rootState,
|
|
460
|
+
rootSetState: e.builderContextSignal.rootSetState
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
const [l, h] = y(() => ({})), [v, C] = y(() => !1);
|
|
464
|
+
function U(t) {
|
|
465
|
+
var n, a;
|
|
466
|
+
if (e.builderContextSignal.content) {
|
|
467
|
+
const r = (n = e.builderContextSignal.content) == null ? void 0 : n.testVariationId, d = (a = e.builderContextSignal.content) == null ? void 0 : a.id;
|
|
468
|
+
A({
|
|
469
|
+
type: "click",
|
|
470
|
+
canTrack: W(e.canTrack),
|
|
471
|
+
contentId: d,
|
|
472
|
+
apiKey: e.apiKey,
|
|
473
|
+
variationId: r !== d ? r : void 0,
|
|
474
|
+
...X(t),
|
|
475
|
+
unique: !v
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
v || C(!0);
|
|
479
|
+
}
|
|
480
|
+
function H(t) {
|
|
481
|
+
return t.replace(
|
|
482
|
+
/{{([^}]+)}}/g,
|
|
483
|
+
(n, a) => D({
|
|
484
|
+
code: a,
|
|
485
|
+
context: e.context || {},
|
|
486
|
+
localState: void 0,
|
|
487
|
+
rootState: e.builderContextSignal.rootState,
|
|
488
|
+
rootSetState: e.builderContextSignal.rootSetState
|
|
489
|
+
})
|
|
490
|
+
);
|
|
491
|
+
}
|
|
492
|
+
function O({ url: t, key: n }) {
|
|
493
|
+
ne(t).then((a) => a.json()).then((a) => {
|
|
494
|
+
var d, u;
|
|
495
|
+
const r = {
|
|
496
|
+
...e.builderContextSignal.rootState,
|
|
497
|
+
[n]: a
|
|
498
|
+
};
|
|
499
|
+
(u = (d = e.builderContextSignal).rootSetState) == null || u.call(d, r), l[n] = !0;
|
|
500
|
+
}).catch((a) => {
|
|
501
|
+
console.error("error fetching dynamic data", t, a);
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
function L() {
|
|
505
|
+
var n, a;
|
|
506
|
+
const t = ((a = (n = e.builderContextSignal.content) == null ? void 0 : n.data) == null ? void 0 : a.httpRequests) ?? {};
|
|
507
|
+
Object.entries(t).forEach(([r, d]) => {
|
|
508
|
+
if (d && (!l[r] || E())) {
|
|
509
|
+
const u = H(d);
|
|
510
|
+
O({
|
|
511
|
+
url: u,
|
|
512
|
+
key: r
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
function I() {
|
|
518
|
+
E() && window.dispatchEvent(
|
|
519
|
+
new CustomEvent(
|
|
520
|
+
"builder:component:stateChange",
|
|
521
|
+
{
|
|
522
|
+
detail: {
|
|
523
|
+
state: Y(e.builderContextSignal.rootState),
|
|
524
|
+
ref: {
|
|
525
|
+
name: e.model
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
)
|
|
530
|
+
);
|
|
531
|
+
}
|
|
532
|
+
function B(t) {
|
|
533
|
+
b(s + 1), window.addEventListener("message", S), Z(), p({
|
|
534
|
+
...e.locale ? {
|
|
535
|
+
locale: e.locale
|
|
536
|
+
} : {},
|
|
537
|
+
...e.includeRefs ? {
|
|
538
|
+
includeRefs: e.includeRefs
|
|
539
|
+
} : {},
|
|
540
|
+
...e.enrich ? {
|
|
541
|
+
enrich: e.enrich
|
|
542
|
+
} : {}
|
|
543
|
+
}), Object.values(
|
|
544
|
+
e.builderContextSignal.componentInfos
|
|
545
|
+
).forEach((n) => {
|
|
546
|
+
var r;
|
|
547
|
+
const a = ee(n);
|
|
548
|
+
(r = window.parent) == null || r.postMessage(a, "*");
|
|
549
|
+
}), window.addEventListener(
|
|
550
|
+
"builder:component:stateChangeListenerActivated",
|
|
551
|
+
I
|
|
552
|
+
);
|
|
553
|
+
}
|
|
554
|
+
function K(t) {
|
|
555
|
+
const n = new URL(location.href).searchParams, a = n.get("builder.preview"), r = n.get(
|
|
556
|
+
`builder.preview.${a}`
|
|
557
|
+
), d = n.get("apiKey") || n.get("builder.space");
|
|
558
|
+
a === e.model && d === e.apiKey && (!e.content || r === e.content.id) && te({
|
|
559
|
+
model: e.model,
|
|
560
|
+
apiKey: e.apiKey,
|
|
561
|
+
apiVersion: e.builderContextSignal.apiVersion
|
|
562
|
+
}).then((u) => {
|
|
563
|
+
u && o(u);
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
const J = re();
|
|
567
|
+
return x(() => {
|
|
568
|
+
var t;
|
|
569
|
+
return (t = i.current) == null || t.addEventListener(
|
|
570
|
+
"initeditingbldr",
|
|
571
|
+
B
|
|
572
|
+
), () => {
|
|
573
|
+
var n;
|
|
574
|
+
return (n = i.current) == null ? void 0 : n.removeEventListener(
|
|
575
|
+
"initeditingbldr",
|
|
576
|
+
B
|
|
577
|
+
);
|
|
578
|
+
};
|
|
579
|
+
}, []), x(() => {
|
|
580
|
+
var t;
|
|
581
|
+
return (t = i.current) == null || t.addEventListener(
|
|
582
|
+
"initpreviewingbldr",
|
|
583
|
+
K
|
|
584
|
+
), () => {
|
|
585
|
+
var n;
|
|
586
|
+
return (n = i.current) == null ? void 0 : n.removeEventListener(
|
|
587
|
+
"initpreviewingbldr",
|
|
588
|
+
K
|
|
589
|
+
);
|
|
590
|
+
};
|
|
591
|
+
}, []), x(() => {
|
|
592
|
+
var t, n;
|
|
593
|
+
if (P()) {
|
|
594
|
+
if (E() && i.current && i.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && W(e.canTrack)) {
|
|
595
|
+
const r = (t = e.builderContextSignal.content) == null ? void 0 : t.testVariationId, d = (n = e.builderContextSignal.content) == null ? void 0 : n.id, u = e.apiKey;
|
|
596
|
+
A({
|
|
597
|
+
type: "impression",
|
|
598
|
+
canTrack: !0,
|
|
599
|
+
contentId: d,
|
|
600
|
+
apiKey: u,
|
|
601
|
+
variationId: r !== d ? r : void 0
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
$() && i.current;
|
|
605
|
+
}
|
|
606
|
+
}, []), x(() => {
|
|
607
|
+
e.apiKey || Q.error(
|
|
608
|
+
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
609
|
+
), m(), L(), I();
|
|
610
|
+
}, []), x(() => {
|
|
611
|
+
}, [e.content]), x(() => {
|
|
612
|
+
P() && (window.removeEventListener("message", S), window.addEventListener("message", S));
|
|
613
|
+
}, [f]), x(() => {
|
|
614
|
+
m();
|
|
615
|
+
}, [
|
|
616
|
+
(M = (F = e.builderContextSignal.content) == null ? void 0 : F.data) == null ? void 0 : M.jsCode,
|
|
617
|
+
e.builderContextSignal.rootState
|
|
618
|
+
]), x(() => {
|
|
619
|
+
L();
|
|
620
|
+
}, [(q = (_ = e.builderContextSignal.content) == null ? void 0 : _.data) == null ? void 0 : q.httpRequests]), x(() => {
|
|
621
|
+
I();
|
|
622
|
+
}, [e.builderContextSignal.rootState]), x(() => () => {
|
|
623
|
+
P() && (window.removeEventListener("message", S), window.removeEventListener(
|
|
624
|
+
"builder:component:stateChangeListenerActivated",
|
|
625
|
+
I
|
|
626
|
+
));
|
|
627
|
+
}, []), /* @__PURE__ */ c(oe.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ ae(
|
|
628
|
+
"div",
|
|
629
|
+
{
|
|
630
|
+
key: s,
|
|
631
|
+
ref: i,
|
|
632
|
+
onClick: (t) => U(t),
|
|
633
|
+
"builder-content-id": (z = e.builderContextSignal.content) == null ? void 0 : z.id,
|
|
634
|
+
"builder-model": e.model,
|
|
635
|
+
...e.showContent ? {} : {
|
|
636
|
+
hidden: !0,
|
|
637
|
+
"aria-hidden": !0
|
|
638
|
+
},
|
|
639
|
+
className: e.classNameProp
|
|
640
|
+
},
|
|
641
|
+
e.children
|
|
642
|
+
) }) : null });
|
|
643
|
+
}
|
|
644
|
+
export {
|
|
645
|
+
be as B,
|
|
646
|
+
we as C,
|
|
647
|
+
ke as E,
|
|
648
|
+
Se as F,
|
|
649
|
+
he as I,
|
|
650
|
+
ve as S,
|
|
651
|
+
ye as V,
|
|
652
|
+
fe as a,
|
|
653
|
+
ge as b,
|
|
654
|
+
xe as c,
|
|
655
|
+
Ce as d,
|
|
656
|
+
Ee as e
|
|
657
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";"use strict";const t=require("react/jsx-runtime"),c=require("./bundle-620ae296.js"),o=require("react"),_=require("./USE_SERVER_BUNDLE-d7b13097.js"),M=require("next/navigation");function W(e){return t.jsxs(t.Fragment,{children:[e.link?t.jsx(t.Fragment,{children:t.jsx("a",{role:"button",...e.attributes,href:e.link,target:e.openLinkInNewTab?"_blank":void 0,children:e.text})}):t.jsx(t.Fragment,{children:t.jsx("button",{...e.attributes,style:e.attributes.style,className:e.attributes.className+" button-35669e6c",children:e.text})}),t.jsx("style",{children:`.button-35669e6c {
|
|
2
|
+
all: unset;
|
|
3
|
+
}`})]})}function A(e){return t.jsx(e.Wrapper,{...e.wrapperProps,attributes:{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})},children:e.children})}function V(e){return t.jsxs(t.Fragment,{children:[" ",e.hasChildren?t.jsx(t.Fragment,{children:t.jsxs(e.Wrapper,{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:[" ",e.children," "]})}):t.jsx(t.Fragment,{children:t.jsx(e.Wrapper,{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0})})})," "]})}function z(e){function a(){var s;return"builder-blocks"+((s=e.blocks)!=null&&s.length?"":" no-blocks")}function g(){var s,x;c.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((x=window.parent)==null||x.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function h(){var s,x;c.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((x=window.parent)==null||x.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:a()+" div-02c7a115","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:s=>g(),onMouseEnter:s=>h(),onKeyPress:s=>g(),children:e.children}),t.jsx("style",{children:`.div-02c7a115 {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
align-items: stretch;
|
|
7
|
+
}`})]})}function D(e){return t.jsx("span",{children:e.children})}function U(e){var s,x,k,S;function a(){var b;const d=e.image||e.src;if(!d||!(d.match(/builder\.io/)||d.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((b=e.image)!=null&&b.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),c.getSrcSet(d)}else if(e.image&&!e.srcset)return c.getSrcSet(d);return c.getSrcSet(d)}function g(){var f;return(f=a==null?void 0:a())!=null&&f.match(/builder\.io/)&&!e.noWebp?a().replace(/\?/g,"?format=webp&"):""}function h(){const f={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?f:void 0}return t.jsxs(t.Fragment,{children:[t.jsxs(t.Fragment,{children:[t.jsxs("picture",{children:[g()?t.jsx(t.Fragment,{children:t.jsx("source",{type:"image/webp",srcSet:g()})}):null,t.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?"presentation":void 0,style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...h()},className:"builder-image"+(e.className?" "+e.className:"")+" img-497e0136",src:e.image,srcSet:a(),sizes:e.sizes})]}),e.aspectRatio&&!((x=(s=e.builderBlock)==null?void 0:s.children)!=null&&x.length&&e.fitContent)?t.jsx(t.Fragment,{children:t.jsx("div",{className:"builder-image-sizer div-497e0136",style:{paddingTop:e.aspectRatio*100+"%"}})}):null,(S=(k=e.builderBlock)==null?void 0:k.children)!=null&&S.length&&e.fitContent?t.jsx(t.Fragment,{children:e.children}):null,!e.fitContent&&e.children?t.jsx(t.Fragment,{children:t.jsx("div",{className:"div-497e0136-2",children:e.children})}):null]}),t.jsx("style",{children:`.img-497e0136 {
|
|
8
|
+
opacity: 1;
|
|
9
|
+
transition: opacity 0.2s ease-in-out;
|
|
10
|
+
}.div-497e0136 {
|
|
11
|
+
width: 100%;
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
font-size: 0;
|
|
14
|
+
}.div-497e0136-2 {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
align-items: stretch;
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: 0;
|
|
20
|
+
left: 0;
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
}`})]})}function H(e){return t.jsx("section",{...e.attributes,style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"},children:e.children})}function O(e){var h;function a(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function g(){return{...e.attributes,...a()}}return t.jsx("video",{...g(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(h=e.attributes)==null?void 0:h.style,objectFit:e.fit,objectPosition:e.position,borderRadius:1},src:e.video||"no-src",poster:e.posterImage})}function J(e){const a=o.useRef(null),[g,h]=o.useState(()=>[]),[s,x]=o.useState(()=>[]),[k,S]=o.useState(()=>!1);function f(){if(!a.current||!a.current.getElementsByTagName)return;const d=a.current.getElementsByTagName("script");for(let b=0;b<d.length;b++){const v=d[b];if(v.src&&!g.includes(v.src)){g.push(v.src);const y=document.createElement("script");y.async=!0,y.src=v.src,document.head.appendChild(y)}else if(c.isJsScript(v)&&!s.includes(v.innerText))try{s.push(v.innerText),new Function(v.innerText)()}catch(y){console.warn("`Embed`: Error running script:",y)}}}return o.useEffect(()=>{a.current&&!k&&(S(!0),f())},[a.current,k]),t.jsx("div",{className:"builder-embed",ref:a,dangerouslySetInnerHTML:{__html:e.content}})}function G(e){return t.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},c.isEditing()&&e.imgSrc||"default-key")}function $(e){const a=o.useRef(null),[g,h]=o.useState(()=>[]),[s,x]=o.useState(()=>[]);return o.useEffect(()=>{var S;if(!((S=a.current)!=null&&S.getElementsByTagName)||typeof window>"u")return;const k=a.current.getElementsByTagName("script");for(let f=0;f<k.length;f++){const d=k[f];if(d.src){if(g.includes(d.src))continue;g.push(d.src);const b=document.createElement("script");b.async=!0,b.src=d.src,document.head.appendChild(b)}else if(!d.type||["text/javascript","application/javascript","application/ecmascript"].includes(d.type)){if(s.includes(d.innerText))continue;try{s.push(d.innerText),new Function(d.innerText)()}catch(b){console.warn("`CustomCode`: Error running script:",b)}}}},[]),t.jsx("div",{ref:a,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const Q=o.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{}});function X(e){var R,I,P,T,F;const a=o.useRef(null),[g,h]=o.useState(()=>0);function s(n){var r,l,u,m,B;const i={...e.builderContextSignal.content,...n,data:{...(r=e.builderContextSignal.content)==null?void 0:r.data,...n==null?void 0:n.data},meta:{...(l=e.builderContextSignal.content)==null?void 0:l.meta,...n==null?void 0:n.meta,breakpoints:((u=n==null?void 0:n.meta)==null?void 0:u.breakpoints)||((B=(m=e.builderContextSignal.content)==null?void 0:m.meta)==null?void 0:B.breakpoints)}};_.postPreviewContent({value:i,key:i.id}).then(()=>{q.refresh()})}o.useState(()=>0);const[x,k]=o.useState(()=>!1);function S(n){var r;const{data:i}=n;if(i)switch(i.type){case"builder.configureSdk":{const l=i.data,{breakpoints:u,contentId:m}=l;if(!m||m!==((r=e.builderContextSignal.content)==null?void 0:r.id))return;u&&s({meta:{breakpoints:u}}),h(g+1);break}case"builder.contentUpdate":{const l=i.data,u=l.key||l.alias||l.entry||l.modelName,m=l.data;u===e.model&&(s(m),h(g+1));break}}}function f(){var i,r;const n=(r=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:r.jsCode;n&&c.evaluate({code:n,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})}const[d,b]=o.useState(()=>({})),[v,y]=o.useState(()=>!1);function N(n){var i,r;if(e.builderContextSignal.content){const l=(i=e.builderContextSignal.content)==null?void 0:i.testVariationId,u=(r=e.builderContextSignal.content)==null?void 0:r.id;c._track({type:"click",canTrack:c.getDefaultCanTrack(e.canTrack),contentId:u,apiKey:e.apiKey,variationId:l!==u?l:void 0,...c.getInteractionPropertiesForEvent(n),unique:!v})}v||y(!0)}function L(n){return n.replace(/{{([^}]+)}}/g,(i,r)=>c.evaluate({code:r,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))}function K({url:n,key:i}){c.fetch(n).then(r=>r.json()).then(r=>{var u,m;const l={...e.builderContextSignal.rootState,[i]:r};(m=(u=e.builderContextSignal).rootSetState)==null||m.call(u,l),d[i]=!0}).catch(r=>{console.error("error fetching dynamic data",n,r)})}function C(){var i,r;const n=((r=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:r.httpRequests)??{};Object.entries(n).forEach(([l,u])=>{if(u&&(!d[l]||c.isEditing())){const m=L(u);K({url:m,key:l})}})}function E(){c.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:c.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}function j(n){h(g+1),window.addEventListener("message",S),c.registerInsertMenu(),c.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.includeRefs?{includeRefs:e.includeRefs}:{},...e.enrich?{enrich:e.enrich}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(i=>{var l;const r=c.createRegisterComponentMessage(i);(l=window.parent)==null||l.postMessage(r,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",E)}function w(n){const i=new URL(location.href).searchParams,r=i.get("builder.preview"),l=i.get(`builder.preview.${r}`),u=i.get("apiKey")||i.get("builder.space");r===e.model&&u===e.apiKey&&(!e.content||l===e.content.id)&&c.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(m=>{m&&s(m)})}const q=M.useRouter();return o.useEffect(()=>{var n;return(n=a.current)==null||n.addEventListener("initeditingbldr",j),()=>{var i;return(i=a.current)==null?void 0:i.removeEventListener("initeditingbldr",j)}},[]),o.useEffect(()=>{var n;return(n=a.current)==null||n.addEventListener("initpreviewingbldr",w),()=>{var i;return(i=a.current)==null?void 0:i.removeEventListener("initpreviewingbldr",w)}},[]),o.useEffect(()=>{var n,i;if(c.isBrowser()){if(c.isEditing()&&a.current&&a.current.dispatchEvent(new CustomEvent("initeditingbldr")),e.builderContextSignal.content&&c.getDefaultCanTrack(e.canTrack)){const l=(n=e.builderContextSignal.content)==null?void 0:n.testVariationId,u=(i=e.builderContextSignal.content)==null?void 0:i.id,m=e.apiKey;c._track({type:"impression",canTrack:!0,contentId:u,apiKey:m,variationId:l!==u?l:void 0})}c.isPreviewing()&&a.current}},[]),o.useEffect(()=>{e.apiKey||c.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),f(),C(),E()},[]),o.useEffect(()=>{},[e.content]),o.useEffect(()=>{c.isBrowser()&&(window.removeEventListener("message",S),window.addEventListener("message",S))},[x]),o.useEffect(()=>{f()},[(I=(R=e.builderContextSignal.content)==null?void 0:R.data)==null?void 0:I.jsCode,e.builderContextSignal.rootState]),o.useEffect(()=>{C()},[(T=(P=e.builderContextSignal.content)==null?void 0:P.data)==null?void 0:T.httpRequests]),o.useEffect(()=>{E()},[e.builderContextSignal.rootState]),o.useEffect(()=>()=>{c.isBrowser()&&(window.removeEventListener("message",S),window.removeEventListener("builder:component:stateChangeListenerActivated",E))},[]),t.jsx(Q.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?t.jsx(t.Fragment,{children:o.createElement("div",{key:g,ref:a,onClick:n=>N(n),"builder-content-id":(F=e.builderContextSignal.content)==null?void 0:F.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},className:e.classNameProp},e.children)}):null})}exports.BlockWrapper=V;exports.BlocksWrapper=z;exports.Button=W;exports.CustomCode=$;exports.Embed=J;exports.EnableEditor=X;exports.FragmentComponent=D;exports.Image=U;exports.ImgComponent=G;exports.InteractiveElement=A;exports.SectionComponent=H;exports.Video=O;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use server";"use strict";const n=require("./bundle-
|
|
1
|
+
"use server";"use strict";const n=require("./bundle-620ae296.js");async function s({key:e,value:t}){return n.init(),globalThis._BUILDER_PREVIEW_LRU_CACHE.set(e,t),{[e]:t}}exports.postPreviewContent=s;
|