@builder.io/sdk-react-nextjs 0.14.6 → 0.14.7
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/README.md +8 -2
- package/lib/browser/USE_CLIENT_BUNDLE-9a694813.cjs +21 -0
- package/lib/browser/{USE_CLIENT_BUNDLE-dbef551d.js → USE_CLIENT_BUNDLE-f0eac1bb.js} +143 -136
- package/lib/{edge/USE_SERVER_BUNDLE-abb6c4ae.js → browser/USE_SERVER_BUNDLE-280036e3.js} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-2000e927.cjs → browser/USE_SERVER_BUNDLE-ea761ee7.cjs} +1 -1
- package/lib/browser/{bundle-b2b7ab8b.js → bundle-187b6567.js} +620 -585
- package/lib/browser/bundle-f2d9f409.cjs +168 -0
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +3 -3
- package/lib/{node/USE_CLIENT_BUNDLE-22e26b2f.js → edge/USE_CLIENT_BUNDLE-7cf0df22.js} +143 -136
- package/lib/edge/USE_CLIENT_BUNDLE-bda05805.cjs +21 -0
- package/lib/{node/USE_SERVER_BUNDLE-5a67cb67.cjs → edge/USE_SERVER_BUNDLE-0165e9c2.cjs} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-90b6e155.js → edge/USE_SERVER_BUNDLE-536a078a.js} +1 -1
- package/lib/edge/{bundle-9950e3ec.js → bundle-d26182eb.js} +1253 -1218
- package/lib/edge/{bundle-f4b34118.cjs → bundle-f84983cc.cjs} +35 -35
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +3 -3
- package/lib/{edge/USE_CLIENT_BUNDLE-471a7309.js → node/USE_CLIENT_BUNDLE-04e65a8b.js} +143 -136
- package/lib/node/USE_CLIENT_BUNDLE-4e14ccee.cjs +21 -0
- package/lib/{browser/USE_SERVER_BUNDLE-545db2f7.cjs → node/USE_SERVER_BUNDLE-6f53d199.cjs} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-a6a333bd.js → node/USE_SERVER_BUNDLE-dee3041b.js} +1 -1
- package/lib/node/{bundle-a8519a3b.js → bundle-29f6bee7.js} +245 -210
- package/lib/node/{bundle-9f34ab83.cjs → bundle-b303d0db.cjs} +11 -11
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/package.json +1 -1
- package/types/cjs/components/block/block.helpers.d.ts +4 -0
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/functions/evaluate/evaluate.d.ts +3 -1
- package/types/cjs/functions/evaluate/helpers.d.ts +1 -0
- package/types/esm/components/block/block.helpers.d.ts +4 -0
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/functions/evaluate/evaluate.d.ts +3 -1
- package/types/esm/functions/evaluate/helpers.d.ts +1 -0
- package/lib/browser/USE_CLIENT_BUNDLE-e0428aec.cjs +0 -21
- package/lib/browser/bundle-0de8b96d.cjs +0 -168
- package/lib/edge/USE_CLIENT_BUNDLE-1ce5de06.cjs +0 -21
- package/lib/node/USE_CLIENT_BUNDLE-07b10dcb.cjs +0 -21
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { LRUCache } from "lru-cache";
|
|
4
|
-
import { I as InteractiveElement, B as BlockWrapper, a as BlocksWrapper, D as DynamicRenderer, C as CustomCode, E as Embed, b as ImgComponent, V as Video, c as Button, F as FragmentComponent, d as Image, S as SectionComponent, e as EnableEditor } from "./USE_CLIENT_BUNDLE-
|
|
4
|
+
import { I as InteractiveElement, B as BlockWrapper, a as BlocksWrapper, D as DynamicRenderer, C as CustomCode, E as Embed, b as ImgComponent, V as Video, c as Button, F as FragmentComponent, d as Image, S as SectionComponent, e as EnableEditor } from "./USE_CLIENT_BUNDLE-04e65a8b.js";
|
|
5
5
|
import "next/navigation";
|
|
6
6
|
const EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), isEmptyElement = (e) => typeof e == "string" && EMPTY_HTML_ELEMENTS.has(e.toLowerCase()), TARGET = "rsc", getClassPropName = () => {
|
|
7
7
|
switch (TARGET) {
|
|
@@ -130,7 +130,7 @@ function flattenState({
|
|
|
130
130
|
if (t && r in t)
|
|
131
131
|
return t[r];
|
|
132
132
|
const i = o[r];
|
|
133
|
-
return typeof i == "object" ? flattenState({
|
|
133
|
+
return typeof i == "object" && i !== null ? flattenState({
|
|
134
134
|
rootState: i,
|
|
135
135
|
localState: void 0,
|
|
136
136
|
rootSetState: n ? (a) => {
|
|
@@ -220,34 +220,34 @@ output;
|
|
|
220
220
|
const s = safeDynamicRequire("isolated-vm"), c = fastClone({
|
|
221
221
|
...a,
|
|
222
222
|
...r
|
|
223
|
-
}),
|
|
223
|
+
}), d = getFunctionArguments({
|
|
224
224
|
builder: t,
|
|
225
225
|
context: n,
|
|
226
226
|
event: o,
|
|
227
227
|
state: c
|
|
228
|
-
}),
|
|
229
|
-
|
|
230
|
-
console.log(...
|
|
231
|
-
}),
|
|
232
|
-
set(a,
|
|
233
|
-
}),
|
|
234
|
-
const b = typeof
|
|
228
|
+
}), g = getIsolateContext(), l = g.global;
|
|
229
|
+
l.setSync("global", l.derefInto()), l.setSync("log", function(...m) {
|
|
230
|
+
console.log(...m);
|
|
231
|
+
}), l.setSync(BUILDER_SET_STATE_NAME, function(m, u) {
|
|
232
|
+
set(a, m, u), i == null || i(a);
|
|
233
|
+
}), d.forEach(([m, u]) => {
|
|
234
|
+
const b = typeof u == "object" ? new s.Reference(
|
|
235
235
|
// workaround: methods with default values for arguments is not being cloned over
|
|
236
|
-
|
|
237
|
-
...
|
|
238
|
-
getUserAttributes: () =>
|
|
239
|
-
} :
|
|
236
|
+
m === "builder" ? {
|
|
237
|
+
...u,
|
|
238
|
+
getUserAttributes: () => u.getUserAttributes()
|
|
239
|
+
} : u
|
|
240
240
|
) : null;
|
|
241
|
-
|
|
242
|
-
}),
|
|
241
|
+
l.setSync(getSyncValName(m), b);
|
|
242
|
+
}), l.setSync(INJECTED_IVM_GLOBAL, s);
|
|
243
243
|
const f = processCode({
|
|
244
244
|
code: e,
|
|
245
|
-
args:
|
|
246
|
-
}),
|
|
245
|
+
args: d
|
|
246
|
+
}), p = g.evalSync(f);
|
|
247
247
|
try {
|
|
248
|
-
return JSON.parse(
|
|
248
|
+
return JSON.parse(p);
|
|
249
249
|
} catch {
|
|
250
|
-
return
|
|
250
|
+
return p;
|
|
251
251
|
}
|
|
252
252
|
}, checkIsDefined = (e) => e != null;
|
|
253
253
|
function isNodeRuntime() {
|
|
@@ -260,7 +260,27 @@ const shouldForceBrowserRuntimeInNode = () => {
|
|
|
260
260
|
return !1;
|
|
261
261
|
const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
|
|
262
262
|
return e && t && !n ? (logger.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;
|
|
263
|
-
}, chooseBrowserOrServerEval = (e) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(e) : runInNode(e)
|
|
263
|
+
}, chooseBrowserOrServerEval = (e) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(e) : runInNode(e), _EvalCache = class v {
|
|
264
|
+
static getCacheKey(t) {
|
|
265
|
+
return JSON.stringify({
|
|
266
|
+
...t,
|
|
267
|
+
// replace the event with a random number to break cache
|
|
268
|
+
// thats because we can't serialize the event object due to circular refs in DOM node refs.
|
|
269
|
+
event: t.event ? Math.random() : void 0
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
static getCachedValue(t) {
|
|
273
|
+
return v.cache.get(t);
|
|
274
|
+
}
|
|
275
|
+
static setCachedValue(t, n) {
|
|
276
|
+
v.cache.size > 20 && v.cache.delete(v.cache.keys().next().value), v.cache.set(t, {
|
|
277
|
+
value: n
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
_EvalCache.cacheLimit = 20;
|
|
282
|
+
_EvalCache.cache = /* @__PURE__ */ new Map();
|
|
283
|
+
let EvalCache = _EvalCache;
|
|
264
284
|
function evaluate({
|
|
265
285
|
code: e,
|
|
266
286
|
context: t,
|
|
@@ -268,13 +288,14 @@ function evaluate({
|
|
|
268
288
|
rootState: o,
|
|
269
289
|
rootSetState: r,
|
|
270
290
|
event: i,
|
|
271
|
-
isExpression: a = !0
|
|
291
|
+
isExpression: a = !0,
|
|
292
|
+
enableCache: s
|
|
272
293
|
}) {
|
|
273
294
|
if (e === "") {
|
|
274
295
|
logger.warn("Skipping evaluation of empty code block.");
|
|
275
296
|
return;
|
|
276
297
|
}
|
|
277
|
-
const
|
|
298
|
+
const c = {
|
|
278
299
|
code: parseCode(e, {
|
|
279
300
|
isExpression: a
|
|
280
301
|
}),
|
|
@@ -285,10 +306,20 @@ function evaluate({
|
|
|
285
306
|
rootState: o,
|
|
286
307
|
localState: n
|
|
287
308
|
};
|
|
309
|
+
if (s) {
|
|
310
|
+
const d = EvalCache.getCacheKey(c), g = EvalCache.getCachedValue(d);
|
|
311
|
+
if (g)
|
|
312
|
+
return g.value;
|
|
313
|
+
}
|
|
288
314
|
try {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
315
|
+
const d = chooseBrowserOrServerEval(c);
|
|
316
|
+
if (s) {
|
|
317
|
+
const g = EvalCache.getCacheKey(c);
|
|
318
|
+
EvalCache.setCachedValue(g, d);
|
|
319
|
+
}
|
|
320
|
+
return d;
|
|
321
|
+
} catch (d) {
|
|
322
|
+
logger.error("Failed code evaluation: " + d.message, {
|
|
292
323
|
code: e
|
|
293
324
|
});
|
|
294
325
|
return;
|
|
@@ -316,14 +347,15 @@ const evaluateBindings = ({
|
|
|
316
347
|
}
|
|
317
348
|
};
|
|
318
349
|
for (const s in e.bindings) {
|
|
319
|
-
const c = e.bindings[s],
|
|
350
|
+
const c = e.bindings[s], d = evaluate({
|
|
320
351
|
code: c,
|
|
321
352
|
localState: n,
|
|
322
353
|
rootState: o,
|
|
323
354
|
rootSetState: r,
|
|
324
|
-
context: t
|
|
355
|
+
context: t,
|
|
356
|
+
enableCache: !0
|
|
325
357
|
});
|
|
326
|
-
set(a, s,
|
|
358
|
+
set(a, s, d);
|
|
327
359
|
}
|
|
328
360
|
return a;
|
|
329
361
|
};
|
|
@@ -344,6 +376,48 @@ function getProcessedBlock({
|
|
|
344
376
|
context: t
|
|
345
377
|
}) : a;
|
|
346
378
|
}
|
|
379
|
+
const camelToKebabCase = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), convertStyleMapToCSSArray = (e) => Object.entries(e).map(([n, o]) => {
|
|
380
|
+
if (typeof o == "string")
|
|
381
|
+
return `${camelToKebabCase(n)}: ${o};`;
|
|
382
|
+
}).filter(checkIsDefined), convertStyleMapToCSS = (e) => convertStyleMapToCSSArray(e).join(`
|
|
383
|
+
`), createCssClass = ({
|
|
384
|
+
mediaQuery: e,
|
|
385
|
+
className: t,
|
|
386
|
+
styles: n
|
|
387
|
+
}) => {
|
|
388
|
+
const o = `.${t} {
|
|
389
|
+
${convertStyleMapToCSS(n)}
|
|
390
|
+
}`;
|
|
391
|
+
return e ? `${e} {
|
|
392
|
+
${o}
|
|
393
|
+
}` : o;
|
|
394
|
+
};
|
|
395
|
+
function transformStyleProperty({
|
|
396
|
+
style: e
|
|
397
|
+
}) {
|
|
398
|
+
return e;
|
|
399
|
+
}
|
|
400
|
+
const getStyle = ({
|
|
401
|
+
block: e,
|
|
402
|
+
context: t
|
|
403
|
+
}) => mapStyleObjToStrIfNeeded(transformStyleProperty({
|
|
404
|
+
style: e.style || {},
|
|
405
|
+
context: t,
|
|
406
|
+
block: e
|
|
407
|
+
}));
|
|
408
|
+
function mapStyleObjToStrIfNeeded(e) {
|
|
409
|
+
switch (TARGET) {
|
|
410
|
+
case "svelte":
|
|
411
|
+
case "vue":
|
|
412
|
+
case "solid":
|
|
413
|
+
return convertStyleMapToCSSArray(e).join(" ");
|
|
414
|
+
case "qwik":
|
|
415
|
+
case "reactNative":
|
|
416
|
+
case "react":
|
|
417
|
+
case "rsc":
|
|
418
|
+
return e;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
347
421
|
const getComponent = ({
|
|
348
422
|
block: e,
|
|
349
423
|
context: t,
|
|
@@ -381,20 +455,21 @@ const getComponent = ({
|
|
|
381
455
|
localState: t.localState,
|
|
382
456
|
rootState: t.rootState,
|
|
383
457
|
rootSetState: t.rootSetState,
|
|
384
|
-
context: t.context
|
|
458
|
+
context: t.context,
|
|
459
|
+
enableCache: !0
|
|
385
460
|
});
|
|
386
461
|
if (!Array.isArray(r))
|
|
387
462
|
return;
|
|
388
463
|
const i = n.collection.split(".").pop(), a = n.itemName || (i ? i + "Item" : "item");
|
|
389
|
-
return r.map((c,
|
|
464
|
+
return r.map((c, d) => ({
|
|
390
465
|
context: {
|
|
391
466
|
...t,
|
|
392
467
|
localState: {
|
|
393
468
|
...t.localState,
|
|
394
|
-
$index:
|
|
469
|
+
$index: d,
|
|
395
470
|
$item: c,
|
|
396
471
|
[a]: c,
|
|
397
|
-
[`$${a}Index`]:
|
|
472
|
+
[`$${a}Index`]: d
|
|
398
473
|
}
|
|
399
474
|
},
|
|
400
475
|
block: o
|
|
@@ -441,21 +516,6 @@ const getComponent = ({
|
|
|
441
516
|
min: i,
|
|
442
517
|
default: i + 1
|
|
443
518
|
}, n;
|
|
444
|
-
}, camelToKebabCase = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), convertStyleMapToCSSArray = (e) => Object.entries(e).map(([n, o]) => {
|
|
445
|
-
if (typeof o == "string")
|
|
446
|
-
return `${camelToKebabCase(n)}: ${o};`;
|
|
447
|
-
}).filter(checkIsDefined), convertStyleMapToCSS = (e) => convertStyleMapToCSSArray(e).join(`
|
|
448
|
-
`), createCssClass = ({
|
|
449
|
-
mediaQuery: e,
|
|
450
|
-
className: t,
|
|
451
|
-
styles: n
|
|
452
|
-
}) => {
|
|
453
|
-
const o = `.${t} {
|
|
454
|
-
${convertStyleMapToCSS(n)}
|
|
455
|
-
}`;
|
|
456
|
-
return e ? `${e} {
|
|
457
|
-
${o}
|
|
458
|
-
}` : o;
|
|
459
519
|
};
|
|
460
520
|
function InlinedStyles(e) {
|
|
461
521
|
return /* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
|
|
@@ -472,7 +532,7 @@ function BlockStyles(e) {
|
|
|
472
532
|
});
|
|
473
533
|
return checkIsDefined(r.hide) ? !r.hide : checkIsDefined(r.show) ? r.show : !0;
|
|
474
534
|
}, n = function() {
|
|
475
|
-
var
|
|
535
|
+
var u;
|
|
476
536
|
const r = getProcessedBlock({
|
|
477
537
|
block: e.block,
|
|
478
538
|
localState: e.context.localState,
|
|
@@ -481,29 +541,29 @@ function BlockStyles(e) {
|
|
|
481
541
|
context: e.context.context,
|
|
482
542
|
shouldEvaluateBindings: !0
|
|
483
543
|
}), i = r.responsiveStyles, a = e.context.content, s = getSizesForBreakpoints(
|
|
484
|
-
((
|
|
485
|
-
), c = i == null ? void 0 : i.large,
|
|
486
|
-
if (!
|
|
544
|
+
((u = a == null ? void 0 : a.meta) == null ? void 0 : u.breakpoints) || {}
|
|
545
|
+
), c = i == null ? void 0 : i.large, d = i == null ? void 0 : i.medium, g = i == null ? void 0 : i.small, l = r.id;
|
|
546
|
+
if (!l)
|
|
487
547
|
return "";
|
|
488
548
|
const f = c ? createCssClass({
|
|
489
|
-
className:
|
|
549
|
+
className: l,
|
|
490
550
|
styles: c
|
|
491
|
-
}) : "",
|
|
492
|
-
className:
|
|
493
|
-
styles:
|
|
551
|
+
}) : "", p = d ? createCssClass({
|
|
552
|
+
className: l,
|
|
553
|
+
styles: d,
|
|
494
554
|
mediaQuery: getMaxWidthQueryForSize(
|
|
495
555
|
"medium",
|
|
496
556
|
s
|
|
497
557
|
)
|
|
498
|
-
}) : "",
|
|
499
|
-
className:
|
|
500
|
-
styles:
|
|
558
|
+
}) : "", m = g ? createCssClass({
|
|
559
|
+
className: l,
|
|
560
|
+
styles: g,
|
|
501
561
|
mediaQuery: getMaxWidthQueryForSize(
|
|
502
562
|
"small",
|
|
503
563
|
s
|
|
504
564
|
)
|
|
505
565
|
}) : "";
|
|
506
|
-
return [f,
|
|
566
|
+
return [f, p, m].join(" ");
|
|
507
567
|
};
|
|
508
568
|
return /* @__PURE__ */ jsx(Fragment, { children: n() && t() ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(InlinedStyles, { styles: n() }) }) : null });
|
|
509
569
|
}
|
|
@@ -517,7 +577,8 @@ const getEventHandlerName = (e) => `on${capitalizeFirstLetter(e)}`, createEventH
|
|
|
517
577
|
rootState: t.rootState,
|
|
518
578
|
rootSetState: t.rootSetState,
|
|
519
579
|
event: n,
|
|
520
|
-
isExpression: !1
|
|
580
|
+
isExpression: !1,
|
|
581
|
+
enableCache: !0
|
|
521
582
|
});
|
|
522
583
|
function getBlockActions(e) {
|
|
523
584
|
const t = {}, n = e.block.actions ?? {};
|
|
@@ -539,32 +600,6 @@ function getBlockActions(e) {
|
|
|
539
600
|
}
|
|
540
601
|
return t;
|
|
541
602
|
}
|
|
542
|
-
function transformStyleProperty({
|
|
543
|
-
style: e
|
|
544
|
-
}) {
|
|
545
|
-
return e;
|
|
546
|
-
}
|
|
547
|
-
const getStyle = ({
|
|
548
|
-
block: e,
|
|
549
|
-
context: t
|
|
550
|
-
}) => mapStyleObjToStrIfNeeded(transformStyleProperty({
|
|
551
|
-
style: e.style || {},
|
|
552
|
-
context: t,
|
|
553
|
-
block: e
|
|
554
|
-
}));
|
|
555
|
-
function mapStyleObjToStrIfNeeded(e) {
|
|
556
|
-
switch (TARGET) {
|
|
557
|
-
case "svelte":
|
|
558
|
-
case "vue":
|
|
559
|
-
case "solid":
|
|
560
|
-
return convertStyleMapToCSSArray(e).join(" ");
|
|
561
|
-
case "qwik":
|
|
562
|
-
case "reactNative":
|
|
563
|
-
case "react":
|
|
564
|
-
case "rsc":
|
|
565
|
-
return e;
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
603
|
function transformBlockProperties({
|
|
569
604
|
properties: e
|
|
570
605
|
}) {
|
|
@@ -666,7 +701,7 @@ function RepeatedBlock(e) {
|
|
|
666
701
|
);
|
|
667
702
|
}
|
|
668
703
|
function Block(e) {
|
|
669
|
-
var
|
|
704
|
+
var c, d, g;
|
|
670
705
|
const t = function() {
|
|
671
706
|
return getComponent({
|
|
672
707
|
block: e.block,
|
|
@@ -679,8 +714,8 @@ function Block(e) {
|
|
|
679
714
|
context: e.context
|
|
680
715
|
});
|
|
681
716
|
}, o = function() {
|
|
682
|
-
var
|
|
683
|
-
return (
|
|
717
|
+
var f;
|
|
718
|
+
return (f = e.block.repeat) != null && f.collection ? e.block : getProcessedBlock({
|
|
684
719
|
block: e.block,
|
|
685
720
|
localState: e.context.localState,
|
|
686
721
|
rootState: e.context.rootState,
|
|
@@ -689,43 +724,43 @@ function Block(e) {
|
|
|
689
724
|
shouldEvaluateBindings: !0
|
|
690
725
|
});
|
|
691
726
|
}, r = function() {
|
|
692
|
-
var
|
|
693
|
-
return e.block.tagName === "a" || ((
|
|
727
|
+
var p;
|
|
728
|
+
return e.block.tagName === "a" || ((p = o().properties) == null ? void 0 : p.href) || o().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
694
729
|
}, i = function() {
|
|
695
|
-
var
|
|
696
|
-
if ((
|
|
697
|
-
return !!((
|
|
698
|
-
const
|
|
699
|
-
return ("show" in o() ? o().show : !0) && !
|
|
730
|
+
var m, u;
|
|
731
|
+
if ((m = e.block.repeat) != null && m.collection)
|
|
732
|
+
return !!((u = n()) != null && u.length);
|
|
733
|
+
const f = "hide" in o() ? o().hide : !1;
|
|
734
|
+
return ("show" in o() ? o().show : !0) && !f;
|
|
700
735
|
}, a = function() {
|
|
701
|
-
var
|
|
702
|
-
return !((
|
|
736
|
+
var p;
|
|
737
|
+
return !((p = t()) != null && p.component) && !n() ? o().children ?? [] : [];
|
|
703
738
|
}, s = function() {
|
|
704
|
-
var
|
|
739
|
+
var f, p, m, u, b, h, S, k, y, C;
|
|
705
740
|
return {
|
|
706
741
|
blockChildren: o().children ?? [],
|
|
707
|
-
componentRef: (
|
|
742
|
+
componentRef: (f = t()) == null ? void 0 : f.component,
|
|
708
743
|
componentOptions: {
|
|
709
744
|
...getBlockComponentOptions(o()),
|
|
710
745
|
builderContext: e.context,
|
|
711
|
-
...((
|
|
746
|
+
...((p = t()) == null ? void 0 : p.name) === "Core:Button" || ((m = t()) == null ? void 0 : m.name) === "Symbol" || ((u = t()) == null ? void 0 : u.name) === "Columns" || ((b = t()) == null ? void 0 : b.name) === "Form:Form" ? {
|
|
712
747
|
builderLinkComponent: e.linkComponent
|
|
713
748
|
} : {},
|
|
714
|
-
...((
|
|
749
|
+
...((h = t()) == null ? void 0 : h.name) === "Symbol" || ((S = t()) == null ? void 0 : S.name) === "Columns" || ((k = t()) == null ? void 0 : k.name) === "Form:Form" ? {
|
|
715
750
|
builderComponents: e.registeredComponents
|
|
716
751
|
} : {}
|
|
717
752
|
},
|
|
718
|
-
context:
|
|
753
|
+
context: e.context,
|
|
719
754
|
linkComponent: e.linkComponent,
|
|
720
755
|
registeredComponents: e.registeredComponents,
|
|
721
756
|
builderBlock: o(),
|
|
722
|
-
includeBlockProps: ((
|
|
723
|
-
isInteractive: !((
|
|
757
|
+
includeBlockProps: ((y = t()) == null ? void 0 : y.noWrap) === !0,
|
|
758
|
+
isInteractive: !((C = t()) != null && C.isRSC)
|
|
724
759
|
};
|
|
725
|
-
}
|
|
760
|
+
};
|
|
726
761
|
return /* @__PURE__ */ jsx(Fragment, { children: i() ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
727
762
|
/* @__PURE__ */ jsx(BlockStyles, { block: e.block, context: e.context }),
|
|
728
|
-
(
|
|
763
|
+
(c = t()) != null && c.noWrap ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
729
764
|
ComponentRef,
|
|
730
765
|
{
|
|
731
766
|
componentRef: s().componentRef,
|
|
@@ -738,16 +773,16 @@ function Block(e) {
|
|
|
738
773
|
includeBlockProps: s().includeBlockProps,
|
|
739
774
|
isInteractive: s().isInteractive
|
|
740
775
|
}
|
|
741
|
-
) }) : /* @__PURE__ */ jsx(Fragment, { children: n() ? /* @__PURE__ */ jsx(Fragment, { children: (
|
|
776
|
+
) }) : /* @__PURE__ */ jsx(Fragment, { children: n() ? /* @__PURE__ */ jsx(Fragment, { children: (g = n()) == null ? void 0 : g.map((l, f) => /* @__PURE__ */ jsx(
|
|
742
777
|
RepeatedBlock,
|
|
743
778
|
{
|
|
744
|
-
repeatContext:
|
|
745
|
-
block:
|
|
779
|
+
repeatContext: l.context,
|
|
780
|
+
block: l.block,
|
|
746
781
|
registeredComponents: e.registeredComponents,
|
|
747
782
|
linkComponent: e.linkComponent
|
|
748
783
|
},
|
|
749
|
-
|
|
750
|
-
)) }) : /* @__PURE__ */
|
|
784
|
+
f
|
|
785
|
+
)) }) : /* @__PURE__ */ jsxs(
|
|
751
786
|
BlockWrapper,
|
|
752
787
|
{
|
|
753
788
|
Wrapper: r(),
|
|
@@ -769,19 +804,19 @@ function Block(e) {
|
|
|
769
804
|
isInteractive: s().isInteractive
|
|
770
805
|
}
|
|
771
806
|
),
|
|
772
|
-
(
|
|
807
|
+
(d = a()) == null ? void 0 : d.map((l) => /* @__PURE__ */ jsx(
|
|
773
808
|
Block,
|
|
774
809
|
{
|
|
775
|
-
block:
|
|
776
|
-
context: c,
|
|
810
|
+
block: l,
|
|
777
811
|
registeredComponents: e.registeredComponents,
|
|
778
|
-
linkComponent: e.linkComponent
|
|
812
|
+
linkComponent: e.linkComponent,
|
|
813
|
+
context: e.context
|
|
779
814
|
},
|
|
780
|
-
|
|
815
|
+
l.id
|
|
781
816
|
))
|
|
782
817
|
]
|
|
783
818
|
}
|
|
784
|
-
) })
|
|
819
|
+
) })
|
|
785
820
|
] }) : null });
|
|
786
821
|
}
|
|
787
822
|
function Blocks(e) {
|
|
@@ -809,24 +844,24 @@ function Blocks(e) {
|
|
|
809
844
|
);
|
|
810
845
|
}
|
|
811
846
|
function Columns(e) {
|
|
812
|
-
var
|
|
813
|
-
const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", r = function(
|
|
847
|
+
var p;
|
|
848
|
+
const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", r = function(u) {
|
|
814
849
|
var b;
|
|
815
|
-
return ((b = n[
|
|
816
|
-
}, i = function(
|
|
850
|
+
return ((b = n[u]) == null ? void 0 : b.width) || 100 / n.length;
|
|
851
|
+
}, i = function(u) {
|
|
817
852
|
const b = t * (n.length - 1) / n.length;
|
|
818
|
-
return `calc(${r(
|
|
853
|
+
return `calc(${r(u)}% - ${b}px)`;
|
|
819
854
|
}, a = function({
|
|
820
|
-
stackedStyle:
|
|
855
|
+
stackedStyle: u,
|
|
821
856
|
desktopStyle: b
|
|
822
857
|
}) {
|
|
823
|
-
return o === "tablet" ?
|
|
858
|
+
return o === "tablet" ? u : b;
|
|
824
859
|
}, s = function({
|
|
825
|
-
stackedStyle:
|
|
860
|
+
stackedStyle: u,
|
|
826
861
|
desktopStyle: b
|
|
827
862
|
}) {
|
|
828
|
-
return o === "never" ? b :
|
|
829
|
-
}, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
863
|
+
return o === "never" ? b : u;
|
|
864
|
+
}, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", d = function() {
|
|
830
865
|
return {
|
|
831
866
|
"--flex-dir": c,
|
|
832
867
|
"--flex-dir-tablet": a({
|
|
@@ -834,19 +869,19 @@ function Columns(e) {
|
|
|
834
869
|
desktopStyle: "row"
|
|
835
870
|
})
|
|
836
871
|
};
|
|
837
|
-
},
|
|
838
|
-
const b =
|
|
872
|
+
}, g = function(u) {
|
|
873
|
+
const b = u === 0 ? 0 : t, h = i(u), S = `${b}px`, k = "100%", y = 0;
|
|
839
874
|
return {
|
|
840
875
|
...{
|
|
841
876
|
display: "flex",
|
|
842
877
|
flexDirection: "column",
|
|
843
878
|
alignItems: "stretch"
|
|
844
879
|
},
|
|
845
|
-
width:
|
|
880
|
+
width: h,
|
|
846
881
|
["marginLeft"]: S,
|
|
847
882
|
"--column-width-mobile": s({
|
|
848
883
|
stackedStyle: k,
|
|
849
|
-
desktopStyle:
|
|
884
|
+
desktopStyle: h
|
|
850
885
|
}),
|
|
851
886
|
"--column-margin-left-mobile": s({
|
|
852
887
|
stackedStyle: y,
|
|
@@ -854,21 +889,21 @@ function Columns(e) {
|
|
|
854
889
|
}),
|
|
855
890
|
"--column-width-tablet": a({
|
|
856
891
|
stackedStyle: k,
|
|
857
|
-
desktopStyle:
|
|
892
|
+
desktopStyle: h
|
|
858
893
|
}),
|
|
859
894
|
"--column-margin-left-tablet": a({
|
|
860
895
|
stackedStyle: y,
|
|
861
896
|
desktopStyle: S
|
|
862
897
|
})
|
|
863
898
|
};
|
|
864
|
-
},
|
|
865
|
-
var
|
|
899
|
+
}, l = function(u) {
|
|
900
|
+
var h, S;
|
|
866
901
|
return getSizesForBreakpoints(
|
|
867
|
-
((S = (
|
|
868
|
-
)[
|
|
902
|
+
((S = (h = e.builderContext.content) == null ? void 0 : h.meta) == null ? void 0 : S.breakpoints) || {}
|
|
903
|
+
)[u].max;
|
|
869
904
|
}, f = function() {
|
|
870
905
|
return `
|
|
871
|
-
@media (max-width: ${
|
|
906
|
+
@media (max-width: ${l("medium")}px) {
|
|
872
907
|
.${e.builderBlock.id}-breakpoints {
|
|
873
908
|
flex-direction: var(--flex-dir-tablet);
|
|
874
909
|
align-items: stretch;
|
|
@@ -880,7 +915,7 @@ function Columns(e) {
|
|
|
880
915
|
}
|
|
881
916
|
}
|
|
882
917
|
|
|
883
|
-
@media (max-width: ${
|
|
918
|
+
@media (max-width: ${l("small")}px) {
|
|
884
919
|
.${e.builderBlock.id}-breakpoints {
|
|
885
920
|
flex-direction: var(--flex-dir);
|
|
886
921
|
align-items: stretch;
|
|
@@ -897,26 +932,26 @@ function Columns(e) {
|
|
|
897
932
|
/* @__PURE__ */ jsxs(
|
|
898
933
|
"div",
|
|
899
934
|
{
|
|
900
|
-
className: `builder-columns ${e.builderBlock.id}-breakpoints div-
|
|
901
|
-
style:
|
|
935
|
+
className: `builder-columns ${e.builderBlock.id}-breakpoints div-7e6263b2`,
|
|
936
|
+
style: d(),
|
|
902
937
|
children: [
|
|
903
|
-
/* @__PURE__ */ jsx(
|
|
904
|
-
(
|
|
938
|
+
/* @__PURE__ */ jsx(InlinedStyles, { styles: f() }),
|
|
939
|
+
(p = e.columns) == null ? void 0 : p.map((m, u) => /* @__PURE__ */ jsx(
|
|
905
940
|
DynamicRenderer,
|
|
906
941
|
{
|
|
907
|
-
TagName:
|
|
942
|
+
TagName: m.link ? e.builderLinkComponent || "a" : "div",
|
|
908
943
|
actionAttributes: {},
|
|
909
944
|
attributes: {
|
|
910
|
-
...
|
|
911
|
-
href:
|
|
945
|
+
...m.link ? {
|
|
946
|
+
href: m.link
|
|
912
947
|
} : {},
|
|
913
948
|
[getClassPropName()]: "builder-column",
|
|
914
|
-
style: mapStyleObjToStrIfNeeded(
|
|
949
|
+
style: mapStyleObjToStrIfNeeded(g(u))
|
|
915
950
|
},
|
|
916
951
|
children: /* @__PURE__ */ jsx(
|
|
917
952
|
Blocks,
|
|
918
953
|
{
|
|
919
|
-
path: `component.options.columns.${
|
|
954
|
+
path: `component.options.columns.${u}.blocks`,
|
|
920
955
|
parent: e.builderBlock.id,
|
|
921
956
|
styleProp: {
|
|
922
957
|
flexGrow: "1"
|
|
@@ -924,16 +959,16 @@ function Columns(e) {
|
|
|
924
959
|
context: e.builderContext,
|
|
925
960
|
registeredComponents: e.builderComponents,
|
|
926
961
|
linkComponent: e.builderLinkComponent,
|
|
927
|
-
blocks:
|
|
962
|
+
blocks: m.blocks
|
|
928
963
|
}
|
|
929
964
|
)
|
|
930
965
|
},
|
|
931
|
-
|
|
966
|
+
u
|
|
932
967
|
))
|
|
933
968
|
]
|
|
934
969
|
}
|
|
935
970
|
),
|
|
936
|
-
/* @__PURE__ */ jsx("style", { children: `.div-
|
|
971
|
+
/* @__PURE__ */ jsx("style", { children: `.div-7e6263b2 {
|
|
937
972
|
display: flex;
|
|
938
973
|
line-height: normal;
|
|
939
974
|
}` })
|
|
@@ -1365,15 +1400,15 @@ const getTopLevelDomain = (e) => {
|
|
|
1365
1400
|
onChange: (e) => {
|
|
1366
1401
|
e.delete("srcset"), e.delete("noWebp");
|
|
1367
1402
|
function n(a, s = 6e4) {
|
|
1368
|
-
return new Promise((c,
|
|
1369
|
-
const
|
|
1370
|
-
let
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
},
|
|
1374
|
-
console.warn("Image load failed", f.error),
|
|
1375
|
-
}),
|
|
1376
|
-
|
|
1403
|
+
return new Promise((c, d) => {
|
|
1404
|
+
const g = document.createElement("img");
|
|
1405
|
+
let l = !1;
|
|
1406
|
+
g.onload = () => {
|
|
1407
|
+
l = !0, c(g);
|
|
1408
|
+
}, g.addEventListener("error", (f) => {
|
|
1409
|
+
console.warn("Image load failed", f.error), d(f.error);
|
|
1410
|
+
}), g.src = a, setTimeout(() => {
|
|
1411
|
+
l || d(new Error("Image load timed out"));
|
|
1377
1412
|
}, s);
|
|
1378
1413
|
});
|
|
1379
1414
|
}
|
|
@@ -1960,40 +1995,40 @@ const DEFAULT_API_VERSION = "v3", BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUIL
|
|
|
1960
1995
|
enrich: a,
|
|
1961
1996
|
locale: s,
|
|
1962
1997
|
apiVersion: c = DEFAULT_API_VERSION,
|
|
1963
|
-
fields:
|
|
1964
|
-
omit:
|
|
1965
|
-
offset:
|
|
1998
|
+
fields: d,
|
|
1999
|
+
omit: g,
|
|
2000
|
+
offset: l,
|
|
1966
2001
|
cacheSeconds: f,
|
|
1967
|
-
staleCacheSeconds:
|
|
1968
|
-
sort:
|
|
1969
|
-
includeUnpublished:
|
|
2002
|
+
staleCacheSeconds: p,
|
|
2003
|
+
sort: m,
|
|
2004
|
+
includeUnpublished: u
|
|
1970
2005
|
} = e;
|
|
1971
2006
|
if (!i)
|
|
1972
2007
|
throw new Error("Missing API key");
|
|
1973
2008
|
if (!["v3"].includes(c))
|
|
1974
2009
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${c}'`);
|
|
1975
|
-
const b = t !== 1,
|
|
1976
|
-
if (
|
|
2010
|
+
const b = t !== 1, h = new URL(`https://cdn.builder.io/api/${c}/content/${r}`);
|
|
2011
|
+
if (h.searchParams.set("apiKey", i), h.searchParams.set("limit", String(t)), h.searchParams.set("noTraverse", String(b)), h.searchParams.set("includeRefs", String(!0)), s && h.searchParams.set("locale", s), a && h.searchParams.set("enrich", String(a)), h.searchParams.set("omit", g || "meta.componentsUsed"), d && h.searchParams.set("fields", d), Number.isFinite(l) && l > -1 && h.searchParams.set("offset", String(Math.floor(l))), typeof u == "boolean" && h.searchParams.set("includeUnpublished", String(u)), f && isPositiveNumber(f) && h.searchParams.set("cacheSeconds", String(f)), p && isPositiveNumber(p) && h.searchParams.set("staleCacheSeconds", String(p)), m) {
|
|
1977
2012
|
const y = flatten({
|
|
1978
|
-
sort:
|
|
2013
|
+
sort: m
|
|
1979
2014
|
});
|
|
1980
2015
|
for (const C in y)
|
|
1981
|
-
|
|
2016
|
+
h.searchParams.set(C, JSON.stringify(y[C]));
|
|
1982
2017
|
}
|
|
1983
2018
|
const S = {
|
|
1984
2019
|
...getBuilderSearchParamsFromWindow(),
|
|
1985
2020
|
...normalizeSearchParams(e.options || {})
|
|
1986
2021
|
}, k = flatten(S);
|
|
1987
2022
|
for (const y in k)
|
|
1988
|
-
|
|
1989
|
-
if (n &&
|
|
2023
|
+
h.searchParams.set(y, String(k[y]));
|
|
2024
|
+
if (n && h.searchParams.set("userAttributes", JSON.stringify(n)), o) {
|
|
1990
2025
|
const y = flatten({
|
|
1991
2026
|
query: o
|
|
1992
2027
|
});
|
|
1993
2028
|
for (const C in y)
|
|
1994
|
-
|
|
2029
|
+
h.searchParams.set(C, JSON.stringify(y[C]));
|
|
1995
2030
|
}
|
|
1996
|
-
return
|
|
2031
|
+
return h;
|
|
1997
2032
|
}, checkContentHasResults = (e) => "results" in e;
|
|
1998
2033
|
async function fetchOneEntry(e) {
|
|
1999
2034
|
const t = await fetchEntries({
|
|
@@ -2237,7 +2272,7 @@ function isFromTrustedHost(e, t) {
|
|
|
2237
2272
|
const n = new URL(t.origin), o = n.hostname;
|
|
2238
2273
|
return (e || DEFAULT_TRUSTED_HOSTS).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
|
|
2239
2274
|
}
|
|
2240
|
-
const SDK_VERSION = "0.14.
|
|
2275
|
+
const SDK_VERSION = "0.14.7", registry = {};
|
|
2241
2276
|
function register(e, t) {
|
|
2242
2277
|
let n = registry[e];
|
|
2243
2278
|
if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
|
|
@@ -2307,33 +2342,33 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
2307
2342
|
if (r != null && r.type)
|
|
2308
2343
|
switch (r.type) {
|
|
2309
2344
|
case "builder.evaluate": {
|
|
2310
|
-
const s = r.data.text, c = r.data.arguments || [],
|
|
2311
|
-
let
|
|
2345
|
+
const s = r.data.text, c = r.data.arguments || [], d = r.data.id, g = new Function(s);
|
|
2346
|
+
let l, f = null;
|
|
2312
2347
|
try {
|
|
2313
|
-
|
|
2314
|
-
} catch (
|
|
2315
|
-
f =
|
|
2348
|
+
l = g.apply(null, c);
|
|
2349
|
+
} catch (p) {
|
|
2350
|
+
f = p;
|
|
2316
2351
|
}
|
|
2317
2352
|
f ? (i = window.parent) == null || i.postMessage({
|
|
2318
2353
|
type: "builder.evaluateError",
|
|
2319
2354
|
data: {
|
|
2320
|
-
id:
|
|
2355
|
+
id: d,
|
|
2321
2356
|
error: f.message
|
|
2322
2357
|
}
|
|
2323
|
-
}, "*") :
|
|
2324
|
-
var
|
|
2325
|
-
(
|
|
2358
|
+
}, "*") : l && typeof l.then == "function" ? l.then((p) => {
|
|
2359
|
+
var m;
|
|
2360
|
+
(m = window.parent) == null || m.postMessage({
|
|
2326
2361
|
type: "builder.evaluateResult",
|
|
2327
2362
|
data: {
|
|
2328
|
-
id:
|
|
2329
|
-
result:
|
|
2363
|
+
id: d,
|
|
2364
|
+
result: p
|
|
2330
2365
|
}
|
|
2331
2366
|
}, "*");
|
|
2332
2367
|
}).catch(console.error) : (a = window.parent) == null || a.postMessage({
|
|
2333
2368
|
type: "builder.evaluateResult",
|
|
2334
2369
|
data: {
|
|
2335
|
-
result:
|
|
2336
|
-
id:
|
|
2370
|
+
result: l,
|
|
2371
|
+
id: d
|
|
2337
2372
|
}
|
|
2338
2373
|
}, "*");
|
|
2339
2374
|
break;
|
|
@@ -2520,7 +2555,7 @@ const getRootStateInitialValue = ({
|
|
|
2520
2555
|
meta: e == null ? void 0 : e.meta
|
|
2521
2556
|
} : void 0;
|
|
2522
2557
|
function ContentComponent(e) {
|
|
2523
|
-
var r, i, a, s, c,
|
|
2558
|
+
var r, i, a, s, c, d, g, l, f;
|
|
2524
2559
|
const t = getUpdateVariantVisibilityScript({
|
|
2525
2560
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2526
2561
|
variationId: (r = e.content) == null ? void 0 : r.testVariationId,
|
|
@@ -2530,11 +2565,11 @@ function ContentComponent(e) {
|
|
|
2530
2565
|
...getDefaultRegisteredComponents(),
|
|
2531
2566
|
...e.customComponents || []
|
|
2532
2567
|
].reduce(
|
|
2533
|
-
(
|
|
2534
|
-
...
|
|
2535
|
-
[
|
|
2536
|
-
component:
|
|
2537
|
-
...serializeComponentInfo(
|
|
2568
|
+
(p, { component: m, ...u }) => ({
|
|
2569
|
+
...p,
|
|
2570
|
+
[u.name]: {
|
|
2571
|
+
component: m,
|
|
2572
|
+
...serializeComponentInfo(u)
|
|
2538
2573
|
}
|
|
2539
2574
|
}),
|
|
2540
2575
|
{}
|
|
@@ -2557,9 +2592,9 @@ function ContentComponent(e) {
|
|
|
2557
2592
|
...getDefaultRegisteredComponents(),
|
|
2558
2593
|
...e.customComponents || []
|
|
2559
2594
|
].reduce(
|
|
2560
|
-
(
|
|
2561
|
-
...
|
|
2562
|
-
[
|
|
2595
|
+
(p, { component: m, ...u }) => ({
|
|
2596
|
+
...p,
|
|
2597
|
+
[u.name]: serializeComponentInfo(u)
|
|
2563
2598
|
}),
|
|
2564
2599
|
{}
|
|
2565
2600
|
),
|
|
@@ -2585,19 +2620,19 @@ function ContentComponent(e) {
|
|
|
2585
2620
|
linkComponent: e.linkComponent,
|
|
2586
2621
|
trustedHosts: e.trustedHosts,
|
|
2587
2622
|
children: [
|
|
2588
|
-
e.isSsrAbTest ? /* @__PURE__ */ jsx(
|
|
2589
|
-
/* @__PURE__ */ jsx(
|
|
2623
|
+
e.isSsrAbTest ? /* @__PURE__ */ jsx(InlinedScript, { scriptStr: t }) : null,
|
|
2624
|
+
/* @__PURE__ */ jsx(
|
|
2590
2625
|
ContentStyles,
|
|
2591
2626
|
{
|
|
2592
2627
|
contentId: (a = o.content) == null ? void 0 : a.id,
|
|
2593
2628
|
cssCode: (c = (s = o.content) == null ? void 0 : s.data) == null ? void 0 : c.cssCode,
|
|
2594
|
-
customFonts: (
|
|
2629
|
+
customFonts: (g = (d = o.content) == null ? void 0 : d.data) == null ? void 0 : g.customFonts
|
|
2595
2630
|
}
|
|
2596
|
-
)
|
|
2631
|
+
),
|
|
2597
2632
|
/* @__PURE__ */ jsx(
|
|
2598
2633
|
Blocks,
|
|
2599
2634
|
{
|
|
2600
|
-
blocks: (f = (
|
|
2635
|
+
blocks: (f = (l = o.content) == null ? void 0 : l.data) == null ? void 0 : f.blocks,
|
|
2601
2636
|
context: o,
|
|
2602
2637
|
registeredComponents: n,
|
|
2603
2638
|
linkComponent: e.linkComponent
|
|
@@ -2615,9 +2650,9 @@ function ContentVariants(e) {
|
|
|
2615
2650
|
}), n = function() {
|
|
2616
2651
|
var c;
|
|
2617
2652
|
return getUpdateCookieAndStylesScript(
|
|
2618
|
-
getVariants(e.content).map((
|
|
2619
|
-
id:
|
|
2620
|
-
testRatio:
|
|
2653
|
+
getVariants(e.content).map((d) => ({
|
|
2654
|
+
id: d.testVariationId,
|
|
2655
|
+
testRatio: d.testRatio
|
|
2621
2656
|
})),
|
|
2622
2657
|
((c = e.content) == null ? void 0 : c.id) || ""
|
|
2623
2658
|
);
|
|
@@ -2634,7 +2669,7 @@ function ContentVariants(e) {
|
|
|
2634
2669
|
});
|
|
2635
2670
|
};
|
|
2636
2671
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2637
|
-
!e.__isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ jsx(
|
|
2672
|
+
!e.__isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ jsx(InlinedScript, { scriptStr: getScriptString() }) : null,
|
|
2638
2673
|
t ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2639
2674
|
/* @__PURE__ */ jsx(
|
|
2640
2675
|
InlinedStyles,
|
|
@@ -2716,12 +2751,12 @@ const fetchSymbolContent = async ({
|
|
|
2716
2751
|
async function Symbol$1(e) {
|
|
2717
2752
|
var o, r, i, a, s;
|
|
2718
2753
|
const t = function() {
|
|
2719
|
-
var
|
|
2754
|
+
var d, g;
|
|
2720
2755
|
return [
|
|
2721
2756
|
e.attributes[getClassPropName()],
|
|
2722
2757
|
"builder-symbol",
|
|
2723
|
-
(
|
|
2724
|
-
(
|
|
2758
|
+
(d = e.symbol) != null && d.inline ? "builder-inline-symbol" : void 0,
|
|
2759
|
+
(g = e.symbol) != null && g.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
2725
2760
|
].filter(Boolean).join(" ");
|
|
2726
2761
|
}, n = ((o = e.symbol) == null ? void 0 : o.content) || await fetchSymbolContent({
|
|
2727
2762
|
symbol: e.symbol,
|