@builder.io/sdk-react 3.0.0 → 3.0.1
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/blocks-exports.cjs +31 -31
- package/lib/browser/blocks-exports.mjs +743 -696
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-52c69986.js → server-entry-017b8439.js} +2 -2
- package/lib/browser/server-entry-9f80066e.cjs +2 -0
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-19141399.js → accordion-1572cb0d.js} +1 -1
- package/lib/edge/{accordion-98d9699d.cjs → accordion-decb24cf.cjs} +1 -1
- package/lib/edge/{blocks-7299cf1f.js → blocks-9c35be74.js} +314 -268
- package/lib/edge/blocks-d3823063.cjs +12 -0
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +8 -7
- package/lib/edge/{button-a335b33d.js → button-0709893d.js} +2 -2
- package/lib/edge/{button-90d3b8fd.cjs → button-cf66cf8d.cjs} +1 -1
- package/lib/edge/{columns-96859531.cjs → columns-2fdf0656.cjs} +1 -1
- package/lib/edge/{columns-34eb4f77.js → columns-e234acc6.js} +4 -4
- package/lib/edge/{content-variants-eb0b71da.js → content-variants-3ab9230f.js} +323 -323
- package/lib/edge/content-variants-616a6c0f.cjs +134 -0
- package/lib/edge/{evaluate-84062c52.cjs → evaluate-ccf1ad96.cjs} +1 -1
- package/lib/edge/{evaluate-0793c18a.js → evaluate-f0b82ede.js} +1 -1
- package/lib/edge/{form-f468b835.js → form-27bcc23a.js} +4 -4
- package/lib/edge/{form-99fe0879.cjs → form-7c61693d.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-f431302d.cjs → get-class-prop-name-0b3d48a4.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-79a17608.js → get-class-prop-name-a3bd113c.js} +1 -1
- package/lib/edge/{image-6970c193.js → image-5c9e156f.js} +28 -28
- package/lib/edge/image-94922c87.cjs +17 -0
- package/lib/edge/{img-0d66e9e1.js → img-80be6914.js} +1 -1
- package/lib/edge/{img-da07f7ae.cjs → img-e0c8f7f9.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-5962ba3b.js → input-920922d5.js} +1 -1
- package/lib/edge/{input-f7f73607.cjs → input-f5ba6b1e.cjs} +1 -1
- package/lib/edge/{select-1f1bb9a6.cjs → select-2ced1aca.cjs} +1 -1
- package/lib/edge/{select-74305b69.js → select-673864b7.js} +1 -1
- package/lib/edge/{server-entry-c793e7d2.js → server-entry-6c0047ea.js} +2 -2
- package/lib/edge/server-entry-de142ee8.cjs +2 -0
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-ad2d5248.js → slot-68f2b177.js} +4 -4
- package/lib/edge/{slot-0add1d03.cjs → slot-cc8b4e5b.cjs} +1 -1
- package/lib/edge/{symbol-70bb59b7.js → symbol-7e260a70.js} +2 -2
- package/lib/edge/{symbol-5baac842.cjs → symbol-ded9dba9.cjs} +1 -1
- package/lib/edge/{tabs-0244ee23.js → tabs-5156494d.js} +4 -4
- package/lib/edge/{tabs-a4146223.cjs → tabs-d422921f.cjs} +1 -1
- package/lib/edge/{text-2e3cf22b.js → text-27a917c0.js} +2 -2
- package/lib/edge/{text-214ed248.cjs → text-5796f488.cjs} +1 -1
- package/lib/node/blocks-exports.cjs +30 -30
- package/lib/node/blocks-exports.mjs +710 -663
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +3 -3
- package/lib/node/server-entry-e91e06a3.cjs +2 -0
- package/lib/node/{server-entry-60acf7c6.js → server-entry-fdedc1aa.js} +2 -2
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-bcada801.js → setIvm-8b303d4e.js} +1 -1
- package/lib/node/{setIvm-97b6edac.cjs → setIvm-aba1bed8.cjs} +1 -1
- package/lib/node/setIvm.cjs +1 -1
- package/lib/node/setIvm.mjs +2 -2
- package/lib/node/{should-force-browser-runtime-in-node-f1c78223.js → should-force-browser-runtime-in-node-0a037bde.js} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-16d6b365.cjs → should-force-browser-runtime-in-node-491a9b55.cjs} +1 -1
- package/package.json +1 -1
- package/types/components/block/block.helpers.d.ts +6 -3
- package/types/components/content/components/enable-editor.helpers.d.ts +11 -0
- package/types/constants/file-types.d.ts +2 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/context/types.d.ts +1 -0
- package/types/functions/extract-localized-values.d.ts +2 -0
- package/types/functions/traverse.d.ts +34 -0
- package/types/types/components.d.ts +3 -0
- package/lib/browser/server-entry-f3c2ac77.cjs +0 -2
- package/lib/edge/blocks-672d29ca.cjs +0 -12
- package/lib/edge/content-variants-30e475b2.cjs +0 -134
- package/lib/edge/image-54d2f755.cjs +0 -17
- package/lib/edge/server-entry-4f813956.cjs +0 -2
- package/lib/node/server-entry-e3ec26c9.cjs +0 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { lazy as v, useRef as
|
|
3
|
-
import { isBrowser as j, TARGET as
|
|
4
|
-
import { Video as
|
|
5
|
-
import { triggerAnimation as
|
|
6
|
-
import { evaluate as
|
|
7
|
-
import "./get-class-prop-name-
|
|
1
|
+
import { jsx as h, jsxs as q, Fragment as O } from "react/jsx-runtime";
|
|
2
|
+
import { lazy as v, useRef as $, useState as I, useEffect as V } from "react";
|
|
3
|
+
import { isBrowser as j, TARGET as _, isEditing as F, isPreviewing as ee, registerInsertMenu as le, setupBrowserForEditing as se, createRegisterComponentMessage as de, getDefaultCanTrack as D, _track as z, fetchOneEntry as ce, createEditorListener as ue, logFetch as me, serializeIncludingFunctions as J, logger as pe, handleABTestingSync as fe } from "./server-entry-6c0047ea.js";
|
|
4
|
+
import { Video as ge, Button as he, Columns as be, Fragment as ye, Image as xe, Section as ve, Symbol as Se, Text as Te, BuilderContext as Ie } from "./blocks-exports.mjs";
|
|
5
|
+
import { triggerAnimation as ke, fastClone as Ce, InlinedStyles as te, ComponentsContext as we, Blocks as Ve } from "./blocks-9c35be74.js";
|
|
6
|
+
import { evaluate as ne } from "./evaluate-f0b82ede.js";
|
|
7
|
+
import "./get-class-prop-name-a3bd113c.js";
|
|
8
8
|
import "./dynamic-renderer-8b343325.js";
|
|
9
|
-
const
|
|
9
|
+
const H = {
|
|
10
10
|
"@type": "@builder.io/sdk:Element",
|
|
11
11
|
layerName: "Accordion item title",
|
|
12
12
|
responsiveStyles: {
|
|
@@ -35,7 +35,7 @@ const D = {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}]
|
|
38
|
-
},
|
|
38
|
+
}, L = {
|
|
39
39
|
"@type": "@builder.io/sdk:Element",
|
|
40
40
|
layerName: "Accordion item detail",
|
|
41
41
|
responsiveStyles: {
|
|
@@ -66,7 +66,7 @@ const D = {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
}]
|
|
69
|
-
},
|
|
69
|
+
}, Re = {
|
|
70
70
|
name: "Builder:Accordion",
|
|
71
71
|
canHaveChildren: !0,
|
|
72
72
|
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
@@ -83,19 +83,19 @@ const D = {
|
|
|
83
83
|
name: "title",
|
|
84
84
|
type: "uiBlocks",
|
|
85
85
|
hideFromUI: !0,
|
|
86
|
-
defaultValue: [
|
|
86
|
+
defaultValue: [H]
|
|
87
87
|
}, {
|
|
88
88
|
name: "detail",
|
|
89
89
|
type: "uiBlocks",
|
|
90
90
|
hideFromUI: !0,
|
|
91
|
-
defaultValue: [
|
|
91
|
+
defaultValue: [L]
|
|
92
92
|
}],
|
|
93
93
|
defaultValue: [{
|
|
94
|
-
title: [
|
|
95
|
-
detail: [
|
|
94
|
+
title: [H],
|
|
95
|
+
detail: [L]
|
|
96
96
|
}, {
|
|
97
|
-
title: [
|
|
98
|
-
detail: [
|
|
97
|
+
title: [H],
|
|
98
|
+
detail: [L]
|
|
99
99
|
}],
|
|
100
100
|
showIf: (e) => !e.get("useChildrenForItems")
|
|
101
101
|
}, {
|
|
@@ -130,7 +130,7 @@ const D = {
|
|
|
130
130
|
builderComponents: !0,
|
|
131
131
|
builderLinkComponent: !0
|
|
132
132
|
}
|
|
133
|
-
},
|
|
133
|
+
}, Ee = v(() => import("./accordion-1572cb0d.js")), Fe = {
|
|
134
134
|
name: "Core:Button",
|
|
135
135
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
136
136
|
defaultStyles: {
|
|
@@ -166,7 +166,7 @@ const D = {
|
|
|
166
166
|
shouldReceiveBuilderProps: {
|
|
167
167
|
builderLinkComponent: !0
|
|
168
168
|
}
|
|
169
|
-
},
|
|
169
|
+
}, Pe = {
|
|
170
170
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
171
171
|
name: "Columns",
|
|
172
172
|
isRSC: !0,
|
|
@@ -345,7 +345,7 @@ const D = {
|
|
|
345
345
|
});
|
|
346
346
|
}
|
|
347
347
|
const n = e.get("columns");
|
|
348
|
-
Array.isArray(n) && n.find((
|
|
348
|
+
Array.isArray(n) && n.find((s) => s.get("width")) && (n.find((u) => !u.get("width")) || n.reduce((o, m) => o + m.get("width"), 0) !== 100) && t();
|
|
349
349
|
}
|
|
350
350
|
}, {
|
|
351
351
|
name: "space",
|
|
@@ -373,13 +373,13 @@ const D = {
|
|
|
373
373
|
builderComponents: !0,
|
|
374
374
|
builderLinkComponent: !0
|
|
375
375
|
}
|
|
376
|
-
},
|
|
376
|
+
}, Ae = {
|
|
377
377
|
name: "Fragment",
|
|
378
378
|
static: !0,
|
|
379
379
|
hidden: !0,
|
|
380
380
|
canHaveChildren: !0,
|
|
381
381
|
noWrap: !0
|
|
382
|
-
},
|
|
382
|
+
}, M = ["jpeg", "jpg", "png", "svg", "webp", "gif", "jfif", "pjpeg", "pjp", "apng", "avif", "tif", "tiff", "heif", "bmp", "eps", "raw", "cr2", "nef", "orf", "sr2", "psd", "heic", "dib", "ai"], We = ["mp4", "webm", "mkv", "flv", "vob", "ogv", "ogg", "drc", "gif", "gifv", "mng", "avi", "mov", "qt", "mts", "m2ts", "ts", "wmv", "yuv", "rm", "rmvb", "viv", "asf", "amv", "m4p", "mpeg", "mpe", "m2v", "m4v", "svi", "3gp", "3g2", "mxf", "roq", "nsv", "f4v", "f4p", "f4a", "f4b"], Be = {
|
|
383
383
|
name: "Image",
|
|
384
384
|
static: !0,
|
|
385
385
|
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",
|
|
@@ -394,34 +394,34 @@ const D = {
|
|
|
394
394
|
name: "image",
|
|
395
395
|
type: "file",
|
|
396
396
|
bubble: !0,
|
|
397
|
-
allowedFileTypes:
|
|
397
|
+
allowedFileTypes: M,
|
|
398
398
|
required: !0,
|
|
399
399
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
400
400
|
onChange: (e) => {
|
|
401
401
|
e.delete("srcset"), e.delete("noWebp");
|
|
402
402
|
function n(a, o = 6e4) {
|
|
403
|
-
return new Promise((
|
|
403
|
+
return new Promise((m, S) => {
|
|
404
404
|
const y = document.createElement("img");
|
|
405
|
-
let
|
|
405
|
+
let R = !1;
|
|
406
406
|
y.onload = () => {
|
|
407
|
-
|
|
407
|
+
R = !0, m(y);
|
|
408
408
|
}, y.addEventListener("error", (k) => {
|
|
409
409
|
console.warn("Image load failed", k.error), S(k.error);
|
|
410
410
|
}), y.src = a, setTimeout(() => {
|
|
411
|
-
|
|
411
|
+
R || S(new Error("Image load timed out"));
|
|
412
412
|
}, o);
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
415
|
function i(a) {
|
|
416
416
|
return Math.round(a * 1e3) / 1e3;
|
|
417
417
|
}
|
|
418
|
-
const
|
|
419
|
-
if (fetch(
|
|
418
|
+
const s = e.get("image"), u = e.get("aspectRatio");
|
|
419
|
+
if (fetch(s).then((a) => a.blob()).then((a) => {
|
|
420
420
|
a.type.includes("svg") && e.set("noWebp", !0);
|
|
421
|
-
}),
|
|
422
|
-
return n(
|
|
421
|
+
}), s && (!u || u === 0.7041))
|
|
422
|
+
return n(s).then((a) => {
|
|
423
423
|
const o = e.get("aspectRatio");
|
|
424
|
-
e.get("image") ===
|
|
424
|
+
e.get("image") === s && (!o || o === 0.7041) && a.width && a.height && (e.set("aspectRatio", i(a.height / a.width)), e.set("height", a.height), e.set("width", a.width));
|
|
425
425
|
});
|
|
426
426
|
}
|
|
427
427
|
}, {
|
|
@@ -487,7 +487,7 @@ const D = {
|
|
|
487
487
|
shouldReceiveBuilderProps: {
|
|
488
488
|
builderBlock: !0
|
|
489
489
|
}
|
|
490
|
-
},
|
|
490
|
+
}, De = {
|
|
491
491
|
name: "Core:Section",
|
|
492
492
|
static: !0,
|
|
493
493
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -526,7 +526,7 @@ const D = {
|
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
}]
|
|
529
|
-
},
|
|
529
|
+
}, He = {
|
|
530
530
|
name: "Slot",
|
|
531
531
|
isRSC: !0,
|
|
532
532
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -543,7 +543,7 @@ const D = {
|
|
|
543
543
|
builderContext: !0,
|
|
544
544
|
builderComponents: !0
|
|
545
545
|
}
|
|
546
|
-
},
|
|
546
|
+
}, Le = v(() => import("./slot-68f2b177.js")), Ue = {
|
|
547
547
|
name: "Symbol",
|
|
548
548
|
noWrap: !0,
|
|
549
549
|
static: !0,
|
|
@@ -582,7 +582,7 @@ const D = {
|
|
|
582
582
|
builderComponents: !0,
|
|
583
583
|
builderLinkComponent: !0
|
|
584
584
|
}
|
|
585
|
-
},
|
|
585
|
+
}, U = {
|
|
586
586
|
"@type": "@builder.io/sdk:Element",
|
|
587
587
|
responsiveStyles: {
|
|
588
588
|
large: {
|
|
@@ -620,7 +620,7 @@ const D = {
|
|
|
620
620
|
text: "New tab content "
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
},
|
|
623
|
+
}, Ne = {
|
|
624
624
|
name: "Builder: Tabs",
|
|
625
625
|
inputs: [{
|
|
626
626
|
name: "tabs",
|
|
@@ -630,7 +630,7 @@ const D = {
|
|
|
630
630
|
name: "label",
|
|
631
631
|
type: "uiBlocks",
|
|
632
632
|
hideFromUI: !0,
|
|
633
|
-
defaultValue: [
|
|
633
|
+
defaultValue: [U]
|
|
634
634
|
}, {
|
|
635
635
|
name: "content",
|
|
636
636
|
type: "uiBlocks",
|
|
@@ -639,7 +639,7 @@ const D = {
|
|
|
639
639
|
}],
|
|
640
640
|
defaultValue: [{
|
|
641
641
|
label: [{
|
|
642
|
-
...
|
|
642
|
+
...U,
|
|
643
643
|
component: {
|
|
644
644
|
name: "Text",
|
|
645
645
|
options: {
|
|
@@ -658,7 +658,7 @@ const D = {
|
|
|
658
658
|
}]
|
|
659
659
|
}, {
|
|
660
660
|
label: [{
|
|
661
|
-
...
|
|
661
|
+
...U,
|
|
662
662
|
component: {
|
|
663
663
|
name: "Text",
|
|
664
664
|
options: {
|
|
@@ -723,7 +723,7 @@ const D = {
|
|
|
723
723
|
builderComponents: !0,
|
|
724
724
|
builderLinkComponent: !0
|
|
725
725
|
}
|
|
726
|
-
},
|
|
726
|
+
}, qe = v(() => import("./tabs-5156494d.js")), $e = {
|
|
727
727
|
shouldReceiveBuilderProps: {
|
|
728
728
|
builderBlock: !1,
|
|
729
729
|
builderContext: !0
|
|
@@ -745,7 +745,7 @@ const D = {
|
|
|
745
745
|
height: "auto",
|
|
746
746
|
textAlign: "center"
|
|
747
747
|
}
|
|
748
|
-
},
|
|
748
|
+
}, je = {
|
|
749
749
|
name: "Custom Code",
|
|
750
750
|
static: !0,
|
|
751
751
|
requiredPermissions: ["editCode"],
|
|
@@ -767,7 +767,7 @@ const D = {
|
|
|
767
767
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
768
768
|
advanced: !0
|
|
769
769
|
}]
|
|
770
|
-
},
|
|
770
|
+
}, Ke = v(() => import("./custom-code-7786788e.js")), _e = {
|
|
771
771
|
name: "Embed",
|
|
772
772
|
static: !0,
|
|
773
773
|
inputs: [{
|
|
@@ -782,7 +782,7 @@ const D = {
|
|
|
782
782
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
783
783
|
hideFromUI: !0
|
|
784
784
|
}]
|
|
785
|
-
},
|
|
785
|
+
}, Me = v(() => import("./embed-5c1bbe12.js")), Oe = {
|
|
786
786
|
name: "Form:Form",
|
|
787
787
|
// editableTags: ['builder-form-error']
|
|
788
788
|
defaults: {
|
|
@@ -1019,7 +1019,7 @@ const D = {
|
|
|
1019
1019
|
builderComponents: !0,
|
|
1020
1020
|
builderLinkComponent: !0
|
|
1021
1021
|
}
|
|
1022
|
-
},
|
|
1022
|
+
}, ze = v(() => import("./form-27bcc23a.js")), Je = {
|
|
1023
1023
|
name: "Form:Input",
|
|
1024
1024
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
1025
1025
|
inputs: [
|
|
@@ -1070,7 +1070,7 @@ const D = {
|
|
|
1070
1070
|
borderStyle: "solid",
|
|
1071
1071
|
borderColor: "#ccc"
|
|
1072
1072
|
}
|
|
1073
|
-
},
|
|
1073
|
+
}, Ye = v(() => import("./input-920922d5.js")), Ge = {
|
|
1074
1074
|
name: "Form:Select",
|
|
1075
1075
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
1076
1076
|
defaultStyles: {
|
|
@@ -1112,7 +1112,7 @@ const D = {
|
|
|
1112
1112
|
}],
|
|
1113
1113
|
static: !0,
|
|
1114
1114
|
noWrap: !0
|
|
1115
|
-
},
|
|
1115
|
+
}, Qe = v(() => import("./select-673864b7.js")), Xe = {
|
|
1116
1116
|
name: "Form:SubmitButton",
|
|
1117
1117
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
1118
1118
|
defaultStyles: {
|
|
@@ -1137,7 +1137,7 @@ const D = {
|
|
|
1137
1137
|
// that only shows if advanced setting is flipped
|
|
1138
1138
|
// TODO: defaultChildren
|
|
1139
1139
|
// canHaveChildren: true,
|
|
1140
|
-
},
|
|
1140
|
+
}, Ze = v(() => import("./submit-button-b48361a7.js")), et = {
|
|
1141
1141
|
name: "Form:TextArea",
|
|
1142
1142
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
1143
1143
|
inputs: [{
|
|
@@ -1173,7 +1173,7 @@ const D = {
|
|
|
1173
1173
|
},
|
|
1174
1174
|
static: !0,
|
|
1175
1175
|
noWrap: !0
|
|
1176
|
-
},
|
|
1176
|
+
}, tt = v(() => import("./textarea-d29025e9.js")), nt = {
|
|
1177
1177
|
// friendlyName?
|
|
1178
1178
|
name: "Raw:Img",
|
|
1179
1179
|
hideFromInsertMenu: !0,
|
|
@@ -1182,12 +1182,12 @@ const D = {
|
|
|
1182
1182
|
name: "image",
|
|
1183
1183
|
bubble: !0,
|
|
1184
1184
|
type: "file",
|
|
1185
|
-
allowedFileTypes:
|
|
1185
|
+
allowedFileTypes: M,
|
|
1186
1186
|
required: !0
|
|
1187
1187
|
}],
|
|
1188
1188
|
noWrap: !0,
|
|
1189
1189
|
static: !0
|
|
1190
|
-
},
|
|
1190
|
+
}, at = v(() => import("./img-80be6914.js")), it = {
|
|
1191
1191
|
name: "Video",
|
|
1192
1192
|
canHaveChildren: !0,
|
|
1193
1193
|
defaultStyles: {
|
|
@@ -1198,14 +1198,14 @@ const D = {
|
|
|
1198
1198
|
inputs: [{
|
|
1199
1199
|
name: "video",
|
|
1200
1200
|
type: "file",
|
|
1201
|
-
allowedFileTypes:
|
|
1201
|
+
allowedFileTypes: We,
|
|
1202
1202
|
bubble: !0,
|
|
1203
1203
|
defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",
|
|
1204
1204
|
required: !0
|
|
1205
1205
|
}, {
|
|
1206
1206
|
name: "posterImage",
|
|
1207
1207
|
type: "file",
|
|
1208
|
-
allowedFileTypes:
|
|
1208
|
+
allowedFileTypes: M,
|
|
1209
1209
|
helperText: "Image to show before the video plays"
|
|
1210
1210
|
}, {
|
|
1211
1211
|
name: "autoPlay",
|
|
@@ -1271,40 +1271,34 @@ const D = {
|
|
|
1271
1271
|
shouldReceiveBuilderProps: {
|
|
1272
1272
|
builderBlock: !0
|
|
1273
1273
|
}
|
|
1274
|
-
},
|
|
1275
|
-
component:
|
|
1276
|
-
...
|
|
1277
|
-
}, {
|
|
1278
|
-
component: je,
|
|
1279
|
-
...qe
|
|
1274
|
+
}, ot = () => [{
|
|
1275
|
+
component: Ke,
|
|
1276
|
+
...je
|
|
1280
1277
|
}, {
|
|
1281
1278
|
component: Me,
|
|
1282
|
-
...
|
|
1279
|
+
..._e
|
|
1283
1280
|
}, {
|
|
1284
|
-
component:
|
|
1281
|
+
component: ze,
|
|
1285
1282
|
...Oe
|
|
1286
1283
|
}, {
|
|
1287
|
-
component:
|
|
1288
|
-
...
|
|
1284
|
+
component: Ye,
|
|
1285
|
+
...Je
|
|
1289
1286
|
}, {
|
|
1290
|
-
component:
|
|
1291
|
-
...
|
|
1287
|
+
component: Ze,
|
|
1288
|
+
...Xe
|
|
1292
1289
|
}, {
|
|
1293
|
-
component:
|
|
1290
|
+
component: Qe,
|
|
1294
1291
|
...Ge
|
|
1295
1292
|
}, {
|
|
1296
|
-
component:
|
|
1297
|
-
...
|
|
1298
|
-
}, {
|
|
1299
|
-
component: pe,
|
|
1300
|
-
...tt
|
|
1301
|
-
}], z = () => [{
|
|
1302
|
-
component: ge,
|
|
1303
|
-
...Re
|
|
1293
|
+
component: tt,
|
|
1294
|
+
...et
|
|
1304
1295
|
}, {
|
|
1305
|
-
component:
|
|
1306
|
-
...
|
|
1296
|
+
component: at,
|
|
1297
|
+
...nt
|
|
1307
1298
|
}, {
|
|
1299
|
+
component: ge,
|
|
1300
|
+
...it
|
|
1301
|
+
}], Y = () => [{
|
|
1308
1302
|
component: he,
|
|
1309
1303
|
...Fe
|
|
1310
1304
|
}, {
|
|
@@ -1312,23 +1306,29 @@ const D = {
|
|
|
1312
1306
|
...Pe
|
|
1313
1307
|
}, {
|
|
1314
1308
|
component: ye,
|
|
1315
|
-
...We
|
|
1316
|
-
}, {
|
|
1317
|
-
component: Be,
|
|
1318
1309
|
...Ae
|
|
1319
1310
|
}, {
|
|
1320
1311
|
component: xe,
|
|
1321
|
-
...
|
|
1312
|
+
...Be
|
|
1322
1313
|
}, {
|
|
1323
1314
|
component: ve,
|
|
1324
|
-
...Le
|
|
1325
|
-
}, {
|
|
1326
|
-
component: Ue,
|
|
1327
1315
|
...De
|
|
1328
1316
|
}, {
|
|
1329
|
-
component:
|
|
1330
|
-
...
|
|
1331
|
-
},
|
|
1317
|
+
component: Le,
|
|
1318
|
+
...He
|
|
1319
|
+
}, {
|
|
1320
|
+
component: Se,
|
|
1321
|
+
...Ue
|
|
1322
|
+
}, {
|
|
1323
|
+
component: Te,
|
|
1324
|
+
...$e
|
|
1325
|
+
}, {
|
|
1326
|
+
component: qe,
|
|
1327
|
+
...Ne
|
|
1328
|
+
}, {
|
|
1329
|
+
component: Ee,
|
|
1330
|
+
...Re
|
|
1331
|
+
}, ...ot()], rt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
1332
1332
|
function getAndSetVariantId() {
|
|
1333
1333
|
function setCookie(name, value, days) {
|
|
1334
1334
|
let expires = '';
|
|
@@ -1384,7 +1384,7 @@ const D = {
|
|
|
1384
1384
|
}).join('');
|
|
1385
1385
|
styleEl.innerHTML = newStyleStr;
|
|
1386
1386
|
}
|
|
1387
|
-
}`,
|
|
1387
|
+
}`, lt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
1388
1388
|
if (!navigator.cookieEnabled) {
|
|
1389
1389
|
return;
|
|
1390
1390
|
}
|
|
@@ -1418,27 +1418,27 @@ const D = {
|
|
|
1418
1418
|
thisScriptEl?.remove();
|
|
1419
1419
|
}
|
|
1420
1420
|
return;
|
|
1421
|
-
}`,
|
|
1421
|
+
}`, ae = "builderIoAbTest", ie = "builderIoRenderContent", B = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1422
1422
|
...t,
|
|
1423
1423
|
testVariationId: t.id,
|
|
1424
1424
|
id: e == null ? void 0 : e.id
|
|
1425
|
-
})),
|
|
1425
|
+
})), st = ({
|
|
1426
1426
|
canTrack: e,
|
|
1427
1427
|
content: t
|
|
1428
|
-
}) => !(!(B(t).length > 0) || !e || j()),
|
|
1429
|
-
window.${
|
|
1430
|
-
window.${
|
|
1431
|
-
`,
|
|
1432
|
-
window.${
|
|
1433
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
1434
|
-
)`,
|
|
1428
|
+
}) => !(!(B(t).length > 0) || !e || j()), dt = (e) => e === "react" || e === "reactNative", oe = dt(_), ct = () => `
|
|
1429
|
+
window.${ae} = ${rt}
|
|
1430
|
+
window.${ie} = ${lt}
|
|
1431
|
+
`, ut = (e, t) => `
|
|
1432
|
+
window.${ae}(
|
|
1433
|
+
"${t}",${JSON.stringify(e)}, ${oe}
|
|
1434
|
+
)`, mt = ({
|
|
1435
1435
|
contentId: e,
|
|
1436
1436
|
variationId: t
|
|
1437
|
-
}) => `window.${
|
|
1438
|
-
"${t}", "${e}", ${
|
|
1437
|
+
}) => `window.${ie}(
|
|
1438
|
+
"${t}", "${e}", ${oe}
|
|
1439
1439
|
)`;
|
|
1440
1440
|
function K(e) {
|
|
1441
|
-
return /* @__PURE__ */
|
|
1441
|
+
return /* @__PURE__ */ h(
|
|
1442
1442
|
"script",
|
|
1443
1443
|
{
|
|
1444
1444
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
@@ -1447,10 +1447,10 @@ function K(e) {
|
|
|
1447
1447
|
}
|
|
1448
1448
|
);
|
|
1449
1449
|
}
|
|
1450
|
-
function
|
|
1450
|
+
function G(e) {
|
|
1451
1451
|
return Math.round(e * 1e3) / 1e3;
|
|
1452
1452
|
}
|
|
1453
|
-
const
|
|
1453
|
+
const pt = (e, t, n = !0) => {
|
|
1454
1454
|
if (!(e instanceof HTMLElement))
|
|
1455
1455
|
return null;
|
|
1456
1456
|
let i = n ? e : e.parentElement;
|
|
@@ -1461,39 +1461,39 @@ const ut = (e, t, n = !0) => {
|
|
|
1461
1461
|
return i;
|
|
1462
1462
|
} while (i = i.parentElement);
|
|
1463
1463
|
return null;
|
|
1464
|
-
},
|
|
1464
|
+
}, ft = (e) => pt(e, (t) => {
|
|
1465
1465
|
const n = t.getAttribute("builder-id") || t.id;
|
|
1466
1466
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
1467
|
-
}),
|
|
1467
|
+
}), Q = ({
|
|
1468
1468
|
event: e,
|
|
1469
1469
|
target: t
|
|
1470
1470
|
}) => {
|
|
1471
|
-
const n = t.getBoundingClientRect(), i = e.clientX - n.left,
|
|
1471
|
+
const n = t.getBoundingClientRect(), i = e.clientX - n.left, s = e.clientY - n.top, u = G(i / n.width), a = G(s / n.height);
|
|
1472
1472
|
return {
|
|
1473
|
-
x:
|
|
1473
|
+
x: u,
|
|
1474
1474
|
y: a
|
|
1475
1475
|
};
|
|
1476
|
-
},
|
|
1477
|
-
const t = e.target, n = t &&
|
|
1476
|
+
}, gt = (e) => {
|
|
1477
|
+
const t = e.target, n = t && ft(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
1478
1478
|
return {
|
|
1479
1479
|
targetBuilderElement: i || void 0,
|
|
1480
1480
|
metadata: {
|
|
1481
|
-
targetOffset: t ?
|
|
1481
|
+
targetOffset: t ? Q({
|
|
1482
1482
|
event: e,
|
|
1483
1483
|
target: t
|
|
1484
1484
|
}) : void 0,
|
|
1485
|
-
builderTargetOffset: n ?
|
|
1485
|
+
builderTargetOffset: n ? Q({
|
|
1486
1486
|
event: e,
|
|
1487
1487
|
target: n
|
|
1488
1488
|
}) : void 0,
|
|
1489
1489
|
builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
|
|
1490
1490
|
}
|
|
1491
1491
|
};
|
|
1492
|
-
},
|
|
1493
|
-
var
|
|
1494
|
-
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (
|
|
1495
|
-
let
|
|
1496
|
-
if (i && t && n && (
|
|
1492
|
+
}, ht = ["svelte", "qwik", "vue"], X = () => ht.includes(_) && (F() || ee()), bt = (e) => {
|
|
1493
|
+
var u, a;
|
|
1494
|
+
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (u = e == null ? void 0 : e.files) == null ? void 0 : u.regular;
|
|
1495
|
+
let s = "";
|
|
1496
|
+
if (i && t && n && (s += `
|
|
1497
1497
|
@font-face {
|
|
1498
1498
|
font-family: "${t}";
|
|
1499
1499
|
src: local("${n}"), url('${i}') format('woff2');
|
|
@@ -1505,7 +1505,7 @@ font-weight: 400;
|
|
|
1505
1505
|
if (!(String(Number(o)) === o))
|
|
1506
1506
|
continue;
|
|
1507
1507
|
const S = e.files[o];
|
|
1508
|
-
S && S !== i && (
|
|
1508
|
+
S && S !== i && (s += `
|
|
1509
1509
|
@font-face {
|
|
1510
1510
|
font-family: "${t}";
|
|
1511
1511
|
src: url('${S}') format('woff2');
|
|
@@ -1514,16 +1514,16 @@ font-weight: ${o};
|
|
|
1514
1514
|
}
|
|
1515
1515
|
`.trim());
|
|
1516
1516
|
}
|
|
1517
|
-
return
|
|
1518
|
-
},
|
|
1517
|
+
return s;
|
|
1518
|
+
}, yt = ({
|
|
1519
1519
|
customFonts: e
|
|
1520
1520
|
}) => {
|
|
1521
1521
|
var t;
|
|
1522
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
1523
|
-
},
|
|
1522
|
+
return ((t = e == null ? void 0 : e.map((n) => bt(n))) == null ? void 0 : t.join(" ")) || "";
|
|
1523
|
+
}, xt = ({
|
|
1524
1524
|
cssCode: e,
|
|
1525
1525
|
contentId: t
|
|
1526
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
1526
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", vt = `
|
|
1527
1527
|
.builder-button {
|
|
1528
1528
|
all: unset;
|
|
1529
1529
|
}
|
|
@@ -1540,34 +1540,34 @@ font-weight: ${o};
|
|
|
1540
1540
|
text-align: inherit;
|
|
1541
1541
|
font-family: inherit;
|
|
1542
1542
|
}
|
|
1543
|
-
`,
|
|
1544
|
-
function
|
|
1545
|
-
var
|
|
1546
|
-
const t =
|
|
1547
|
-
function n(
|
|
1548
|
-
var
|
|
1543
|
+
`, St = (e) => e ? "" : vt, Tt = (e) => `variant-${e}`;
|
|
1544
|
+
function It(e) {
|
|
1545
|
+
var f, b, C;
|
|
1546
|
+
const t = $(null);
|
|
1547
|
+
function n(d) {
|
|
1548
|
+
var p, r;
|
|
1549
1549
|
const c = {
|
|
1550
1550
|
...e.builderContextSignal.rootState,
|
|
1551
|
-
...
|
|
1551
|
+
...d
|
|
1552
1552
|
};
|
|
1553
|
-
e.builderContextSignal.rootSetState ? (
|
|
1553
|
+
e.builderContextSignal.rootSetState ? (r = (p = e.builderContextSignal).rootSetState) == null || r.call(p, c) : e.setBuilderContextSignal((l) => ({
|
|
1554
1554
|
...l,
|
|
1555
1555
|
rootState: c
|
|
1556
1556
|
}));
|
|
1557
1557
|
}
|
|
1558
|
-
function i(
|
|
1559
|
-
var
|
|
1558
|
+
function i(d) {
|
|
1559
|
+
var p, r, l, g, T;
|
|
1560
1560
|
const c = {
|
|
1561
1561
|
...e.builderContextSignal.content,
|
|
1562
|
-
...
|
|
1562
|
+
...d,
|
|
1563
1563
|
data: {
|
|
1564
|
-
...(
|
|
1565
|
-
...
|
|
1564
|
+
...(p = e.builderContextSignal.content) == null ? void 0 : p.data,
|
|
1565
|
+
...d == null ? void 0 : d.data
|
|
1566
1566
|
},
|
|
1567
1567
|
meta: {
|
|
1568
|
-
...(
|
|
1569
|
-
...
|
|
1570
|
-
breakpoints: ((l =
|
|
1568
|
+
...(r = e.builderContextSignal.content) == null ? void 0 : r.meta,
|
|
1569
|
+
...d == null ? void 0 : d.meta,
|
|
1570
|
+
breakpoints: ((l = d == null ? void 0 : d.meta) == null ? void 0 : l.breakpoints) || ((T = (g = e.builderContextSignal.content) == null ? void 0 : g.meta) == null ? void 0 : T.breakpoints)
|
|
1571
1571
|
}
|
|
1572
1572
|
};
|
|
1573
1573
|
e.setBuilderContextSignal((x) => ({
|
|
@@ -1575,68 +1575,68 @@ function xt(e) {
|
|
|
1575
1575
|
content: c
|
|
1576
1576
|
}));
|
|
1577
1577
|
}
|
|
1578
|
-
function
|
|
1578
|
+
function s() {
|
|
1579
1579
|
return e.showContent ? {} : {
|
|
1580
1580
|
hidden: !0,
|
|
1581
1581
|
"aria-hidden": !0
|
|
1582
1582
|
};
|
|
1583
1583
|
}
|
|
1584
|
-
const [
|
|
1584
|
+
const [u, a] = I(
|
|
1585
1585
|
() => e.contentWrapper || "div"
|
|
1586
1586
|
);
|
|
1587
|
-
function o(
|
|
1588
|
-
return
|
|
1587
|
+
function o(d) {
|
|
1588
|
+
return ue({
|
|
1589
1589
|
model: e.model,
|
|
1590
1590
|
trustedHosts: e.trustedHosts,
|
|
1591
1591
|
callbacks: {
|
|
1592
1592
|
configureSdk: (c) => {
|
|
1593
1593
|
var l;
|
|
1594
|
-
const { breakpoints:
|
|
1595
|
-
!
|
|
1594
|
+
const { breakpoints: p, contentId: r } = c;
|
|
1595
|
+
!r || r !== ((l = e.builderContextSignal.content) == null ? void 0 : l.id) || p && i({
|
|
1596
1596
|
meta: {
|
|
1597
|
-
breakpoints:
|
|
1597
|
+
breakpoints: p
|
|
1598
1598
|
}
|
|
1599
1599
|
});
|
|
1600
1600
|
},
|
|
1601
1601
|
animation: (c) => {
|
|
1602
|
-
|
|
1602
|
+
ke(c);
|
|
1603
1603
|
},
|
|
1604
1604
|
contentUpdate: (c) => {
|
|
1605
1605
|
i(c);
|
|
1606
1606
|
}
|
|
1607
1607
|
}
|
|
1608
|
-
})(
|
|
1608
|
+
})(d);
|
|
1609
1609
|
}
|
|
1610
|
-
const [
|
|
1611
|
-
function
|
|
1612
|
-
var c,
|
|
1610
|
+
const [m, S] = I(() => ({})), [y, R] = I(() => ({})), [k, P] = I(() => !1);
|
|
1611
|
+
function A(d) {
|
|
1612
|
+
var c, p;
|
|
1613
1613
|
if (e.builderContextSignal.content) {
|
|
1614
|
-
const
|
|
1615
|
-
|
|
1614
|
+
const r = (c = e.builderContextSignal.content) == null ? void 0 : c.testVariationId, l = (p = e.builderContextSignal.content) == null ? void 0 : p.id;
|
|
1615
|
+
z({
|
|
1616
1616
|
apiHost: e.apiHost,
|
|
1617
1617
|
type: "click",
|
|
1618
|
-
canTrack:
|
|
1618
|
+
canTrack: D(e.canTrack),
|
|
1619
1619
|
contentId: l,
|
|
1620
1620
|
apiKey: e.apiKey,
|
|
1621
|
-
variationId:
|
|
1622
|
-
...
|
|
1621
|
+
variationId: r !== l ? r : void 0,
|
|
1622
|
+
...gt(d),
|
|
1623
1623
|
unique: !k
|
|
1624
1624
|
});
|
|
1625
1625
|
}
|
|
1626
|
-
k ||
|
|
1626
|
+
k || P(!0);
|
|
1627
1627
|
}
|
|
1628
1628
|
function W() {
|
|
1629
|
-
var c,
|
|
1630
|
-
const
|
|
1631
|
-
Object.entries(
|
|
1632
|
-
if (!
|
|
1629
|
+
var c, p, r;
|
|
1630
|
+
const d = (r = (p = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : p.httpRequests) != null ? r : {};
|
|
1631
|
+
Object.entries(d).forEach(([l, g]) => {
|
|
1632
|
+
if (!g || y[l] || m[l] && !F())
|
|
1633
1633
|
return;
|
|
1634
1634
|
y[l] = !0;
|
|
1635
|
-
const
|
|
1635
|
+
const T = g.replace(
|
|
1636
1636
|
/{{([^}]+)}}/g,
|
|
1637
|
-
(x,
|
|
1638
|
-
|
|
1639
|
-
code:
|
|
1637
|
+
(x, re) => String(
|
|
1638
|
+
ne({
|
|
1639
|
+
code: re,
|
|
1640
1640
|
context: e.context || {},
|
|
1641
1641
|
localState: void 0,
|
|
1642
1642
|
rootState: e.builderContextSignal.rootState,
|
|
@@ -1644,24 +1644,24 @@ function xt(e) {
|
|
|
1644
1644
|
})
|
|
1645
1645
|
)
|
|
1646
1646
|
);
|
|
1647
|
-
|
|
1647
|
+
me(T), fetch(T).then((x) => x.json()).then((x) => {
|
|
1648
1648
|
n({
|
|
1649
1649
|
[l]: x
|
|
1650
|
-
}),
|
|
1650
|
+
}), m[l] = !0;
|
|
1651
1651
|
}).catch((x) => {
|
|
1652
|
-
console.error("error fetching dynamic data",
|
|
1652
|
+
console.error("error fetching dynamic data", g, x);
|
|
1653
1653
|
}).finally(() => {
|
|
1654
1654
|
y[l] = !1;
|
|
1655
1655
|
});
|
|
1656
1656
|
});
|
|
1657
1657
|
}
|
|
1658
|
-
function
|
|
1659
|
-
|
|
1658
|
+
function w() {
|
|
1659
|
+
F() && window.dispatchEvent(
|
|
1660
1660
|
new CustomEvent(
|
|
1661
1661
|
"builder:component:stateChange",
|
|
1662
1662
|
{
|
|
1663
1663
|
detail: {
|
|
1664
|
-
state:
|
|
1664
|
+
state: Ce(e.builderContextSignal.rootState),
|
|
1665
1665
|
ref: {
|
|
1666
1666
|
name: e.model
|
|
1667
1667
|
}
|
|
@@ -1670,11 +1670,11 @@ function xt(e) {
|
|
|
1670
1670
|
)
|
|
1671
1671
|
);
|
|
1672
1672
|
}
|
|
1673
|
-
const
|
|
1674
|
-
return
|
|
1675
|
-
var
|
|
1673
|
+
const E = $(!1);
|
|
1674
|
+
return E.current || (W(), w(), E.current = !0), V(() => {
|
|
1675
|
+
var d, c;
|
|
1676
1676
|
if (j()) {
|
|
1677
|
-
if (
|
|
1677
|
+
if (F() && !e.isNestedRender && (window.addEventListener("message", o), le(), se({
|
|
1678
1678
|
...e.locale ? {
|
|
1679
1679
|
locale: e.locale
|
|
1680
1680
|
} : {},
|
|
@@ -1686,29 +1686,31 @@ function xt(e) {
|
|
|
1686
1686
|
} : {}
|
|
1687
1687
|
}), Object.values(
|
|
1688
1688
|
e.builderContextSignal.componentInfos
|
|
1689
|
-
).forEach((
|
|
1690
|
-
var
|
|
1691
|
-
|
|
1692
|
-
|
|
1689
|
+
).forEach((r) => {
|
|
1690
|
+
var l, g;
|
|
1691
|
+
if (!e.model || !((l = r.models) != null && l.length) || r.models.includes(e.model)) {
|
|
1692
|
+
const T = de(r);
|
|
1693
|
+
(g = window.parent) == null || g.postMessage(T, "*");
|
|
1694
|
+
}
|
|
1693
1695
|
}), window.addEventListener(
|
|
1694
1696
|
"builder:component:stateChangeListenerActivated",
|
|
1695
|
-
|
|
1696
|
-
)), e.builderContextSignal.content &&
|
|
1697
|
-
const
|
|
1698
|
-
|
|
1697
|
+
w
|
|
1698
|
+
)), e.builderContextSignal.content && D(e.canTrack)) {
|
|
1699
|
+
const r = (d = e.builderContextSignal.content) == null ? void 0 : d.testVariationId, l = (c = e.builderContextSignal.content) == null ? void 0 : c.id, g = e.apiKey;
|
|
1700
|
+
z({
|
|
1699
1701
|
apiHost: e.apiHost,
|
|
1700
1702
|
type: "impression",
|
|
1701
1703
|
canTrack: !0,
|
|
1702
1704
|
contentId: l,
|
|
1703
|
-
apiKey:
|
|
1704
|
-
variationId:
|
|
1705
|
+
apiKey: g,
|
|
1706
|
+
variationId: r !== l ? r : void 0
|
|
1705
1707
|
});
|
|
1706
1708
|
}
|
|
1707
|
-
if (
|
|
1708
|
-
const
|
|
1709
|
+
if (ee() && !F()) {
|
|
1710
|
+
const r = new URL(location.href).searchParams, l = r.get("builder.preview"), g = r.get(
|
|
1709
1711
|
`builder.overrides.${l}`
|
|
1710
|
-
),
|
|
1711
|
-
l === e.model &&
|
|
1712
|
+
), T = r.get("apiKey") || r.get("builder.space");
|
|
1713
|
+
l === e.model && T === e.apiKey && (!e.content || g === e.content.id) && ce({
|
|
1712
1714
|
model: e.model,
|
|
1713
1715
|
apiKey: e.apiKey,
|
|
1714
1716
|
apiVersion: e.builderContextSignal.apiVersion
|
|
@@ -1717,52 +1719,55 @@ function xt(e) {
|
|
|
1717
1719
|
});
|
|
1718
1720
|
}
|
|
1719
1721
|
}
|
|
1720
|
-
}, []),
|
|
1722
|
+
}, []), V(() => {
|
|
1721
1723
|
e.content && i(e.content);
|
|
1722
|
-
}, [e.content]),
|
|
1723
|
-
|
|
1724
|
-
}, [e.builderContextSignal.rootState]),
|
|
1724
|
+
}, [e.content]), V(() => {
|
|
1725
|
+
w();
|
|
1726
|
+
}, [e.builderContextSignal.rootState]), V(() => {
|
|
1725
1727
|
e.data && n(e.data);
|
|
1726
|
-
}, [e.data]),
|
|
1728
|
+
}, [e.data]), V(() => {
|
|
1727
1729
|
e.locale && n({
|
|
1728
1730
|
locale: e.locale
|
|
1729
1731
|
});
|
|
1730
|
-
}, [e.locale]),
|
|
1732
|
+
}, [e.locale]), V(() => () => {
|
|
1731
1733
|
j() && (window.removeEventListener("message", o), window.removeEventListener(
|
|
1732
1734
|
"builder:component:stateChangeListenerActivated",
|
|
1733
|
-
|
|
1735
|
+
w
|
|
1734
1736
|
));
|
|
1735
|
-
}, []), /* @__PURE__ */
|
|
1736
|
-
|
|
1737
|
+
}, []), /* @__PURE__ */ h(Ie.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content || X() ? /* @__PURE__ */ h(
|
|
1738
|
+
u,
|
|
1737
1739
|
{
|
|
1738
1740
|
ref: t,
|
|
1739
|
-
onClick: (
|
|
1740
|
-
"builder-content-id": (
|
|
1741
|
+
onClick: (d) => A(d),
|
|
1742
|
+
"builder-content-id": (f = e.builderContextSignal.content) == null ? void 0 : f.id,
|
|
1741
1743
|
"builder-model": e.model,
|
|
1742
|
-
className:
|
|
1743
|
-
((
|
|
1744
|
+
className: Tt(
|
|
1745
|
+
((b = e.content) == null ? void 0 : b.testVariationId) || ((C = e.content) == null ? void 0 : C.id)
|
|
1744
1746
|
),
|
|
1745
|
-
|
|
1747
|
+
style: {
|
|
1748
|
+
display: !e.builderContextSignal.content && X() ? "none" : void 0
|
|
1749
|
+
},
|
|
1750
|
+
...s(),
|
|
1746
1751
|
...e.contentWrapperProps,
|
|
1747
1752
|
children: e.children
|
|
1748
1753
|
}
|
|
1749
1754
|
) : null });
|
|
1750
1755
|
}
|
|
1751
|
-
function
|
|
1752
|
-
const [t, n] =
|
|
1756
|
+
function kt(e) {
|
|
1757
|
+
const [t, n] = I(
|
|
1753
1758
|
() => `
|
|
1754
|
-
${
|
|
1759
|
+
${xt({
|
|
1755
1760
|
cssCode: e.cssCode,
|
|
1756
1761
|
contentId: e.contentId
|
|
1757
1762
|
})}
|
|
1758
|
-
${
|
|
1763
|
+
${yt({
|
|
1759
1764
|
customFonts: e.customFonts
|
|
1760
1765
|
})}
|
|
1761
|
-
${
|
|
1766
|
+
${St(e.isNestedRender)}
|
|
1762
1767
|
`.trim()
|
|
1763
1768
|
);
|
|
1764
|
-
return /* @__PURE__ */
|
|
1765
|
-
|
|
1769
|
+
return /* @__PURE__ */ h(
|
|
1770
|
+
te,
|
|
1766
1771
|
{
|
|
1767
1772
|
id: "builderio-content",
|
|
1768
1773
|
styles: t,
|
|
@@ -1770,24 +1775,24 @@ ${bt(e.isNestedRender)}
|
|
|
1770
1775
|
}
|
|
1771
1776
|
);
|
|
1772
1777
|
}
|
|
1773
|
-
const
|
|
1778
|
+
const Ct = ({
|
|
1774
1779
|
content: e,
|
|
1775
1780
|
data: t,
|
|
1776
1781
|
locale: n
|
|
1777
1782
|
}) => {
|
|
1778
|
-
var
|
|
1779
|
-
const i = {},
|
|
1780
|
-
return (o = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || o.forEach((
|
|
1781
|
-
|
|
1783
|
+
var u, a, o;
|
|
1784
|
+
const i = {}, s = ((u = e == null ? void 0 : e.data) == null ? void 0 : u.state) || {};
|
|
1785
|
+
return (o = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || o.forEach((m) => {
|
|
1786
|
+
m.name && m.defaultValue !== void 0 && (i[m.name] = m.defaultValue);
|
|
1782
1787
|
}), {
|
|
1783
1788
|
...i,
|
|
1784
|
-
...
|
|
1789
|
+
...s,
|
|
1785
1790
|
...t,
|
|
1786
1791
|
...n ? {
|
|
1787
1792
|
locale: n
|
|
1788
1793
|
} : {}
|
|
1789
1794
|
};
|
|
1790
|
-
},
|
|
1795
|
+
}, wt = ({
|
|
1791
1796
|
content: e,
|
|
1792
1797
|
data: t
|
|
1793
1798
|
}) => e ? {
|
|
@@ -1798,100 +1803,95 @@ const St = ({
|
|
|
1798
1803
|
},
|
|
1799
1804
|
meta: e == null ? void 0 : e.meta
|
|
1800
1805
|
} : void 0;
|
|
1801
|
-
function
|
|
1802
|
-
var S, y,
|
|
1803
|
-
const [t, n] =
|
|
1806
|
+
function Z(e) {
|
|
1807
|
+
var S, y, R, k, P, A, W, w, E;
|
|
1808
|
+
const [t, n] = I(
|
|
1804
1809
|
() => {
|
|
1805
|
-
var
|
|
1806
|
-
return
|
|
1810
|
+
var f, b;
|
|
1811
|
+
return mt({
|
|
1807
1812
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1808
|
-
variationId: (
|
|
1813
|
+
variationId: (f = e.content) == null ? void 0 : f.testVariationId,
|
|
1809
1814
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1810
|
-
contentId: (
|
|
1815
|
+
contentId: (b = e.content) == null ? void 0 : b.id
|
|
1811
1816
|
});
|
|
1812
1817
|
}
|
|
1813
1818
|
);
|
|
1814
|
-
function i(
|
|
1815
|
-
o((
|
|
1816
|
-
...
|
|
1817
|
-
rootState:
|
|
1819
|
+
function i(f) {
|
|
1820
|
+
o((b) => ({
|
|
1821
|
+
...b,
|
|
1822
|
+
rootState: f
|
|
1818
1823
|
}));
|
|
1819
1824
|
}
|
|
1820
|
-
const [
|
|
1821
|
-
() =>
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
..._(r)
|
|
1832
|
-
}
|
|
1833
|
-
}),
|
|
1834
|
-
{}
|
|
1835
|
-
);
|
|
1836
|
-
}
|
|
1837
|
-
), [a, o] = T(() => {
|
|
1838
|
-
var g;
|
|
1839
|
-
return {
|
|
1840
|
-
content: Tt({
|
|
1841
|
-
content: e.content,
|
|
1842
|
-
data: e.data
|
|
1825
|
+
const [s, u] = I(
|
|
1826
|
+
() => [
|
|
1827
|
+
...Y(),
|
|
1828
|
+
...e.customComponents || []
|
|
1829
|
+
].reduce(
|
|
1830
|
+
(f, { component: b, ...C }) => ({
|
|
1831
|
+
...f,
|
|
1832
|
+
[C.name]: {
|
|
1833
|
+
component: b,
|
|
1834
|
+
...J(C)
|
|
1835
|
+
}
|
|
1843
1836
|
}),
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1837
|
+
{}
|
|
1838
|
+
)
|
|
1839
|
+
), [a, o] = I(() => ({
|
|
1840
|
+
content: wt({
|
|
1841
|
+
content: e.content,
|
|
1842
|
+
data: e.data
|
|
1843
|
+
}),
|
|
1844
|
+
localState: void 0,
|
|
1845
|
+
rootState: Ct({
|
|
1846
|
+
content: e.content,
|
|
1847
|
+
data: e.data,
|
|
1848
|
+
locale: e.locale
|
|
1849
|
+
}),
|
|
1850
|
+
rootSetState: i,
|
|
1851
|
+
context: e.context || {},
|
|
1852
|
+
canTrack: e.canTrack,
|
|
1853
|
+
apiKey: e.apiKey,
|
|
1854
|
+
apiVersion: e.apiVersion,
|
|
1855
|
+
componentInfos: [
|
|
1856
|
+
...Y(),
|
|
1857
|
+
...e.customComponents || []
|
|
1858
|
+
].reduce(
|
|
1859
|
+
(f, { component: b, ...C }) => ({
|
|
1860
|
+
...f,
|
|
1861
|
+
[C.name]: J(C)
|
|
1849
1862
|
}),
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
...u,
|
|
1861
|
-
[r.name]: _(r)
|
|
1862
|
-
}),
|
|
1863
|
-
{}
|
|
1864
|
-
),
|
|
1865
|
-
inheritedStyles: {},
|
|
1866
|
-
BlocksWrapper: e.blocksWrapper || "div",
|
|
1867
|
-
BlocksWrapperProps: e.blocksWrapperProps || {},
|
|
1868
|
-
nonce: e.nonce || ""
|
|
1869
|
-
};
|
|
1870
|
-
}), p = q(!1);
|
|
1871
|
-
if (!p.current) {
|
|
1872
|
-
e.apiKey || ce.error(
|
|
1863
|
+
{}
|
|
1864
|
+
),
|
|
1865
|
+
inheritedStyles: {},
|
|
1866
|
+
BlocksWrapper: e.blocksWrapper || "div",
|
|
1867
|
+
BlocksWrapperProps: e.blocksWrapperProps || {},
|
|
1868
|
+
nonce: e.nonce || "",
|
|
1869
|
+
model: e.model || ""
|
|
1870
|
+
})), m = $(!1);
|
|
1871
|
+
if (!m.current) {
|
|
1872
|
+
e.apiKey || pe.error(
|
|
1873
1873
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
1874
1874
|
);
|
|
1875
|
-
const
|
|
1876
|
-
|
|
1877
|
-
code:
|
|
1875
|
+
const f = (y = (S = a.content) == null ? void 0 : S.data) == null ? void 0 : y.jsCode;
|
|
1876
|
+
f && ne({
|
|
1877
|
+
code: f,
|
|
1878
1878
|
context: e.context || {},
|
|
1879
1879
|
localState: void 0,
|
|
1880
1880
|
rootState: a.rootState,
|
|
1881
|
-
rootSetState: (
|
|
1882
|
-
Object.assign(a.rootState,
|
|
1881
|
+
rootSetState: (b) => {
|
|
1882
|
+
Object.assign(a.rootState, b);
|
|
1883
1883
|
},
|
|
1884
1884
|
isExpression: !1
|
|
1885
|
-
}),
|
|
1885
|
+
}), m.current = !0;
|
|
1886
1886
|
}
|
|
1887
|
-
return /* @__PURE__ */
|
|
1888
|
-
|
|
1887
|
+
return /* @__PURE__ */ h(
|
|
1888
|
+
we.Provider,
|
|
1889
1889
|
{
|
|
1890
1890
|
value: {
|
|
1891
|
-
registeredComponents:
|
|
1891
|
+
registeredComponents: s
|
|
1892
1892
|
},
|
|
1893
|
-
children: /* @__PURE__ */
|
|
1894
|
-
|
|
1893
|
+
children: /* @__PURE__ */ q(
|
|
1894
|
+
It,
|
|
1895
1895
|
{
|
|
1896
1896
|
apiHost: e.apiHost,
|
|
1897
1897
|
nonce: e.nonce,
|
|
@@ -1911,7 +1911,7 @@ function Q(e) {
|
|
|
1911
1911
|
isNestedRender: e.isNestedRender,
|
|
1912
1912
|
setBuilderContextSignal: o,
|
|
1913
1913
|
children: [
|
|
1914
|
-
e.isSsrAbTest ? /* @__PURE__ */
|
|
1914
|
+
e.isSsrAbTest ? /* @__PURE__ */ h(
|
|
1915
1915
|
K,
|
|
1916
1916
|
{
|
|
1917
1917
|
id: "builderio-variant-visibility",
|
|
@@ -1919,22 +1919,22 @@ function Q(e) {
|
|
|
1919
1919
|
nonce: e.nonce || ""
|
|
1920
1920
|
}
|
|
1921
1921
|
) : null,
|
|
1922
|
-
/* @__PURE__ */
|
|
1923
|
-
|
|
1922
|
+
/* @__PURE__ */ h(
|
|
1923
|
+
kt,
|
|
1924
1924
|
{
|
|
1925
1925
|
nonce: e.nonce || "",
|
|
1926
1926
|
isNestedRender: e.isNestedRender,
|
|
1927
|
-
contentId: (
|
|
1928
|
-
cssCode: (
|
|
1929
|
-
customFonts: (W = (
|
|
1927
|
+
contentId: (R = a.content) == null ? void 0 : R.id,
|
|
1928
|
+
cssCode: (P = (k = a.content) == null ? void 0 : k.data) == null ? void 0 : P.cssCode,
|
|
1929
|
+
customFonts: (W = (A = a.content) == null ? void 0 : A.data) == null ? void 0 : W.customFonts
|
|
1930
1930
|
}
|
|
1931
1931
|
),
|
|
1932
|
-
/* @__PURE__ */
|
|
1933
|
-
|
|
1932
|
+
/* @__PURE__ */ h(
|
|
1933
|
+
Ve,
|
|
1934
1934
|
{
|
|
1935
|
-
blocks: (
|
|
1935
|
+
blocks: (E = (w = a.content) == null ? void 0 : w.data) == null ? void 0 : E.blocks,
|
|
1936
1936
|
context: a,
|
|
1937
|
-
registeredComponents:
|
|
1937
|
+
registeredComponents: s,
|
|
1938
1938
|
linkComponent: e.linkComponent
|
|
1939
1939
|
}
|
|
1940
1940
|
)
|
|
@@ -1944,57 +1944,57 @@ function Q(e) {
|
|
|
1944
1944
|
}
|
|
1945
1945
|
);
|
|
1946
1946
|
}
|
|
1947
|
-
function
|
|
1947
|
+
function Dt(e) {
|
|
1948
1948
|
var a;
|
|
1949
|
-
const [t, n] =
|
|
1950
|
-
() =>
|
|
1951
|
-
canTrack:
|
|
1949
|
+
const [t, n] = I(
|
|
1950
|
+
() => st({
|
|
1951
|
+
canTrack: D(e.canTrack),
|
|
1952
1952
|
content: e.content
|
|
1953
1953
|
})
|
|
1954
1954
|
);
|
|
1955
1955
|
function i() {
|
|
1956
1956
|
var o;
|
|
1957
|
-
return
|
|
1958
|
-
B(e.content).map((
|
|
1959
|
-
id:
|
|
1960
|
-
testRatio:
|
|
1957
|
+
return ut(
|
|
1958
|
+
B(e.content).map((m) => ({
|
|
1959
|
+
id: m.testVariationId,
|
|
1960
|
+
testRatio: m.testRatio
|
|
1961
1961
|
})),
|
|
1962
1962
|
((o = e.content) == null ? void 0 : o.id) || ""
|
|
1963
1963
|
);
|
|
1964
1964
|
}
|
|
1965
|
-
function
|
|
1965
|
+
function s() {
|
|
1966
1966
|
return B(e.content).map((o) => `.variant-${o.testVariationId} { display: none; } `).join("");
|
|
1967
1967
|
}
|
|
1968
|
-
function
|
|
1968
|
+
function u() {
|
|
1969
1969
|
var o;
|
|
1970
1970
|
return t ? {
|
|
1971
1971
|
...e.content,
|
|
1972
1972
|
testVariationId: (o = e.content) == null ? void 0 : o.id
|
|
1973
|
-
} :
|
|
1973
|
+
} : fe({
|
|
1974
1974
|
item: e.content,
|
|
1975
|
-
canTrack:
|
|
1975
|
+
canTrack: D(e.canTrack)
|
|
1976
1976
|
});
|
|
1977
1977
|
}
|
|
1978
|
-
return
|
|
1979
|
-
}, []), /* @__PURE__ */
|
|
1980
|
-
!e.isNestedRender &&
|
|
1978
|
+
return V(() => {
|
|
1979
|
+
}, []), /* @__PURE__ */ q(O, { children: [
|
|
1980
|
+
!e.isNestedRender && _ !== "reactNative" ? /* @__PURE__ */ h(
|
|
1981
1981
|
K,
|
|
1982
1982
|
{
|
|
1983
1983
|
id: "builderio-init-variants-fns",
|
|
1984
|
-
scriptStr:
|
|
1984
|
+
scriptStr: ct(),
|
|
1985
1985
|
nonce: e.nonce || ""
|
|
1986
1986
|
}
|
|
1987
1987
|
) : null,
|
|
1988
|
-
t ? /* @__PURE__ */
|
|
1989
|
-
/* @__PURE__ */
|
|
1990
|
-
|
|
1988
|
+
t ? /* @__PURE__ */ q(O, { children: [
|
|
1989
|
+
/* @__PURE__ */ h(
|
|
1990
|
+
te,
|
|
1991
1991
|
{
|
|
1992
1992
|
id: "builderio-variants",
|
|
1993
|
-
styles:
|
|
1993
|
+
styles: s(),
|
|
1994
1994
|
nonce: e.nonce || ""
|
|
1995
1995
|
}
|
|
1996
1996
|
),
|
|
1997
|
-
/* @__PURE__ */
|
|
1997
|
+
/* @__PURE__ */ h(
|
|
1998
1998
|
K,
|
|
1999
1999
|
{
|
|
2000
2000
|
id: "builderio-variants-visibility",
|
|
@@ -2002,8 +2002,8 @@ function Pt(e) {
|
|
|
2002
2002
|
nonce: e.nonce || ""
|
|
2003
2003
|
}
|
|
2004
2004
|
),
|
|
2005
|
-
(a = B(e.content)) == null ? void 0 : a.map((o) => /* @__PURE__ */
|
|
2006
|
-
|
|
2005
|
+
(a = B(e.content)) == null ? void 0 : a.map((o) => /* @__PURE__ */ h(
|
|
2006
|
+
Z,
|
|
2007
2007
|
{
|
|
2008
2008
|
apiHost: e.apiHost,
|
|
2009
2009
|
isNestedRender: e.isNestedRender,
|
|
@@ -2030,13 +2030,13 @@ function Pt(e) {
|
|
|
2030
2030
|
o.testVariationId
|
|
2031
2031
|
))
|
|
2032
2032
|
] }) : null,
|
|
2033
|
-
/* @__PURE__ */
|
|
2034
|
-
|
|
2033
|
+
/* @__PURE__ */ h(
|
|
2034
|
+
Z,
|
|
2035
2035
|
{
|
|
2036
2036
|
apiHost: e.apiHost,
|
|
2037
2037
|
nonce: e.nonce,
|
|
2038
2038
|
isNestedRender: e.isNestedRender,
|
|
2039
|
-
content:
|
|
2039
|
+
content: u(),
|
|
2040
2040
|
showContent: !0,
|
|
2041
2041
|
model: e.model,
|
|
2042
2042
|
data: e.data,
|
|
@@ -2059,5 +2059,5 @@ function Pt(e) {
|
|
|
2059
2059
|
] });
|
|
2060
2060
|
}
|
|
2061
2061
|
export {
|
|
2062
|
-
|
|
2062
|
+
Dt as default
|
|
2063
2063
|
};
|