@builder.io/sdk-react 3.0.7 → 4.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 +32 -32
- package/lib/browser/blocks-exports.mjs +837 -796
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-762e29e0.cjs → server-entry-0e0758cb.cjs} +2 -2
- package/lib/browser/{server-entry-20c79b90.js → server-entry-403d3877.js} +33 -16
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-071aa4f9.cjs → accordion-02a74a7b.cjs} +1 -1
- package/lib/edge/{accordion-22c2c037.js → accordion-46e5b47a.js} +1 -1
- package/lib/edge/{blocks-2989e629.js → blocks-27f4c960.js} +2 -2
- package/lib/edge/{blocks-d3f37507.cjs → blocks-43b7cd64.cjs} +1 -1
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-a2cc6565.cjs → button-b1f2e20e.cjs} +1 -1
- package/lib/edge/{button-2b5270c4.js → button-c26a8cc8.js} +2 -2
- package/lib/edge/{columns-b7240242.cjs → columns-5a3e9ac8.cjs} +1 -1
- package/lib/edge/{columns-21b9be25.js → columns-9a6cd1b4.js} +3 -3
- package/lib/edge/{content-variants-88f4dc64.js → content-variants-3085ec74.js} +291 -286
- package/lib/edge/content-variants-eff73ca9.cjs +134 -0
- package/lib/edge/{form-77687883.cjs → form-bf3ca65d.cjs} +1 -1
- package/lib/edge/{form-d29f3cc0.js → form-f2aa1c12.js} +3 -3
- package/lib/edge/{get-class-prop-name-f597545d.cjs → get-class-prop-name-7cdcaf94.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-dbc5d99c.js → get-class-prop-name-e41a3976.js} +1 -1
- package/lib/edge/{img-fed70928.js → img-2a060e61.js} +1 -1
- package/lib/edge/{img-03f9002b.cjs → img-2c718c5f.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-1e548fd0.cjs → input-213f973c.cjs} +1 -1
- package/lib/edge/{input-083c3c35.js → input-f270ae3b.js} +1 -1
- package/lib/edge/{personalization-container-dde10a09.cjs → personalization-container-b03bc073.cjs} +1 -1
- package/lib/edge/{personalization-container-bcff3433.js → personalization-container-b85b14c3.js} +4 -4
- package/lib/edge/{select-21e33225.cjs → select-d6ff55b2.cjs} +1 -1
- package/lib/edge/{select-9f22c2ba.js → select-e12e1a87.js} +1 -1
- package/lib/edge/{server-entry-43a6f5be.js → server-entry-b94c45af.js} +35 -18
- package/lib/edge/{server-entry-ac35a5c8.cjs → server-entry-d0313f00.cjs} +2 -2
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-ca171e8c.js → slot-2670ac48.js} +3 -3
- package/lib/edge/{slot-a9f5d6c0.cjs → slot-5ee0ac5d.cjs} +1 -1
- package/lib/edge/symbol-7e58faf5.cjs +1 -0
- package/lib/edge/{symbol-8f6ff028.js → symbol-a0b2e083.js} +25 -25
- package/lib/edge/{tabs-880c9088.cjs → tabs-1f475bd4.cjs} +1 -1
- package/lib/edge/{tabs-6b67fca2.js → tabs-931291c4.js} +3 -3
- package/lib/edge/{video-a3f10439.js → video-52df64e2.js} +54 -17
- package/lib/edge/video-cc58dd83.cjs +1 -0
- package/lib/node/blocks-exports.cjs +32 -32
- package/lib/node/blocks-exports.mjs +820 -779
- 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-0b433783.cjs → server-entry-24943b12.cjs} +2 -2
- package/lib/node/{server-entry-6626257d.js → server-entry-a017e97a.js} +33 -16
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-5cb298bf.js → setIvm-0a7e7bf0.js} +1 -1
- package/lib/node/{setIvm-49abbae6.cjs → setIvm-dcd69a69.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-11e8399e.cjs → should-force-browser-runtime-in-node-0ca8d8b1.cjs} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-94f1a5b3.js → should-force-browser-runtime-in-node-c51ac820.js} +1 -1
- package/package.json +1 -1
- package/types/components/content-variants/content-variants.types.d.ts +2 -2
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/helpers/subscribe-to-editor.d.ts +15 -13
- package/types/scripts/init-editing.d.ts +3 -1
- package/lib/edge/content-variants-fdd5ee50.cjs +0 -134
- package/lib/edge/symbol-a2015c7e.cjs +0 -1
- package/lib/edge/video-4ecfd08b.cjs +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as y, jsxs as $, Fragment as J } from "react/jsx-runtime";
|
|
2
2
|
import { lazy as v, useRef as _, useState as I, useEffect as V } from "react";
|
|
3
|
-
import { isBrowser as j, TARGET as
|
|
4
|
-
import { Video as
|
|
5
|
-
import { triggerAnimation as
|
|
6
|
-
const
|
|
3
|
+
import { isBrowser as j, TARGET as O, isEditing as P, isPreviewing as ne, registerInsertMenu as se, setupBrowserForEditing as de, createRegisterComponentMessage as ue, getDefaultCanTrack as U, _track as Y, fetchOneEntry as ce, createEditorListener as me, logFetch as pe, serializeIncludingFunctions as G, logger as fe, handleABTestingSync as ge } from "./server-entry-b94c45af.js";
|
|
4
|
+
import { Video as he, Button as be, Columns as ye, Fragment as xe, Image as ve, Section as Se, Symbol as Te, Text as Ie, BuilderContext as ke } from "./blocks-exports.mjs";
|
|
5
|
+
import { triggerAnimation as Ce, evaluate as ae, fastClone as we, InlinedStyles as ie, ComponentsContext as Ve, Blocks as Re } from "./blocks-27f4c960.js";
|
|
6
|
+
const H = {
|
|
7
7
|
"@type": "@builder.io/sdk:Element",
|
|
8
8
|
layerName: "Accordion item title",
|
|
9
9
|
responsiveStyles: {
|
|
@@ -63,7 +63,7 @@ const U = {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}]
|
|
66
|
-
},
|
|
66
|
+
}, Ee = {
|
|
67
67
|
name: "Builder:Accordion",
|
|
68
68
|
canHaveChildren: !0,
|
|
69
69
|
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
@@ -80,7 +80,7 @@ const U = {
|
|
|
80
80
|
name: "title",
|
|
81
81
|
type: "uiBlocks",
|
|
82
82
|
hideFromUI: !0,
|
|
83
|
-
defaultValue: [
|
|
83
|
+
defaultValue: [H]
|
|
84
84
|
}, {
|
|
85
85
|
name: "detail",
|
|
86
86
|
type: "uiBlocks",
|
|
@@ -88,10 +88,10 @@ const U = {
|
|
|
88
88
|
defaultValue: [L]
|
|
89
89
|
}],
|
|
90
90
|
defaultValue: [{
|
|
91
|
-
title: [
|
|
91
|
+
title: [H],
|
|
92
92
|
detail: [L]
|
|
93
93
|
}, {
|
|
94
|
-
title: [
|
|
94
|
+
title: [H],
|
|
95
95
|
detail: [L]
|
|
96
96
|
}],
|
|
97
97
|
showIf: (e) => !e.get("useChildrenForItems")
|
|
@@ -127,7 +127,7 @@ const U = {
|
|
|
127
127
|
builderComponents: !0,
|
|
128
128
|
builderLinkComponent: !0
|
|
129
129
|
}
|
|
130
|
-
},
|
|
130
|
+
}, Fe = v(() => import("./accordion-46e5b47a.js")), Pe = {
|
|
131
131
|
name: "Core:Button",
|
|
132
132
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
133
133
|
defaultStyles: {
|
|
@@ -163,7 +163,7 @@ const U = {
|
|
|
163
163
|
shouldReceiveBuilderProps: {
|
|
164
164
|
builderLinkComponent: !0
|
|
165
165
|
}
|
|
166
|
-
},
|
|
166
|
+
}, We = {
|
|
167
167
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
168
168
|
name: "Columns",
|
|
169
169
|
isRSC: !0,
|
|
@@ -342,7 +342,7 @@ const U = {
|
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
344
|
const n = e.get("columns");
|
|
345
|
-
Array.isArray(n) && n.find((
|
|
345
|
+
Array.isArray(n) && n.find((r) => r.get("width")) && (n.find((d) => !d.get("width")) || n.reduce((o, u) => o + u.get("width"), 0) !== 100) && t();
|
|
346
346
|
}
|
|
347
347
|
}, {
|
|
348
348
|
name: "space",
|
|
@@ -370,13 +370,13 @@ const U = {
|
|
|
370
370
|
builderComponents: !0,
|
|
371
371
|
builderLinkComponent: !0
|
|
372
372
|
}
|
|
373
|
-
},
|
|
373
|
+
}, Ae = {
|
|
374
374
|
name: "Fragment",
|
|
375
375
|
static: !0,
|
|
376
376
|
hidden: !0,
|
|
377
377
|
canHaveChildren: !0,
|
|
378
378
|
noWrap: !0
|
|
379
|
-
}, 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"],
|
|
379
|
+
}, 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"], Be = ["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"], De = {
|
|
380
380
|
name: "Image",
|
|
381
381
|
static: !0,
|
|
382
382
|
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",
|
|
@@ -397,11 +397,11 @@ const U = {
|
|
|
397
397
|
onChange: (e) => {
|
|
398
398
|
e.delete("srcset"), e.delete("noWebp");
|
|
399
399
|
function n(a, o = 6e4) {
|
|
400
|
-
return new Promise((
|
|
400
|
+
return new Promise((u, T) => {
|
|
401
401
|
const S = document.createElement("img");
|
|
402
402
|
let R = !1;
|
|
403
403
|
S.onload = () => {
|
|
404
|
-
R = !0,
|
|
404
|
+
R = !0, u(S);
|
|
405
405
|
}, S.addEventListener("error", (k) => {
|
|
406
406
|
console.warn("Image load failed", k.error), T(k.error);
|
|
407
407
|
}), S.src = a, setTimeout(() => {
|
|
@@ -412,13 +412,13 @@ const U = {
|
|
|
412
412
|
function i(a) {
|
|
413
413
|
return Math.round(a * 1e3) / 1e3;
|
|
414
414
|
}
|
|
415
|
-
const
|
|
416
|
-
if (fetch(
|
|
415
|
+
const r = e.get("image"), d = e.get("aspectRatio");
|
|
416
|
+
if (fetch(r).then((a) => a.blob()).then((a) => {
|
|
417
417
|
a.type.includes("svg") && e.set("noWebp", !0);
|
|
418
|
-
}),
|
|
419
|
-
return n(
|
|
418
|
+
}), r && (!d || d === 0.7041))
|
|
419
|
+
return n(r).then((a) => {
|
|
420
420
|
const o = e.get("aspectRatio");
|
|
421
|
-
e.get("image") ===
|
|
421
|
+
e.get("image") === r && (!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));
|
|
422
422
|
});
|
|
423
423
|
}
|
|
424
424
|
}, {
|
|
@@ -484,7 +484,7 @@ const U = {
|
|
|
484
484
|
shouldReceiveBuilderProps: {
|
|
485
485
|
builderBlock: !0
|
|
486
486
|
}
|
|
487
|
-
},
|
|
487
|
+
}, Ue = {
|
|
488
488
|
name: "PersonalizationContainer",
|
|
489
489
|
shouldReceiveBuilderProps: {
|
|
490
490
|
builderBlock: !0,
|
|
@@ -519,7 +519,7 @@ const U = {
|
|
|
519
519
|
defaultValue: []
|
|
520
520
|
}]
|
|
521
521
|
}]
|
|
522
|
-
}, He = v(() => import("./personalization-container-
|
|
522
|
+
}, He = v(() => import("./personalization-container-b85b14c3.js")), Le = {
|
|
523
523
|
name: "Core:Section",
|
|
524
524
|
static: !0,
|
|
525
525
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -558,7 +558,7 @@ const U = {
|
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
560
|
}]
|
|
561
|
-
},
|
|
561
|
+
}, Ne = {
|
|
562
562
|
name: "Slot",
|
|
563
563
|
isRSC: !0,
|
|
564
564
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -575,7 +575,7 @@ const U = {
|
|
|
575
575
|
builderContext: !0,
|
|
576
576
|
builderComponents: !0
|
|
577
577
|
}
|
|
578
|
-
},
|
|
578
|
+
}, qe = v(() => import("./slot-2670ac48.js")), $e = {
|
|
579
579
|
name: "Symbol",
|
|
580
580
|
noWrap: !0,
|
|
581
581
|
static: !0,
|
|
@@ -652,7 +652,7 @@ const U = {
|
|
|
652
652
|
text: "New tab content "
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
|
-
},
|
|
655
|
+
}, _e = {
|
|
656
656
|
name: "Builder: Tabs",
|
|
657
657
|
inputs: [{
|
|
658
658
|
name: "tabs",
|
|
@@ -755,7 +755,7 @@ const U = {
|
|
|
755
755
|
builderComponents: !0,
|
|
756
756
|
builderLinkComponent: !0
|
|
757
757
|
}
|
|
758
|
-
},
|
|
758
|
+
}, je = v(() => import("./tabs-931291c4.js")), Ke = {
|
|
759
759
|
shouldReceiveBuilderProps: {
|
|
760
760
|
builderBlock: !1,
|
|
761
761
|
builderContext: !0
|
|
@@ -799,7 +799,7 @@ const U = {
|
|
|
799
799
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
800
800
|
advanced: !0
|
|
801
801
|
}]
|
|
802
|
-
},
|
|
802
|
+
}, Me = v(() => import("./custom-code-7786788e.js")), ze = {
|
|
803
803
|
name: "Embed",
|
|
804
804
|
static: !0,
|
|
805
805
|
inputs: [{
|
|
@@ -814,7 +814,7 @@ const U = {
|
|
|
814
814
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
815
815
|
hideFromUI: !0
|
|
816
816
|
}]
|
|
817
|
-
},
|
|
817
|
+
}, Je = v(() => import("./embed-5c1bbe12.js")), Ye = {
|
|
818
818
|
name: "Form:Form",
|
|
819
819
|
// editableTags: ['builder-form-error']
|
|
820
820
|
defaults: {
|
|
@@ -1051,7 +1051,7 @@ const U = {
|
|
|
1051
1051
|
builderComponents: !0,
|
|
1052
1052
|
builderLinkComponent: !0
|
|
1053
1053
|
}
|
|
1054
|
-
},
|
|
1054
|
+
}, Ge = v(() => import("./form-f2aa1c12.js")), Qe = {
|
|
1055
1055
|
name: "Form:Input",
|
|
1056
1056
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
1057
1057
|
inputs: [
|
|
@@ -1102,7 +1102,7 @@ const U = {
|
|
|
1102
1102
|
borderStyle: "solid",
|
|
1103
1103
|
borderColor: "#ccc"
|
|
1104
1104
|
}
|
|
1105
|
-
},
|
|
1105
|
+
}, Xe = v(() => import("./input-f270ae3b.js")), Ze = {
|
|
1106
1106
|
name: "Form:Select",
|
|
1107
1107
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
1108
1108
|
defaultStyles: {
|
|
@@ -1144,7 +1144,7 @@ const U = {
|
|
|
1144
1144
|
}],
|
|
1145
1145
|
static: !0,
|
|
1146
1146
|
noWrap: !0
|
|
1147
|
-
},
|
|
1147
|
+
}, et = v(() => import("./select-e12e1a87.js")), tt = {
|
|
1148
1148
|
name: "Form:SubmitButton",
|
|
1149
1149
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
1150
1150
|
defaultStyles: {
|
|
@@ -1169,7 +1169,7 @@ const U = {
|
|
|
1169
1169
|
// that only shows if advanced setting is flipped
|
|
1170
1170
|
// TODO: defaultChildren
|
|
1171
1171
|
// canHaveChildren: true,
|
|
1172
|
-
},
|
|
1172
|
+
}, nt = v(() => import("./submit-button-b48361a7.js")), at = {
|
|
1173
1173
|
name: "Form:TextArea",
|
|
1174
1174
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
1175
1175
|
inputs: [{
|
|
@@ -1205,7 +1205,7 @@ const U = {
|
|
|
1205
1205
|
},
|
|
1206
1206
|
static: !0,
|
|
1207
1207
|
noWrap: !0
|
|
1208
|
-
},
|
|
1208
|
+
}, it = v(() => import("./textarea-d29025e9.js")), ot = {
|
|
1209
1209
|
// friendlyName?
|
|
1210
1210
|
name: "Raw:Img",
|
|
1211
1211
|
hideFromInsertMenu: !0,
|
|
@@ -1219,7 +1219,7 @@ const U = {
|
|
|
1219
1219
|
}],
|
|
1220
1220
|
noWrap: !0,
|
|
1221
1221
|
static: !0
|
|
1222
|
-
},
|
|
1222
|
+
}, rt = v(() => import("./img-2a060e61.js")), lt = {
|
|
1223
1223
|
name: "Video",
|
|
1224
1224
|
canHaveChildren: !0,
|
|
1225
1225
|
defaultStyles: {
|
|
@@ -1230,7 +1230,7 @@ const U = {
|
|
|
1230
1230
|
inputs: [{
|
|
1231
1231
|
name: "video",
|
|
1232
1232
|
type: "file",
|
|
1233
|
-
allowedFileTypes:
|
|
1233
|
+
allowedFileTypes: Be,
|
|
1234
1234
|
bubble: !0,
|
|
1235
1235
|
defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",
|
|
1236
1236
|
required: !0
|
|
@@ -1303,37 +1303,34 @@ const U = {
|
|
|
1303
1303
|
shouldReceiveBuilderProps: {
|
|
1304
1304
|
builderBlock: !0
|
|
1305
1305
|
}
|
|
1306
|
-
},
|
|
1307
|
-
component:
|
|
1306
|
+
}, st = () => [{
|
|
1307
|
+
component: Me,
|
|
1308
1308
|
...Oe
|
|
1309
1309
|
}, {
|
|
1310
|
-
component:
|
|
1311
|
-
...
|
|
1310
|
+
component: Je,
|
|
1311
|
+
...ze
|
|
1312
1312
|
}, {
|
|
1313
|
-
component:
|
|
1314
|
-
...
|
|
1313
|
+
component: Ge,
|
|
1314
|
+
...Ye
|
|
1315
1315
|
}, {
|
|
1316
|
-
component:
|
|
1317
|
-
...
|
|
1316
|
+
component: Xe,
|
|
1317
|
+
...Qe
|
|
1318
1318
|
}, {
|
|
1319
|
-
component:
|
|
1320
|
-
...
|
|
1319
|
+
component: nt,
|
|
1320
|
+
...tt
|
|
1321
1321
|
}, {
|
|
1322
|
-
component:
|
|
1323
|
-
...
|
|
1322
|
+
component: et,
|
|
1323
|
+
...Ze
|
|
1324
1324
|
}, {
|
|
1325
|
-
component:
|
|
1326
|
-
...
|
|
1325
|
+
component: it,
|
|
1326
|
+
...at
|
|
1327
1327
|
}, {
|
|
1328
|
-
component:
|
|
1329
|
-
...
|
|
1328
|
+
component: rt,
|
|
1329
|
+
...ot
|
|
1330
1330
|
}, {
|
|
1331
|
-
component: ge,
|
|
1332
|
-
...rt
|
|
1333
|
-
}], G = () => [{
|
|
1334
1331
|
component: he,
|
|
1335
|
-
...
|
|
1336
|
-
}, {
|
|
1332
|
+
...lt
|
|
1333
|
+
}], Q = () => [{
|
|
1337
1334
|
component: be,
|
|
1338
1335
|
...Pe
|
|
1339
1336
|
}, {
|
|
@@ -1341,29 +1338,32 @@ const U = {
|
|
|
1341
1338
|
...We
|
|
1342
1339
|
}, {
|
|
1343
1340
|
component: xe,
|
|
1344
|
-
...
|
|
1341
|
+
...Ae
|
|
1345
1342
|
}, {
|
|
1346
1343
|
component: ve,
|
|
1347
|
-
...
|
|
1344
|
+
...De
|
|
1348
1345
|
}, {
|
|
1349
|
-
component:
|
|
1346
|
+
component: Se,
|
|
1350
1347
|
...Le
|
|
1351
1348
|
}, {
|
|
1352
|
-
component:
|
|
1353
|
-
...
|
|
1349
|
+
component: qe,
|
|
1350
|
+
...Ne
|
|
1354
1351
|
}, {
|
|
1355
1352
|
component: Te,
|
|
1356
|
-
|
|
1353
|
+
...$e
|
|
1354
|
+
}, {
|
|
1355
|
+
component: Ie,
|
|
1356
|
+
...Ke
|
|
1357
1357
|
}, {
|
|
1358
1358
|
component: He,
|
|
1359
|
-
...
|
|
1359
|
+
...Ue
|
|
1360
1360
|
}, {
|
|
1361
|
-
component:
|
|
1362
|
-
|
|
1361
|
+
component: je,
|
|
1362
|
+
..._e
|
|
1363
1363
|
}, {
|
|
1364
|
-
component:
|
|
1365
|
-
...
|
|
1366
|
-
}, ...
|
|
1364
|
+
component: Fe,
|
|
1365
|
+
...Ee
|
|
1366
|
+
}, ...st()], dt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
1367
1367
|
function getAndSetVariantId() {
|
|
1368
1368
|
function setCookie(name, value, days) {
|
|
1369
1369
|
let expires = '';
|
|
@@ -1419,7 +1419,7 @@ const U = {
|
|
|
1419
1419
|
}).join('');
|
|
1420
1420
|
styleEl.innerHTML = newStyleStr;
|
|
1421
1421
|
}
|
|
1422
|
-
}`,
|
|
1422
|
+
}`, ut = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
1423
1423
|
if (!navigator.cookieEnabled) {
|
|
1424
1424
|
return;
|
|
1425
1425
|
}
|
|
@@ -1453,27 +1453,27 @@ const U = {
|
|
|
1453
1453
|
thisScriptEl?.remove();
|
|
1454
1454
|
}
|
|
1455
1455
|
return;
|
|
1456
|
-
}`,
|
|
1456
|
+
}`, oe = "builderIoAbTest", re = "builderIoRenderContent", D = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1457
1457
|
...t,
|
|
1458
1458
|
testVariationId: t.id,
|
|
1459
1459
|
id: e == null ? void 0 : e.id
|
|
1460
|
-
})),
|
|
1460
|
+
})), ct = ({
|
|
1461
1461
|
canTrack: e,
|
|
1462
1462
|
content: t
|
|
1463
|
-
}) => !(!(D(t).length > 0) || !e || j()),
|
|
1464
|
-
window.${ie} = ${st}
|
|
1463
|
+
}) => !(!(D(t).length > 0) || !e || j()), mt = (e) => e === "react" || e === "reactNative", le = mt(O), pt = () => `
|
|
1465
1464
|
window.${oe} = ${dt}
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1465
|
+
window.${re} = ${ut}
|
|
1466
|
+
`, ft = (e, t) => `
|
|
1467
|
+
window.${oe}(
|
|
1468
|
+
"${t}",${JSON.stringify(e)}, ${le}
|
|
1469
|
+
)`, gt = ({
|
|
1470
1470
|
contentId: e,
|
|
1471
1471
|
variationId: t
|
|
1472
|
-
}) => `window.${
|
|
1473
|
-
"${t}", "${e}", ${
|
|
1472
|
+
}) => `window.${re}(
|
|
1473
|
+
"${t}", "${e}", ${le}
|
|
1474
1474
|
)`;
|
|
1475
|
-
function
|
|
1476
|
-
return /* @__PURE__ */
|
|
1475
|
+
function K(e) {
|
|
1476
|
+
return /* @__PURE__ */ y(
|
|
1477
1477
|
"script",
|
|
1478
1478
|
{
|
|
1479
1479
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
@@ -1482,10 +1482,10 @@ function O(e) {
|
|
|
1482
1482
|
}
|
|
1483
1483
|
);
|
|
1484
1484
|
}
|
|
1485
|
-
function
|
|
1485
|
+
function X(e) {
|
|
1486
1486
|
return Math.round(e * 1e3) / 1e3;
|
|
1487
1487
|
}
|
|
1488
|
-
const
|
|
1488
|
+
const ht = (e, t, n = !0) => {
|
|
1489
1489
|
if (!(e instanceof HTMLElement))
|
|
1490
1490
|
return null;
|
|
1491
1491
|
let i = n ? e : e.parentElement;
|
|
@@ -1496,39 +1496,39 @@ const gt = (e, t, n = !0) => {
|
|
|
1496
1496
|
return i;
|
|
1497
1497
|
} while (i = i.parentElement);
|
|
1498
1498
|
return null;
|
|
1499
|
-
},
|
|
1499
|
+
}, bt = (e) => ht(e, (t) => {
|
|
1500
1500
|
const n = t.getAttribute("builder-id") || t.id;
|
|
1501
1501
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
1502
|
-
}),
|
|
1502
|
+
}), Z = ({
|
|
1503
1503
|
event: e,
|
|
1504
1504
|
target: t
|
|
1505
1505
|
}) => {
|
|
1506
|
-
const n = t.getBoundingClientRect(), i = e.clientX - n.left,
|
|
1506
|
+
const n = t.getBoundingClientRect(), i = e.clientX - n.left, r = e.clientY - n.top, d = X(i / n.width), a = X(r / n.height);
|
|
1507
1507
|
return {
|
|
1508
|
-
x:
|
|
1508
|
+
x: d,
|
|
1509
1509
|
y: a
|
|
1510
1510
|
};
|
|
1511
|
-
},
|
|
1512
|
-
const t = e.target, n = t &&
|
|
1511
|
+
}, yt = (e) => {
|
|
1512
|
+
const t = e.target, n = t && bt(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
1513
1513
|
return {
|
|
1514
1514
|
targetBuilderElement: i || void 0,
|
|
1515
1515
|
metadata: {
|
|
1516
|
-
targetOffset: t ?
|
|
1516
|
+
targetOffset: t ? Z({
|
|
1517
1517
|
event: e,
|
|
1518
1518
|
target: t
|
|
1519
1519
|
}) : void 0,
|
|
1520
|
-
builderTargetOffset: n ?
|
|
1520
|
+
builderTargetOffset: n ? Z({
|
|
1521
1521
|
event: e,
|
|
1522
1522
|
target: n
|
|
1523
1523
|
}) : void 0,
|
|
1524
1524
|
builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
|
|
1525
1525
|
}
|
|
1526
1526
|
};
|
|
1527
|
-
},
|
|
1528
|
-
var
|
|
1529
|
-
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (
|
|
1530
|
-
let
|
|
1531
|
-
if (i && t && n && (
|
|
1527
|
+
}, xt = ["svelte", "qwik", "vue"], ee = () => xt.includes(O) && (P() || ne()), vt = (e) => {
|
|
1528
|
+
var d, a;
|
|
1529
|
+
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (d = e == null ? void 0 : e.files) == null ? void 0 : d.regular;
|
|
1530
|
+
let r = "";
|
|
1531
|
+
if (i && t && n && (r += `
|
|
1532
1532
|
@font-face {
|
|
1533
1533
|
font-family: "${t}";
|
|
1534
1534
|
src: local("${n}"), url('${i}') format('woff2');
|
|
@@ -1540,7 +1540,7 @@ font-weight: 400;
|
|
|
1540
1540
|
if (!(String(Number(o)) === o))
|
|
1541
1541
|
continue;
|
|
1542
1542
|
const T = e.files[o];
|
|
1543
|
-
T && T !== i && (
|
|
1543
|
+
T && T !== i && (r += `
|
|
1544
1544
|
@font-face {
|
|
1545
1545
|
font-family: "${t}";
|
|
1546
1546
|
src: url('${T}') format('woff2');
|
|
@@ -1549,16 +1549,16 @@ font-weight: ${o};
|
|
|
1549
1549
|
}
|
|
1550
1550
|
`.trim());
|
|
1551
1551
|
}
|
|
1552
|
-
return
|
|
1553
|
-
},
|
|
1552
|
+
return r;
|
|
1553
|
+
}, St = ({
|
|
1554
1554
|
customFonts: e
|
|
1555
1555
|
}) => {
|
|
1556
1556
|
var t;
|
|
1557
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
1558
|
-
},
|
|
1557
|
+
return ((t = e == null ? void 0 : e.map((n) => vt(n))) == null ? void 0 : t.join(" ")) || "";
|
|
1558
|
+
}, Tt = ({
|
|
1559
1559
|
cssCode: e,
|
|
1560
1560
|
contentId: t
|
|
1561
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
1561
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", It = `
|
|
1562
1562
|
.builder-button {
|
|
1563
1563
|
all: unset;
|
|
1564
1564
|
}
|
|
@@ -1575,103 +1575,106 @@ font-weight: ${o};
|
|
|
1575
1575
|
text-align: inherit;
|
|
1576
1576
|
font-family: inherit;
|
|
1577
1577
|
}
|
|
1578
|
-
`,
|
|
1579
|
-
function
|
|
1580
|
-
var
|
|
1578
|
+
`, kt = (e) => e ? "" : It, Ct = (e) => `variant-${e}`;
|
|
1579
|
+
function wt(e) {
|
|
1580
|
+
var b, x, C;
|
|
1581
1581
|
const t = _(null);
|
|
1582
|
-
function n(
|
|
1583
|
-
var
|
|
1584
|
-
const
|
|
1582
|
+
function n(l) {
|
|
1583
|
+
var p, f;
|
|
1584
|
+
const s = {
|
|
1585
1585
|
...e.builderContextSignal.rootState,
|
|
1586
|
-
...
|
|
1586
|
+
...l
|
|
1587
1587
|
};
|
|
1588
|
-
e.builderContextSignal.rootSetState ? (f = (
|
|
1589
|
-
...
|
|
1590
|
-
rootState:
|
|
1588
|
+
e.builderContextSignal.rootSetState ? (f = (p = e.builderContextSignal).rootSetState) == null || f.call(p, s) : e.setBuilderContextSignal((c) => ({
|
|
1589
|
+
...c,
|
|
1590
|
+
rootState: s
|
|
1591
1591
|
}));
|
|
1592
1592
|
}
|
|
1593
|
-
function i(
|
|
1594
|
-
var
|
|
1595
|
-
const
|
|
1593
|
+
function i(l) {
|
|
1594
|
+
var p, f, c, m, g;
|
|
1595
|
+
const s = {
|
|
1596
1596
|
...e.builderContextSignal.content,
|
|
1597
|
-
...
|
|
1597
|
+
...l,
|
|
1598
1598
|
data: {
|
|
1599
|
-
...(
|
|
1600
|
-
...
|
|
1599
|
+
...(p = e.builderContextSignal.content) == null ? void 0 : p.data,
|
|
1600
|
+
...l == null ? void 0 : l.data
|
|
1601
1601
|
},
|
|
1602
1602
|
meta: {
|
|
1603
1603
|
...(f = e.builderContextSignal.content) == null ? void 0 : f.meta,
|
|
1604
|
-
...
|
|
1605
|
-
breakpoints: ((
|
|
1604
|
+
...l == null ? void 0 : l.meta,
|
|
1605
|
+
breakpoints: ((c = l == null ? void 0 : l.meta) == null ? void 0 : c.breakpoints) || ((g = (m = e.builderContextSignal.content) == null ? void 0 : m.meta) == null ? void 0 : g.breakpoints)
|
|
1606
1606
|
}
|
|
1607
1607
|
};
|
|
1608
|
-
e.setBuilderContextSignal((
|
|
1609
|
-
...
|
|
1610
|
-
content:
|
|
1608
|
+
e.setBuilderContextSignal((h) => ({
|
|
1609
|
+
...h,
|
|
1610
|
+
content: s
|
|
1611
1611
|
}));
|
|
1612
1612
|
}
|
|
1613
|
-
function
|
|
1613
|
+
function r() {
|
|
1614
1614
|
return e.showContent ? {} : {
|
|
1615
1615
|
hidden: !0,
|
|
1616
1616
|
"aria-hidden": !0
|
|
1617
1617
|
};
|
|
1618
1618
|
}
|
|
1619
|
-
const [
|
|
1619
|
+
const [d, a] = I(
|
|
1620
1620
|
() => e.contentWrapper || "div"
|
|
1621
1621
|
);
|
|
1622
|
-
function o(
|
|
1623
|
-
return
|
|
1622
|
+
function o(l) {
|
|
1623
|
+
return me({
|
|
1624
1624
|
model: e.model,
|
|
1625
1625
|
trustedHosts: e.trustedHosts,
|
|
1626
1626
|
callbacks: {
|
|
1627
|
-
configureSdk: (
|
|
1628
|
-
var
|
|
1629
|
-
const { breakpoints:
|
|
1630
|
-
!f || f !== ((
|
|
1627
|
+
configureSdk: (s) => {
|
|
1628
|
+
var c;
|
|
1629
|
+
const { breakpoints: p, contentId: f } = s;
|
|
1630
|
+
!f || f !== ((c = e.builderContextSignal.content) == null ? void 0 : c.id) || p && i({
|
|
1631
1631
|
meta: {
|
|
1632
|
-
breakpoints:
|
|
1632
|
+
breakpoints: p
|
|
1633
1633
|
}
|
|
1634
1634
|
});
|
|
1635
1635
|
},
|
|
1636
|
-
animation: (
|
|
1637
|
-
|
|
1636
|
+
animation: (s) => {
|
|
1637
|
+
Ce(s);
|
|
1638
|
+
},
|
|
1639
|
+
contentUpdate: (s) => {
|
|
1640
|
+
i(s);
|
|
1638
1641
|
},
|
|
1639
|
-
|
|
1640
|
-
|
|
1642
|
+
stateUpdate: (s) => {
|
|
1643
|
+
n(s);
|
|
1641
1644
|
}
|
|
1642
1645
|
}
|
|
1643
|
-
})(
|
|
1646
|
+
})(l);
|
|
1644
1647
|
}
|
|
1645
|
-
const [
|
|
1646
|
-
function
|
|
1647
|
-
var
|
|
1648
|
+
const [u, T] = I(() => ({})), [S, R] = I(() => ({})), [k, W] = I(() => !1);
|
|
1649
|
+
function A(l) {
|
|
1650
|
+
var s, p;
|
|
1648
1651
|
if (e.builderContextSignal.content) {
|
|
1649
|
-
const f = (
|
|
1650
|
-
|
|
1652
|
+
const f = (s = e.builderContextSignal.content) == null ? void 0 : s.testVariationId, c = (p = e.builderContextSignal.content) == null ? void 0 : p.id;
|
|
1653
|
+
Y({
|
|
1651
1654
|
apiHost: e.apiHost,
|
|
1652
1655
|
type: "click",
|
|
1653
|
-
canTrack:
|
|
1654
|
-
contentId:
|
|
1656
|
+
canTrack: U(e.canTrack),
|
|
1657
|
+
contentId: c,
|
|
1655
1658
|
apiKey: e.apiKey,
|
|
1656
|
-
variationId: f !==
|
|
1657
|
-
...
|
|
1659
|
+
variationId: f !== c ? f : void 0,
|
|
1660
|
+
...yt(l),
|
|
1658
1661
|
unique: !k
|
|
1659
1662
|
});
|
|
1660
1663
|
}
|
|
1661
|
-
k ||
|
|
1664
|
+
k || W(!0);
|
|
1662
1665
|
}
|
|
1663
|
-
function
|
|
1664
|
-
var
|
|
1665
|
-
const
|
|
1666
|
-
Object.entries(
|
|
1667
|
-
if (!
|
|
1666
|
+
function B() {
|
|
1667
|
+
var s, p, f;
|
|
1668
|
+
const l = (f = (p = (s = e.builderContextSignal.content) == null ? void 0 : s.data) == null ? void 0 : p.httpRequests) != null ? f : {};
|
|
1669
|
+
Object.entries(l).forEach(([c, m]) => {
|
|
1670
|
+
if (!m || S[c] || u[c] && !P())
|
|
1668
1671
|
return;
|
|
1669
|
-
S[
|
|
1670
|
-
const
|
|
1672
|
+
S[c] = !0;
|
|
1673
|
+
const g = m.replace(
|
|
1671
1674
|
/{{([^}]+)}}/g,
|
|
1672
|
-
(
|
|
1673
|
-
|
|
1674
|
-
code:
|
|
1675
|
+
(h, F) => String(
|
|
1676
|
+
ae({
|
|
1677
|
+
code: F,
|
|
1675
1678
|
context: e.context || {},
|
|
1676
1679
|
localState: void 0,
|
|
1677
1680
|
rootState: e.builderContextSignal.rootState,
|
|
@@ -1679,24 +1682,24 @@ function Ct(e) {
|
|
|
1679
1682
|
})
|
|
1680
1683
|
)
|
|
1681
1684
|
);
|
|
1682
|
-
|
|
1685
|
+
pe(g), fetch(g).then((h) => h.json()).then((h) => {
|
|
1683
1686
|
n({
|
|
1684
|
-
[
|
|
1685
|
-
}), c
|
|
1686
|
-
}).catch((
|
|
1687
|
-
console.error("error fetching dynamic data",
|
|
1687
|
+
[c]: h
|
|
1688
|
+
}), u[c] = !0;
|
|
1689
|
+
}).catch((h) => {
|
|
1690
|
+
console.error("error fetching dynamic data", m, h);
|
|
1688
1691
|
}).finally(() => {
|
|
1689
|
-
S[
|
|
1692
|
+
S[c] = !1;
|
|
1690
1693
|
});
|
|
1691
1694
|
});
|
|
1692
1695
|
}
|
|
1693
1696
|
function w() {
|
|
1694
|
-
|
|
1697
|
+
P() && window.dispatchEvent(
|
|
1695
1698
|
new CustomEvent(
|
|
1696
1699
|
"builder:component:stateChange",
|
|
1697
1700
|
{
|
|
1698
1701
|
detail: {
|
|
1699
|
-
state:
|
|
1702
|
+
state: we(e.builderContextSignal.rootState),
|
|
1700
1703
|
ref: {
|
|
1701
1704
|
name: e.model
|
|
1702
1705
|
}
|
|
@@ -1706,10 +1709,10 @@ function Ct(e) {
|
|
|
1706
1709
|
);
|
|
1707
1710
|
}
|
|
1708
1711
|
const E = _(!1);
|
|
1709
|
-
return E.current || (
|
|
1710
|
-
var s,
|
|
1712
|
+
return E.current || (B(), w(), E.current = !0), V(() => {
|
|
1713
|
+
var l, s, p, f;
|
|
1711
1714
|
if (j()) {
|
|
1712
|
-
if (
|
|
1715
|
+
if (P() && !e.isNestedRender && (window.addEventListener("message", o), se(), de({
|
|
1713
1716
|
...e.locale ? {
|
|
1714
1717
|
locale: e.locale
|
|
1715
1718
|
} : {},
|
|
@@ -1718,44 +1721,46 @@ function Ct(e) {
|
|
|
1718
1721
|
} : {},
|
|
1719
1722
|
...e.trustedHosts ? {
|
|
1720
1723
|
trustedHosts: e.trustedHosts
|
|
1721
|
-
} : {}
|
|
1724
|
+
} : {},
|
|
1725
|
+
modelName: (l = e.model) != null ? l : "",
|
|
1726
|
+
apiKey: e.apiKey
|
|
1722
1727
|
}), Object.values(
|
|
1723
1728
|
e.builderContextSignal.componentInfos
|
|
1724
|
-
).forEach((
|
|
1725
|
-
var
|
|
1726
|
-
if (!
|
|
1727
|
-
const
|
|
1728
|
-
(
|
|
1729
|
+
).forEach((m) => {
|
|
1730
|
+
var g, h;
|
|
1731
|
+
if (!((g = m.models) != null && g.length) || m.models.includes(e.model)) {
|
|
1732
|
+
const F = ue(m);
|
|
1733
|
+
(h = window.parent) == null || h.postMessage(F, "*");
|
|
1729
1734
|
}
|
|
1730
1735
|
}), window.addEventListener(
|
|
1731
1736
|
"builder:component:stateChangeListenerActivated",
|
|
1732
1737
|
w
|
|
1733
|
-
)), e.builderContextSignal.content &&
|
|
1734
|
-
const
|
|
1735
|
-
|
|
1738
|
+
)), e.builderContextSignal.content && U(e.canTrack)) {
|
|
1739
|
+
const m = (s = e.builderContextSignal.content) == null ? void 0 : s.testVariationId, g = (p = e.builderContextSignal.content) == null ? void 0 : p.id, h = e.apiKey;
|
|
1740
|
+
Y({
|
|
1736
1741
|
apiHost: e.apiHost,
|
|
1737
1742
|
type: "impression",
|
|
1738
1743
|
canTrack: !0,
|
|
1739
|
-
contentId:
|
|
1740
|
-
apiKey:
|
|
1741
|
-
variationId:
|
|
1744
|
+
contentId: g,
|
|
1745
|
+
apiKey: h,
|
|
1746
|
+
variationId: m !== g ? m : void 0
|
|
1742
1747
|
});
|
|
1743
1748
|
}
|
|
1744
|
-
if (
|
|
1745
|
-
const
|
|
1746
|
-
`builder.overrides.${
|
|
1747
|
-
),
|
|
1748
|
-
(
|
|
1749
|
-
model: e.model
|
|
1749
|
+
if (ne() && !P()) {
|
|
1750
|
+
const m = new URL(location.href).searchParams, g = m.get("builder.preview"), h = m.get(
|
|
1751
|
+
`builder.overrides.${g}`
|
|
1752
|
+
), F = m.get("apiKey") || m.get("builder.space");
|
|
1753
|
+
(g === "BUILDER_STUDIO" || g === e.model && F === e.apiKey && (!e.content || h === e.content.id)) && ce({
|
|
1754
|
+
model: e.model,
|
|
1750
1755
|
apiKey: e.apiKey,
|
|
1751
1756
|
apiVersion: e.builderContextSignal.apiVersion,
|
|
1752
|
-
...
|
|
1757
|
+
...g === "BUILDER_STUDIO" && ((f = e.context) != null && f.symbolId) ? {
|
|
1753
1758
|
query: {
|
|
1754
1759
|
id: e.context.symbolId
|
|
1755
1760
|
}
|
|
1756
1761
|
} : {}
|
|
1757
|
-
}).then((
|
|
1758
|
-
|
|
1762
|
+
}).then((z) => {
|
|
1763
|
+
z && i(z);
|
|
1759
1764
|
});
|
|
1760
1765
|
}
|
|
1761
1766
|
}
|
|
@@ -1774,40 +1779,40 @@ function Ct(e) {
|
|
|
1774
1779
|
"builder:component:stateChangeListenerActivated",
|
|
1775
1780
|
w
|
|
1776
1781
|
));
|
|
1777
|
-
}, []), /* @__PURE__ */
|
|
1778
|
-
|
|
1782
|
+
}, []), /* @__PURE__ */ y(ke.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content || ee() ? /* @__PURE__ */ y(
|
|
1783
|
+
d,
|
|
1779
1784
|
{
|
|
1780
1785
|
ref: t,
|
|
1781
|
-
onClick: (
|
|
1782
|
-
"builder-content-id": (
|
|
1786
|
+
onClick: (l) => A(l),
|
|
1787
|
+
"builder-content-id": (b = e.builderContextSignal.content) == null ? void 0 : b.id,
|
|
1783
1788
|
"builder-model": e.model,
|
|
1784
|
-
className:
|
|
1785
|
-
((
|
|
1789
|
+
className: Ct(
|
|
1790
|
+
((x = e.content) == null ? void 0 : x.testVariationId) || ((C = e.content) == null ? void 0 : C.id)
|
|
1786
1791
|
),
|
|
1787
1792
|
style: {
|
|
1788
|
-
display: !e.builderContextSignal.content &&
|
|
1793
|
+
display: !e.builderContextSignal.content && ee() ? "none" : void 0
|
|
1789
1794
|
},
|
|
1790
|
-
...
|
|
1795
|
+
...r(),
|
|
1791
1796
|
...e.contentWrapperProps,
|
|
1792
1797
|
children: e.children
|
|
1793
1798
|
}
|
|
1794
1799
|
) : null });
|
|
1795
1800
|
}
|
|
1796
|
-
function
|
|
1801
|
+
function Vt(e) {
|
|
1797
1802
|
const [t, n] = I(
|
|
1798
1803
|
() => `
|
|
1799
|
-
${
|
|
1804
|
+
${Tt({
|
|
1800
1805
|
cssCode: e.cssCode,
|
|
1801
1806
|
contentId: e.contentId
|
|
1802
1807
|
})}
|
|
1803
|
-
${
|
|
1808
|
+
${St({
|
|
1804
1809
|
customFonts: e.customFonts
|
|
1805
1810
|
})}
|
|
1806
|
-
${
|
|
1811
|
+
${kt(e.isNestedRender)}
|
|
1807
1812
|
`.trim()
|
|
1808
1813
|
);
|
|
1809
|
-
return /* @__PURE__ */
|
|
1810
|
-
|
|
1814
|
+
return /* @__PURE__ */ y(
|
|
1815
|
+
ie,
|
|
1811
1816
|
{
|
|
1812
1817
|
id: "builderio-content",
|
|
1813
1818
|
styles: t,
|
|
@@ -1815,24 +1820,24 @@ ${It(e.isNestedRender)}
|
|
|
1815
1820
|
}
|
|
1816
1821
|
);
|
|
1817
1822
|
}
|
|
1818
|
-
const
|
|
1823
|
+
const Rt = ({
|
|
1819
1824
|
content: e,
|
|
1820
1825
|
data: t,
|
|
1821
1826
|
locale: n
|
|
1822
1827
|
}) => {
|
|
1823
|
-
var
|
|
1824
|
-
const i = {},
|
|
1825
|
-
return (o = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || o.forEach((
|
|
1826
|
-
|
|
1828
|
+
var d, a, o;
|
|
1829
|
+
const i = {}, r = ((d = e == null ? void 0 : e.data) == null ? void 0 : d.state) || {};
|
|
1830
|
+
return (o = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || o.forEach((u) => {
|
|
1831
|
+
u.name && u.defaultValue !== void 0 && (i[u.name] = u.defaultValue);
|
|
1827
1832
|
}), {
|
|
1828
1833
|
...i,
|
|
1829
|
-
...
|
|
1834
|
+
...r,
|
|
1830
1835
|
...t,
|
|
1831
1836
|
...n ? {
|
|
1832
1837
|
locale: n
|
|
1833
1838
|
} : {}
|
|
1834
1839
|
};
|
|
1835
|
-
},
|
|
1840
|
+
}, Et = ({
|
|
1836
1841
|
content: e,
|
|
1837
1842
|
data: t
|
|
1838
1843
|
}) => e ? {
|
|
@@ -1843,46 +1848,46 @@ const Vt = ({
|
|
|
1843
1848
|
},
|
|
1844
1849
|
meta: e == null ? void 0 : e.meta
|
|
1845
1850
|
} : void 0;
|
|
1846
|
-
function
|
|
1847
|
-
var T, S, R, k,
|
|
1851
|
+
function te(e) {
|
|
1852
|
+
var T, S, R, k, W, A, B, w, E;
|
|
1848
1853
|
const [t, n] = I(
|
|
1849
1854
|
() => {
|
|
1850
|
-
var
|
|
1851
|
-
return
|
|
1855
|
+
var b, x;
|
|
1856
|
+
return gt({
|
|
1852
1857
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1853
|
-
variationId: (
|
|
1858
|
+
variationId: (b = e.content) == null ? void 0 : b.testVariationId,
|
|
1854
1859
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1855
|
-
contentId: (
|
|
1860
|
+
contentId: (x = e.content) == null ? void 0 : x.id
|
|
1856
1861
|
});
|
|
1857
1862
|
}
|
|
1858
1863
|
);
|
|
1859
|
-
function i(
|
|
1860
|
-
o((
|
|
1861
|
-
...
|
|
1862
|
-
rootState:
|
|
1864
|
+
function i(b) {
|
|
1865
|
+
o((x) => ({
|
|
1866
|
+
...x,
|
|
1867
|
+
rootState: b
|
|
1863
1868
|
}));
|
|
1864
1869
|
}
|
|
1865
|
-
const [
|
|
1870
|
+
const [r, d] = I(
|
|
1866
1871
|
() => [
|
|
1867
|
-
...
|
|
1872
|
+
...Q(),
|
|
1868
1873
|
...e.customComponents || []
|
|
1869
1874
|
].reduce(
|
|
1870
|
-
(
|
|
1871
|
-
...
|
|
1875
|
+
(b, { component: x, ...C }) => ({
|
|
1876
|
+
...b,
|
|
1872
1877
|
[C.name]: {
|
|
1873
|
-
component:
|
|
1874
|
-
...
|
|
1878
|
+
component: x,
|
|
1879
|
+
...G(C)
|
|
1875
1880
|
}
|
|
1876
1881
|
}),
|
|
1877
1882
|
{}
|
|
1878
1883
|
)
|
|
1879
1884
|
), [a, o] = I(() => ({
|
|
1880
|
-
content:
|
|
1885
|
+
content: Et({
|
|
1881
1886
|
content: e.content,
|
|
1882
1887
|
data: e.data
|
|
1883
1888
|
}),
|
|
1884
1889
|
localState: void 0,
|
|
1885
|
-
rootState:
|
|
1890
|
+
rootState: Rt({
|
|
1886
1891
|
content: e.content,
|
|
1887
1892
|
data: e.data,
|
|
1888
1893
|
locale: e.locale
|
|
@@ -1893,12 +1898,12 @@ function ee(e) {
|
|
|
1893
1898
|
apiKey: e.apiKey,
|
|
1894
1899
|
apiVersion: e.apiVersion,
|
|
1895
1900
|
componentInfos: [
|
|
1896
|
-
...
|
|
1901
|
+
...Q(),
|
|
1897
1902
|
...e.customComponents || []
|
|
1898
1903
|
].reduce(
|
|
1899
|
-
(
|
|
1900
|
-
...
|
|
1901
|
-
[C.name]:
|
|
1904
|
+
(b, { component: x, ...C }) => ({
|
|
1905
|
+
...b,
|
|
1906
|
+
[C.name]: G(C)
|
|
1902
1907
|
}),
|
|
1903
1908
|
{}
|
|
1904
1909
|
),
|
|
@@ -1906,32 +1911,32 @@ function ee(e) {
|
|
|
1906
1911
|
BlocksWrapper: e.blocksWrapper || "div",
|
|
1907
1912
|
BlocksWrapperProps: e.blocksWrapperProps || {},
|
|
1908
1913
|
nonce: e.nonce || "",
|
|
1909
|
-
model: e.model
|
|
1910
|
-
})),
|
|
1911
|
-
if (!
|
|
1912
|
-
e.apiKey ||
|
|
1914
|
+
model: e.model
|
|
1915
|
+
})), u = _(!1);
|
|
1916
|
+
if (!u.current) {
|
|
1917
|
+
e.apiKey || fe.error(
|
|
1913
1918
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
1914
1919
|
);
|
|
1915
|
-
const
|
|
1916
|
-
|
|
1917
|
-
code:
|
|
1920
|
+
const b = (S = (T = a.content) == null ? void 0 : T.data) == null ? void 0 : S.jsCode;
|
|
1921
|
+
b && ae({
|
|
1922
|
+
code: b,
|
|
1918
1923
|
context: e.context || {},
|
|
1919
1924
|
localState: void 0,
|
|
1920
1925
|
rootState: a.rootState,
|
|
1921
|
-
rootSetState: (
|
|
1922
|
-
Object.assign(a.rootState,
|
|
1926
|
+
rootSetState: (x) => {
|
|
1927
|
+
Object.assign(a.rootState, x);
|
|
1923
1928
|
},
|
|
1924
1929
|
isExpression: !1
|
|
1925
|
-
}),
|
|
1930
|
+
}), u.current = !0;
|
|
1926
1931
|
}
|
|
1927
|
-
return /* @__PURE__ */
|
|
1928
|
-
|
|
1932
|
+
return /* @__PURE__ */ y(
|
|
1933
|
+
Ve.Provider,
|
|
1929
1934
|
{
|
|
1930
1935
|
value: {
|
|
1931
|
-
registeredComponents:
|
|
1936
|
+
registeredComponents: r
|
|
1932
1937
|
},
|
|
1933
1938
|
children: /* @__PURE__ */ $(
|
|
1934
|
-
|
|
1939
|
+
wt,
|
|
1935
1940
|
{
|
|
1936
1941
|
apiHost: e.apiHost,
|
|
1937
1942
|
nonce: e.nonce,
|
|
@@ -1951,30 +1956,30 @@ function ee(e) {
|
|
|
1951
1956
|
isNestedRender: e.isNestedRender,
|
|
1952
1957
|
setBuilderContextSignal: o,
|
|
1953
1958
|
children: [
|
|
1954
|
-
e.isSsrAbTest ? /* @__PURE__ */
|
|
1955
|
-
|
|
1959
|
+
e.isSsrAbTest ? /* @__PURE__ */ y(
|
|
1960
|
+
K,
|
|
1956
1961
|
{
|
|
1957
1962
|
id: "builderio-variant-visibility",
|
|
1958
1963
|
scriptStr: t,
|
|
1959
1964
|
nonce: e.nonce || ""
|
|
1960
1965
|
}
|
|
1961
1966
|
) : null,
|
|
1962
|
-
/* @__PURE__ */
|
|
1963
|
-
|
|
1967
|
+
/* @__PURE__ */ y(
|
|
1968
|
+
Vt,
|
|
1964
1969
|
{
|
|
1965
1970
|
nonce: e.nonce || "",
|
|
1966
1971
|
isNestedRender: e.isNestedRender,
|
|
1967
1972
|
contentId: (R = a.content) == null ? void 0 : R.id,
|
|
1968
|
-
cssCode: (
|
|
1969
|
-
customFonts: (
|
|
1973
|
+
cssCode: (W = (k = a.content) == null ? void 0 : k.data) == null ? void 0 : W.cssCode,
|
|
1974
|
+
customFonts: (B = (A = a.content) == null ? void 0 : A.data) == null ? void 0 : B.customFonts
|
|
1970
1975
|
}
|
|
1971
1976
|
),
|
|
1972
|
-
/* @__PURE__ */
|
|
1973
|
-
|
|
1977
|
+
/* @__PURE__ */ y(
|
|
1978
|
+
Re,
|
|
1974
1979
|
{
|
|
1975
1980
|
blocks: (E = (w = a.content) == null ? void 0 : w.data) == null ? void 0 : E.blocks,
|
|
1976
1981
|
context: a,
|
|
1977
|
-
registeredComponents:
|
|
1982
|
+
registeredComponents: r,
|
|
1978
1983
|
linkComponent: e.linkComponent
|
|
1979
1984
|
}
|
|
1980
1985
|
)
|
|
@@ -1984,66 +1989,66 @@ function ee(e) {
|
|
|
1984
1989
|
}
|
|
1985
1990
|
);
|
|
1986
1991
|
}
|
|
1987
|
-
function
|
|
1992
|
+
function Ft(e) {
|
|
1988
1993
|
var a;
|
|
1989
1994
|
const [t, n] = I(
|
|
1990
|
-
() =>
|
|
1991
|
-
canTrack:
|
|
1995
|
+
() => ct({
|
|
1996
|
+
canTrack: U(e.canTrack),
|
|
1992
1997
|
content: e.content
|
|
1993
1998
|
})
|
|
1994
1999
|
);
|
|
1995
2000
|
function i() {
|
|
1996
2001
|
var o;
|
|
1997
|
-
return
|
|
1998
|
-
D(e.content).map((
|
|
1999
|
-
id:
|
|
2000
|
-
testRatio:
|
|
2002
|
+
return ft(
|
|
2003
|
+
D(e.content).map((u) => ({
|
|
2004
|
+
id: u.testVariationId,
|
|
2005
|
+
testRatio: u.testRatio
|
|
2001
2006
|
})),
|
|
2002
2007
|
((o = e.content) == null ? void 0 : o.id) || ""
|
|
2003
2008
|
);
|
|
2004
2009
|
}
|
|
2005
|
-
function
|
|
2010
|
+
function r() {
|
|
2006
2011
|
return D(e.content).map((o) => `.variant-${o.testVariationId} { display: none; } `).join("");
|
|
2007
2012
|
}
|
|
2008
|
-
function
|
|
2013
|
+
function d() {
|
|
2009
2014
|
var o;
|
|
2010
2015
|
return t ? {
|
|
2011
2016
|
...e.content,
|
|
2012
2017
|
testVariationId: (o = e.content) == null ? void 0 : o.id
|
|
2013
|
-
} :
|
|
2018
|
+
} : ge({
|
|
2014
2019
|
item: e.content,
|
|
2015
|
-
canTrack:
|
|
2020
|
+
canTrack: U(e.canTrack)
|
|
2016
2021
|
});
|
|
2017
2022
|
}
|
|
2018
2023
|
return V(() => {
|
|
2019
|
-
}, []), /* @__PURE__ */ $(
|
|
2020
|
-
!e.isNestedRender &&
|
|
2021
|
-
|
|
2024
|
+
}, []), /* @__PURE__ */ $(J, { children: [
|
|
2025
|
+
!e.isNestedRender && O !== "reactNative" ? /* @__PURE__ */ y(
|
|
2026
|
+
K,
|
|
2022
2027
|
{
|
|
2023
2028
|
id: "builderio-init-variants-fns",
|
|
2024
|
-
scriptStr:
|
|
2029
|
+
scriptStr: pt(),
|
|
2025
2030
|
nonce: e.nonce || ""
|
|
2026
2031
|
}
|
|
2027
2032
|
) : null,
|
|
2028
|
-
t ? /* @__PURE__ */ $(
|
|
2029
|
-
/* @__PURE__ */
|
|
2030
|
-
|
|
2033
|
+
t ? /* @__PURE__ */ $(J, { children: [
|
|
2034
|
+
/* @__PURE__ */ y(
|
|
2035
|
+
ie,
|
|
2031
2036
|
{
|
|
2032
2037
|
id: "builderio-variants",
|
|
2033
|
-
styles:
|
|
2038
|
+
styles: r(),
|
|
2034
2039
|
nonce: e.nonce || ""
|
|
2035
2040
|
}
|
|
2036
2041
|
),
|
|
2037
|
-
/* @__PURE__ */
|
|
2038
|
-
|
|
2042
|
+
/* @__PURE__ */ y(
|
|
2043
|
+
K,
|
|
2039
2044
|
{
|
|
2040
2045
|
id: "builderio-variants-visibility",
|
|
2041
2046
|
scriptStr: i(),
|
|
2042
2047
|
nonce: e.nonce || ""
|
|
2043
2048
|
}
|
|
2044
2049
|
),
|
|
2045
|
-
(a = D(e.content)) == null ? void 0 : a.map((o) => /* @__PURE__ */
|
|
2046
|
-
|
|
2050
|
+
(a = D(e.content)) == null ? void 0 : a.map((o) => /* @__PURE__ */ y(
|
|
2051
|
+
te,
|
|
2047
2052
|
{
|
|
2048
2053
|
apiHost: e.apiHost,
|
|
2049
2054
|
isNestedRender: e.isNestedRender,
|
|
@@ -2070,13 +2075,13 @@ function Et(e) {
|
|
|
2070
2075
|
o.testVariationId
|
|
2071
2076
|
))
|
|
2072
2077
|
] }) : null,
|
|
2073
|
-
/* @__PURE__ */
|
|
2074
|
-
|
|
2078
|
+
/* @__PURE__ */ y(
|
|
2079
|
+
te,
|
|
2075
2080
|
{
|
|
2076
2081
|
apiHost: e.apiHost,
|
|
2077
2082
|
nonce: e.nonce,
|
|
2078
2083
|
isNestedRender: e.isNestedRender,
|
|
2079
|
-
content:
|
|
2084
|
+
content: d(),
|
|
2080
2085
|
showContent: !0,
|
|
2081
2086
|
model: e.model,
|
|
2082
2087
|
data: e.data,
|
|
@@ -2098,11 +2103,11 @@ function Et(e) {
|
|
|
2098
2103
|
)
|
|
2099
2104
|
] });
|
|
2100
2105
|
}
|
|
2101
|
-
const
|
|
2106
|
+
const Ut = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2102
2107
|
__proto__: null,
|
|
2103
|
-
default:
|
|
2108
|
+
default: Ft
|
|
2104
2109
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2105
2110
|
export {
|
|
2106
|
-
|
|
2107
|
-
|
|
2111
|
+
K as InlinedScript,
|
|
2112
|
+
Ut as contentVariants
|
|
2108
2113
|
};
|