@builder.io/sdk-react 5.2.3 → 5.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -4
- package/lib/browser/blocks-exports.cjs +32 -24
- package/lib/browser/blocks-exports.mjs +175 -169
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-4bf14bc1.cjs → server-entry-db3e5491.cjs} +1 -1
- package/lib/browser/{server-entry-a6f43f98.js → server-entry-ed84f05b.js} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-52741334.js → accordion-97de712c.js} +1 -1
- package/lib/edge/{accordion-6c708d49.cjs → accordion-ee8b456b.cjs} +1 -1
- package/lib/edge/{blocks-af5e55f6.js → blocks-30fa0a83.js} +2 -2
- package/lib/edge/{blocks-e94e371c.cjs → blocks-a9309ecb.cjs} +1 -1
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-df76a8b2.cjs → button-b05134c3.cjs} +1 -1
- package/lib/edge/{button-2a5bf939.js → button-deb3931b.js} +2 -2
- package/lib/edge/{columns-044891a6.cjs → columns-653c6392.cjs} +1 -1
- package/lib/edge/{columns-dc5fc496.js → columns-ced9f729.js} +3 -3
- package/lib/edge/{content-variants-9ee0d895.cjs → content-variants-7f5bb324.cjs} +23 -15
- package/lib/edge/{content-variants-d950ffc8.js → content-variants-8d408a69.js} +104 -98
- package/lib/edge/{custom-code-685e8b43.js → custom-code-744f5ad4.js} +1 -1
- package/lib/edge/{custom-code-2403d3d3.cjs → custom-code-aa397209.cjs} +1 -1
- package/lib/edge/{embed-cdbaa40e.cjs → embed-0288e73a.cjs} +1 -1
- package/lib/edge/{embed-462f3730.js → embed-89aec80c.js} +1 -1
- package/lib/edge/{form-43c8dbf3.cjs → form-46a18f5c.cjs} +1 -1
- package/lib/edge/{form-1a9b42a0.js → form-6d81e9e1.js} +3 -3
- package/lib/edge/{get-class-prop-name-e944471a.js → get-class-prop-name-1b22254b.js} +1 -1
- package/lib/edge/{get-class-prop-name-fbedc76f.cjs → get-class-prop-name-32dc2306.cjs} +1 -1
- package/lib/edge/{img-d3819e49.cjs → img-57d025fd.cjs} +1 -1
- package/lib/edge/{img-fb540382.js → img-e324614f.js} +2 -2
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-6c53f2f3.cjs → input-38a98b25.cjs} +1 -1
- package/lib/edge/{input-0efc2cf0.js → input-85213ddc.js} +1 -1
- package/lib/edge/{personalization-container-63d25e42.js → personalization-container-95c36799.js} +4 -4
- package/lib/edge/{personalization-container-a9c09c80.cjs → personalization-container-bff639e8.cjs} +1 -1
- package/lib/edge/{select-61deb890.js → select-7ce7b157.js} +1 -1
- package/lib/edge/{select-391ac558.cjs → select-871410cd.cjs} +1 -1
- package/lib/edge/{server-entry-5182bda7.js → server-entry-1520920a.js} +1 -1
- package/lib/edge/{server-entry-4528f206.cjs → server-entry-5ed2b32b.cjs} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-373f1e81.cjs → slot-41321948.cjs} +1 -1
- package/lib/edge/{slot-6f93fc15.js → slot-6b97f172.js} +3 -3
- package/lib/edge/{symbol-2ad1da28.js → symbol-40789e92.js} +2 -2
- package/lib/edge/{symbol-a1651207.cjs → symbol-5baec228.cjs} +1 -1
- package/lib/edge/{tabs-a0eccabc.cjs → tabs-73593fc8.cjs} +1 -1
- package/lib/edge/{tabs-c4e43a9c.js → tabs-d0f2c920.js} +3 -3
- package/lib/node/blocks-exports.cjs +29 -21
- package/lib/node/blocks-exports.mjs +130 -124
- 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-88c9db7d.cjs → server-entry-56a73dab.cjs} +1 -1
- package/lib/node/{server-entry-52b9a881.js → server-entry-57b25101.js} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-5e533ce2.cjs → setIvm-911b45e0.cjs} +1 -1
- package/lib/node/{setIvm-25463972.js → setIvm-ee365a66.js} +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-a8019095.cjs → should-force-browser-runtime-in-node-12926830.cjs} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-d883c014.js → should-force-browser-runtime-in-node-dbead5da.js} +1 -1
- package/package.json +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as S, jsxs as
|
|
1
|
+
import { jsx as S, jsxs as Q, Fragment as j } from "react/jsx-runtime";
|
|
2
2
|
import { lazy as C, useRef as Y, useState as k, useEffect as F } from "react";
|
|
3
|
-
import { TARGET as W, isBrowser as L, isEditing as _, isPreviewing as
|
|
3
|
+
import { TARGET as W, isBrowser as L, isEditing as _, isPreviewing as me, setupBrowserForEditing as ve, createRegisterComponentMessage as xe, getDefaultCanTrack as q, getCookieSync as Se, _track as oe, fetchOneEntry as Te, createEditorListener as Ie, logFetch as ke, serializeIncludingFunctions as re, logger as Ce, handleABTestingSync as we } from "./server-entry-1520920a.js";
|
|
4
4
|
import { Video as Ve, Button as Ee, Columns as Re, Fragment as Ae, Image as De, Section as Pe, Symbol as Fe, Text as We, BuilderContext as Ne } from "./blocks-exports.mjs";
|
|
5
|
-
import { triggerAnimation as $e, evaluate as
|
|
5
|
+
import { triggerAnimation as $e, evaluate as pe, fastClone as _e, InlinedStyles as fe, ComponentsContext as Le, Blocks as Be } from "./blocks-30fa0a83.js";
|
|
6
6
|
function tn(e, t, n, o) {
|
|
7
7
|
function r(m) {
|
|
8
8
|
return typeof m == "string";
|
|
@@ -221,7 +221,7 @@ const Ue = `function getPersonalizedVariant(variants, blockId, isHydrationTarget
|
|
|
221
221
|
visibilityStylesEl.innerHTML = newStyleStr;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
}`, qe = "default", je = "filterWithCustomTargeting",
|
|
224
|
+
}`, qe = "default", je = "filterWithCustomTargeting", ge = "builderIoPersonalization", he = "updateVisibilityStylesScript", be = ["react", "vue", "svelte", "qwik"], Me = ["vue", "svelte", "qwik"];
|
|
225
225
|
function nn(e, t) {
|
|
226
226
|
return !(e && e.length > 0) || !t ? !1 : Me.includes(W) ? !0 : !L();
|
|
227
227
|
}
|
|
@@ -266,9 +266,9 @@ function an({
|
|
|
266
266
|
}
|
|
267
267
|
const Ke = () => `
|
|
268
268
|
window.${je} = ${He}
|
|
269
|
-
window.${
|
|
270
|
-
window.${
|
|
271
|
-
`,
|
|
269
|
+
window.${ge} = ${Ue}
|
|
270
|
+
window.${he} = ${Oe}
|
|
271
|
+
`, ye = W === "react", on = (e, t, n) => `window.${ge}(${JSON.stringify(e)}, "${t}", ${ye}${n ? `, "${n}"` : ""})`, rn = (e, t, n) => `window.${he}(${JSON.stringify(e)}, "${t}", ${ye}${n ? `, "${n}"` : ""})`, M = {
|
|
272
272
|
"@type": "@builder.io/sdk:Element",
|
|
273
273
|
layerName: "Accordion item title",
|
|
274
274
|
responsiveStyles: {
|
|
@@ -297,7 +297,7 @@ const Ke = () => `
|
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
}]
|
|
300
|
-
},
|
|
300
|
+
}, K = {
|
|
301
301
|
"@type": "@builder.io/sdk:Element",
|
|
302
302
|
layerName: "Accordion item detail",
|
|
303
303
|
responsiveStyles: {
|
|
@@ -345,19 +345,19 @@ const Ke = () => `
|
|
|
345
345
|
name: "title",
|
|
346
346
|
type: "uiBlocks",
|
|
347
347
|
hideFromUI: !0,
|
|
348
|
-
defaultValue: [
|
|
348
|
+
defaultValue: [M]
|
|
349
349
|
}, {
|
|
350
350
|
name: "detail",
|
|
351
351
|
type: "uiBlocks",
|
|
352
352
|
hideFromUI: !0,
|
|
353
|
-
defaultValue: [
|
|
353
|
+
defaultValue: [K]
|
|
354
354
|
}],
|
|
355
355
|
defaultValue: [{
|
|
356
|
-
title: [
|
|
357
|
-
detail: [
|
|
356
|
+
title: [M],
|
|
357
|
+
detail: [K]
|
|
358
358
|
}, {
|
|
359
|
-
title: [
|
|
360
|
-
detail: [
|
|
359
|
+
title: [M],
|
|
360
|
+
detail: [K]
|
|
361
361
|
}],
|
|
362
362
|
showIf: (e) => !e.get("useChildrenForItems")
|
|
363
363
|
}, {
|
|
@@ -392,7 +392,7 @@ const Ke = () => `
|
|
|
392
392
|
builderComponents: !0,
|
|
393
393
|
builderLinkComponent: !0
|
|
394
394
|
}
|
|
395
|
-
}, Je = C(() => import("./accordion-
|
|
395
|
+
}, Je = C(() => import("./accordion-97de712c.js")), Qe = {
|
|
396
396
|
name: "Core:Button",
|
|
397
397
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
398
398
|
defaultStyles: {
|
|
@@ -641,7 +641,7 @@ const Ke = () => `
|
|
|
641
641
|
hidden: !0,
|
|
642
642
|
canHaveChildren: !0,
|
|
643
643
|
noWrap: !0
|
|
644
|
-
},
|
|
644
|
+
}, Z = ["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"], Xe = ["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"], Ze = {
|
|
645
645
|
name: "Image",
|
|
646
646
|
static: !0,
|
|
647
647
|
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",
|
|
@@ -656,7 +656,7 @@ const Ke = () => `
|
|
|
656
656
|
name: "image",
|
|
657
657
|
type: "file",
|
|
658
658
|
bubble: !0,
|
|
659
|
-
allowedFileTypes:
|
|
659
|
+
allowedFileTypes: Z,
|
|
660
660
|
required: !0,
|
|
661
661
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
662
662
|
onChange: (e) => {
|
|
@@ -789,7 +789,7 @@ const Ke = () => `
|
|
|
789
789
|
defaultValue: []
|
|
790
790
|
}]
|
|
791
791
|
}]
|
|
792
|
-
}, tt = C(() => import("./personalization-container-
|
|
792
|
+
}, tt = C(() => import("./personalization-container-95c36799.js")), nt = {
|
|
793
793
|
name: "Core:Section",
|
|
794
794
|
static: !0,
|
|
795
795
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -845,7 +845,7 @@ const Ke = () => `
|
|
|
845
845
|
builderContext: !0,
|
|
846
846
|
builderComponents: !0
|
|
847
847
|
}
|
|
848
|
-
}, it = C(() => import("./slot-
|
|
848
|
+
}, it = C(() => import("./slot-6b97f172.js")), ot = {
|
|
849
849
|
name: "Symbol",
|
|
850
850
|
noWrap: !0,
|
|
851
851
|
static: !0,
|
|
@@ -884,7 +884,7 @@ const Ke = () => `
|
|
|
884
884
|
builderComponents: !0,
|
|
885
885
|
builderLinkComponent: !0
|
|
886
886
|
}
|
|
887
|
-
},
|
|
887
|
+
}, z = {
|
|
888
888
|
"@type": "@builder.io/sdk:Element",
|
|
889
889
|
responsiveStyles: {
|
|
890
890
|
large: {
|
|
@@ -906,7 +906,7 @@ const Ke = () => `
|
|
|
906
906
|
text: "New tab"
|
|
907
907
|
}
|
|
908
908
|
}
|
|
909
|
-
},
|
|
909
|
+
}, J = {
|
|
910
910
|
"@type": "@builder.io/sdk:Element",
|
|
911
911
|
responsiveStyles: {
|
|
912
912
|
large: {
|
|
@@ -932,16 +932,16 @@ const Ke = () => `
|
|
|
932
932
|
name: "label",
|
|
933
933
|
type: "uiBlocks",
|
|
934
934
|
hideFromUI: !0,
|
|
935
|
-
defaultValue: [
|
|
935
|
+
defaultValue: [z]
|
|
936
936
|
}, {
|
|
937
937
|
name: "content",
|
|
938
938
|
type: "uiBlocks",
|
|
939
939
|
hideFromUI: !0,
|
|
940
|
-
defaultValue: [
|
|
940
|
+
defaultValue: [J]
|
|
941
941
|
}],
|
|
942
942
|
defaultValue: [{
|
|
943
943
|
label: [{
|
|
944
|
-
...
|
|
944
|
+
...z,
|
|
945
945
|
component: {
|
|
946
946
|
name: "Text",
|
|
947
947
|
options: {
|
|
@@ -950,7 +950,7 @@ const Ke = () => `
|
|
|
950
950
|
}
|
|
951
951
|
}],
|
|
952
952
|
content: [{
|
|
953
|
-
...
|
|
953
|
+
...J,
|
|
954
954
|
component: {
|
|
955
955
|
name: "Text",
|
|
956
956
|
options: {
|
|
@@ -960,7 +960,7 @@ const Ke = () => `
|
|
|
960
960
|
}]
|
|
961
961
|
}, {
|
|
962
962
|
label: [{
|
|
963
|
-
...
|
|
963
|
+
...z,
|
|
964
964
|
component: {
|
|
965
965
|
name: "Text",
|
|
966
966
|
options: {
|
|
@@ -969,7 +969,7 @@ const Ke = () => `
|
|
|
969
969
|
}
|
|
970
970
|
}],
|
|
971
971
|
content: [{
|
|
972
|
-
...
|
|
972
|
+
...J,
|
|
973
973
|
component: {
|
|
974
974
|
name: "Text",
|
|
975
975
|
options: {
|
|
@@ -1025,7 +1025,7 @@ const Ke = () => `
|
|
|
1025
1025
|
builderComponents: !0,
|
|
1026
1026
|
builderLinkComponent: !0
|
|
1027
1027
|
}
|
|
1028
|
-
}, lt = C(() => import("./tabs-
|
|
1028
|
+
}, lt = C(() => import("./tabs-d0f2c920.js")), st = {
|
|
1029
1029
|
shouldReceiveBuilderProps: {},
|
|
1030
1030
|
name: "Text",
|
|
1031
1031
|
static: !0,
|
|
@@ -1065,7 +1065,7 @@ const Ke = () => `
|
|
|
1065
1065
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1066
1066
|
advanced: !0
|
|
1067
1067
|
}]
|
|
1068
|
-
}, dt = C(() => import("./custom-code-
|
|
1068
|
+
}, dt = C(() => import("./custom-code-744f5ad4.js")), ct = {
|
|
1069
1069
|
name: "Embed",
|
|
1070
1070
|
static: !0,
|
|
1071
1071
|
inputs: [{
|
|
@@ -1080,7 +1080,7 @@ const Ke = () => `
|
|
|
1080
1080
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1081
1081
|
hideFromUI: !0
|
|
1082
1082
|
}]
|
|
1083
|
-
}, mt = C(() => import("./embed-
|
|
1083
|
+
}, mt = C(() => import("./embed-89aec80c.js")), pt = {
|
|
1084
1084
|
name: "Form:Form",
|
|
1085
1085
|
// editableTags: ['builder-form-error']
|
|
1086
1086
|
defaults: {
|
|
@@ -1317,7 +1317,7 @@ const Ke = () => `
|
|
|
1317
1317
|
builderComponents: !0,
|
|
1318
1318
|
builderLinkComponent: !0
|
|
1319
1319
|
}
|
|
1320
|
-
}, ft = C(() => import("./form-
|
|
1320
|
+
}, ft = C(() => import("./form-6d81e9e1.js")), gt = {
|
|
1321
1321
|
name: "Form:Input",
|
|
1322
1322
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
1323
1323
|
inputs: [
|
|
@@ -1368,7 +1368,7 @@ const Ke = () => `
|
|
|
1368
1368
|
borderStyle: "solid",
|
|
1369
1369
|
borderColor: "#ccc"
|
|
1370
1370
|
}
|
|
1371
|
-
}, ht = C(() => import("./input-
|
|
1371
|
+
}, ht = C(() => import("./input-85213ddc.js")), bt = {
|
|
1372
1372
|
name: "Form:Select",
|
|
1373
1373
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
1374
1374
|
defaultStyles: {
|
|
@@ -1410,7 +1410,7 @@ const Ke = () => `
|
|
|
1410
1410
|
}],
|
|
1411
1411
|
static: !0,
|
|
1412
1412
|
noWrap: !0
|
|
1413
|
-
}, yt = C(() => import("./select-
|
|
1413
|
+
}, yt = C(() => import("./select-7ce7b157.js")), vt = {
|
|
1414
1414
|
name: "Form:SubmitButton",
|
|
1415
1415
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
1416
1416
|
defaultStyles: {
|
|
@@ -1479,7 +1479,7 @@ const Ke = () => `
|
|
|
1479
1479
|
name: "image",
|
|
1480
1480
|
bubble: !0,
|
|
1481
1481
|
type: "file",
|
|
1482
|
-
allowedFileTypes:
|
|
1482
|
+
allowedFileTypes: Z,
|
|
1483
1483
|
required: !0
|
|
1484
1484
|
}, {
|
|
1485
1485
|
name: "backgroundSize",
|
|
@@ -1515,7 +1515,7 @@ const Ke = () => `
|
|
|
1515
1515
|
defaultValue: 0.7041
|
|
1516
1516
|
}],
|
|
1517
1517
|
noWrap: !0
|
|
1518
|
-
}, kt = C(() => import("./img-
|
|
1518
|
+
}, kt = C(() => import("./img-e324614f.js")), Ct = {
|
|
1519
1519
|
name: "Video",
|
|
1520
1520
|
canHaveChildren: !0,
|
|
1521
1521
|
defaultStyles: {
|
|
@@ -1533,7 +1533,7 @@ const Ke = () => `
|
|
|
1533
1533
|
}, {
|
|
1534
1534
|
name: "posterImage",
|
|
1535
1535
|
type: "file",
|
|
1536
|
-
allowedFileTypes:
|
|
1536
|
+
allowedFileTypes: Z,
|
|
1537
1537
|
helperText: "Image to show before the video plays"
|
|
1538
1538
|
}, {
|
|
1539
1539
|
name: "autoPlay",
|
|
@@ -1626,7 +1626,7 @@ const Ke = () => `
|
|
|
1626
1626
|
}, {
|
|
1627
1627
|
component: Ve,
|
|
1628
1628
|
...Ct
|
|
1629
|
-
}],
|
|
1629
|
+
}], le = () => [{
|
|
1630
1630
|
component: Ee,
|
|
1631
1631
|
...Qe
|
|
1632
1632
|
}, {
|
|
@@ -1650,7 +1650,7 @@ const Ke = () => `
|
|
|
1650
1650
|
}, {
|
|
1651
1651
|
component: We,
|
|
1652
1652
|
...st
|
|
1653
|
-
}, ...
|
|
1653
|
+
}, ...be.includes(W) ? [{
|
|
1654
1654
|
component: tt,
|
|
1655
1655
|
...et
|
|
1656
1656
|
}] : [], {
|
|
@@ -1752,26 +1752,34 @@ const Ke = () => `
|
|
|
1752
1752
|
thisScriptEl?.remove();
|
|
1753
1753
|
}
|
|
1754
1754
|
return;
|
|
1755
|
-
}`,
|
|
1755
|
+
}`, G = "builderIoAbTest", X = "builderIoRenderContent", H = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1756
1756
|
...t,
|
|
1757
1757
|
testVariationId: t.id,
|
|
1758
1758
|
id: e == null ? void 0 : e.id
|
|
1759
1759
|
})), Rt = ({
|
|
1760
1760
|
canTrack: e,
|
|
1761
1761
|
content: t
|
|
1762
|
-
}) => !(!(
|
|
1763
|
-
|
|
1764
|
-
|
|
1762
|
+
}) => !(!(H(t).length > 0) || !e || L()), At = (e) => e === "react" || e === "reactNative", Dt = W === "angular", ee = At(W), Pt = () => `
|
|
1763
|
+
(function() {
|
|
1764
|
+
if (!window.${G}) {
|
|
1765
|
+
window.${G} = ${Vt};
|
|
1766
|
+
}
|
|
1767
|
+
if (!window.${X}) {
|
|
1768
|
+
window.${X} = ${Et};
|
|
1769
|
+
}${ee ? `
|
|
1770
|
+
var thisScriptEl = document.currentScript;
|
|
1771
|
+
if (thisScriptEl) { thisScriptEl.remove(); }` : ""}
|
|
1772
|
+
})();
|
|
1765
1773
|
`, Ft = (e, t) => `
|
|
1766
|
-
window.${
|
|
1767
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
1774
|
+
window.${G}(
|
|
1775
|
+
"${t}",${JSON.stringify(e)}, ${ee}, ${Dt}
|
|
1768
1776
|
)`, Wt = ({
|
|
1769
1777
|
contentId: e,
|
|
1770
1778
|
variationId: t
|
|
1771
|
-
}) => `window.${
|
|
1772
|
-
"${t}", "${e}", ${
|
|
1779
|
+
}) => `window.${X}(
|
|
1780
|
+
"${t}", "${e}", ${ee}
|
|
1773
1781
|
)`;
|
|
1774
|
-
function
|
|
1782
|
+
function O(e) {
|
|
1775
1783
|
return /* @__PURE__ */ S(
|
|
1776
1784
|
"script",
|
|
1777
1785
|
{
|
|
@@ -1781,7 +1789,7 @@ function q(e) {
|
|
|
1781
1789
|
}
|
|
1782
1790
|
);
|
|
1783
1791
|
}
|
|
1784
|
-
function
|
|
1792
|
+
function se(e) {
|
|
1785
1793
|
return Math.round(e * 1e3) / 1e3;
|
|
1786
1794
|
}
|
|
1787
1795
|
const Nt = (e, t, n = !0) => {
|
|
@@ -1798,11 +1806,11 @@ const Nt = (e, t, n = !0) => {
|
|
|
1798
1806
|
}, $t = (e) => Nt(e, (t) => {
|
|
1799
1807
|
const n = t.getAttribute("builder-id") || t.id;
|
|
1800
1808
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
1801
|
-
}),
|
|
1809
|
+
}), ue = ({
|
|
1802
1810
|
event: e,
|
|
1803
1811
|
target: t
|
|
1804
1812
|
}) => {
|
|
1805
|
-
const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, l =
|
|
1813
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, l = se(o / n.width), a = se(r / n.height);
|
|
1806
1814
|
return {
|
|
1807
1815
|
x: l,
|
|
1808
1816
|
y: a
|
|
@@ -1812,18 +1820,18 @@ const Nt = (e, t, n = !0) => {
|
|
|
1812
1820
|
return {
|
|
1813
1821
|
targetBuilderElement: o || void 0,
|
|
1814
1822
|
metadata: {
|
|
1815
|
-
targetOffset: t ?
|
|
1823
|
+
targetOffset: t ? ue({
|
|
1816
1824
|
event: e,
|
|
1817
1825
|
target: t
|
|
1818
1826
|
}) : void 0,
|
|
1819
|
-
builderTargetOffset: n ?
|
|
1827
|
+
builderTargetOffset: n ? ue({
|
|
1820
1828
|
event: e,
|
|
1821
1829
|
target: n
|
|
1822
1830
|
}) : void 0,
|
|
1823
1831
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
1824
1832
|
}
|
|
1825
1833
|
};
|
|
1826
|
-
}, Lt = ["svelte", "qwik", "vue"],
|
|
1834
|
+
}, Lt = ["svelte", "qwik", "vue"], de = () => Lt.includes(W) && (_() || me()), Bt = (e) => {
|
|
1827
1835
|
var l, a;
|
|
1828
1836
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = (a = e.fileUrl) != null ? a : (l = e == null ? void 0 : e.files) == null ? void 0 : l.regular;
|
|
1829
1837
|
let r = "";
|
|
@@ -1876,7 +1884,7 @@ font-weight: ${i};
|
|
|
1876
1884
|
}
|
|
1877
1885
|
`, qt = (e) => e ? "" : Ot, jt = (e) => `variant-${e}`;
|
|
1878
1886
|
function Mt(e) {
|
|
1879
|
-
var
|
|
1887
|
+
var ne, ae, ie;
|
|
1880
1888
|
const t = Y(null);
|
|
1881
1889
|
k(() => !1), k(
|
|
1882
1890
|
() => e.builderContextSignal
|
|
@@ -1956,10 +1964,10 @@ function Mt(e) {
|
|
|
1956
1964
|
var h, f;
|
|
1957
1965
|
if (e.builderContextSignal.content) {
|
|
1958
1966
|
const y = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId, p = (f = e.builderContextSignal.content) == null ? void 0 : f.id;
|
|
1959
|
-
|
|
1967
|
+
oe({
|
|
1960
1968
|
apiHost: e.apiHost,
|
|
1961
1969
|
type: "click",
|
|
1962
|
-
canTrack:
|
|
1970
|
+
canTrack: q(e.canTrack),
|
|
1963
1971
|
contentId: p,
|
|
1964
1972
|
apiKey: e.apiKey,
|
|
1965
1973
|
variationId: y !== p ? y : void 0,
|
|
@@ -1984,7 +1992,7 @@ function Mt(e) {
|
|
|
1984
1992
|
const v = $.replace(
|
|
1985
1993
|
/{{([^}]+)}}/g,
|
|
1986
1994
|
(E, U) => String(
|
|
1987
|
-
|
|
1995
|
+
pe({
|
|
1988
1996
|
code: U,
|
|
1989
1997
|
context: e.context || {},
|
|
1990
1998
|
localState: void 0,
|
|
@@ -2038,8 +2046,8 @@ function Mt(e) {
|
|
|
2038
2046
|
)
|
|
2039
2047
|
);
|
|
2040
2048
|
}
|
|
2041
|
-
const
|
|
2042
|
-
return
|
|
2049
|
+
const te = Y(!1);
|
|
2050
|
+
return te.current || (w(), V(), te.current = !0), F(() => {
|
|
2043
2051
|
var c, h, f, y, p;
|
|
2044
2052
|
if (L()) {
|
|
2045
2053
|
_() && !e.isNestedRender && (window.addEventListener("message", R), ve({
|
|
@@ -2066,13 +2074,13 @@ function Mt(e) {
|
|
|
2066
2074
|
"builder:component:stateChangeListenerActivated",
|
|
2067
2075
|
V
|
|
2068
2076
|
));
|
|
2069
|
-
const b = e.builderContextSignal.content &&
|
|
2077
|
+
const b = e.builderContextSignal.content && q(e.canTrack), P = Se({
|
|
2070
2078
|
name: `builder.tests.${(h = e.builderContextSignal.content) == null ? void 0 : h.id}`,
|
|
2071
2079
|
canTrack: !0
|
|
2072
2080
|
}), $ = (f = e.builderContextSignal.content) == null ? void 0 : f.testVariationId;
|
|
2073
2081
|
if (b && $ === P) {
|
|
2074
2082
|
const v = (y = e.builderContextSignal.content) == null ? void 0 : y.id, x = e.apiKey;
|
|
2075
|
-
|
|
2083
|
+
oe({
|
|
2076
2084
|
apiHost: e.apiHost,
|
|
2077
2085
|
type: "impression",
|
|
2078
2086
|
canTrack: !0,
|
|
@@ -2081,7 +2089,7 @@ function Mt(e) {
|
|
|
2081
2089
|
variationId: P !== v ? P : void 0
|
|
2082
2090
|
});
|
|
2083
2091
|
}
|
|
2084
|
-
if (
|
|
2092
|
+
if (me() && !_()) {
|
|
2085
2093
|
const v = new URL(location.href).searchParams, x = v.get("builder.preview"), N = v.get(
|
|
2086
2094
|
`builder.overrides.${x}`
|
|
2087
2095
|
), E = v.get("apiKey") || v.get("builder.space");
|
|
@@ -2122,18 +2130,18 @@ function Mt(e) {
|
|
|
2122
2130
|
"builder:component:stateChangeListenerActivated",
|
|
2123
2131
|
V
|
|
2124
2132
|
));
|
|
2125
|
-
}, []), /* @__PURE__ */ S(Ne.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ||
|
|
2133
|
+
}, []), /* @__PURE__ */ S(Ne.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content || de() ? /* @__PURE__ */ S(
|
|
2126
2134
|
m,
|
|
2127
2135
|
{
|
|
2128
2136
|
ref: t,
|
|
2129
2137
|
onClick: (c) => I(c),
|
|
2130
|
-
"builder-content-id": (
|
|
2138
|
+
"builder-content-id": (ne = e.builderContextSignal.content) == null ? void 0 : ne.id,
|
|
2131
2139
|
"builder-model": e.model,
|
|
2132
2140
|
className: jt(
|
|
2133
|
-
((
|
|
2141
|
+
((ae = e.content) == null ? void 0 : ae.testVariationId) || ((ie = e.content) == null ? void 0 : ie.id)
|
|
2134
2142
|
),
|
|
2135
2143
|
style: {
|
|
2136
|
-
display: !e.builderContextSignal.content &&
|
|
2144
|
+
display: !e.builderContextSignal.content && de() ? "none" : void 0
|
|
2137
2145
|
},
|
|
2138
2146
|
...u(),
|
|
2139
2147
|
...e.contentWrapperProps,
|
|
@@ -2155,7 +2163,7 @@ ${qt(e.isNestedRender)}
|
|
|
2155
2163
|
`.trim()
|
|
2156
2164
|
);
|
|
2157
2165
|
return /* @__PURE__ */ S(
|
|
2158
|
-
|
|
2166
|
+
fe,
|
|
2159
2167
|
{
|
|
2160
2168
|
id: "builderio-content",
|
|
2161
2169
|
styles: t,
|
|
@@ -2191,7 +2199,7 @@ const zt = ({
|
|
|
2191
2199
|
},
|
|
2192
2200
|
meta: e == null ? void 0 : e.meta
|
|
2193
2201
|
} : void 0;
|
|
2194
|
-
function
|
|
2202
|
+
function ce(e) {
|
|
2195
2203
|
var m, g, R, T, A, s, d, D, B;
|
|
2196
2204
|
const [t, n] = k(
|
|
2197
2205
|
() => {
|
|
@@ -2212,14 +2220,14 @@ function se(e) {
|
|
|
2212
2220
|
}
|
|
2213
2221
|
const [r, l] = k(
|
|
2214
2222
|
() => [
|
|
2215
|
-
...
|
|
2223
|
+
...le(),
|
|
2216
2224
|
...e.customComponents || []
|
|
2217
2225
|
].reduce(
|
|
2218
2226
|
(I, { component: w, ...V }) => ({
|
|
2219
2227
|
...I,
|
|
2220
2228
|
[V.name]: {
|
|
2221
2229
|
component: w,
|
|
2222
|
-
...
|
|
2230
|
+
...re(V)
|
|
2223
2231
|
}
|
|
2224
2232
|
}),
|
|
2225
2233
|
{}
|
|
@@ -2241,12 +2249,12 @@ function se(e) {
|
|
|
2241
2249
|
apiKey: e.apiKey,
|
|
2242
2250
|
apiVersion: e.apiVersion,
|
|
2243
2251
|
componentInfos: [
|
|
2244
|
-
...
|
|
2252
|
+
...le(),
|
|
2245
2253
|
...e.customComponents || []
|
|
2246
2254
|
].reduce(
|
|
2247
2255
|
(I, { component: w, ...V }) => ({
|
|
2248
2256
|
...I,
|
|
2249
|
-
[V.name]:
|
|
2257
|
+
[V.name]: re(V)
|
|
2250
2258
|
}),
|
|
2251
2259
|
{}
|
|
2252
2260
|
),
|
|
@@ -2261,7 +2269,7 @@ function se(e) {
|
|
|
2261
2269
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2262
2270
|
);
|
|
2263
2271
|
const I = (g = (m = a.content) == null ? void 0 : m.data) == null ? void 0 : g.jsCode;
|
|
2264
|
-
I &&
|
|
2272
|
+
I && pe({
|
|
2265
2273
|
code: I,
|
|
2266
2274
|
context: e.context || {},
|
|
2267
2275
|
localState: void 0,
|
|
@@ -2279,7 +2287,7 @@ function se(e) {
|
|
|
2279
2287
|
value: {
|
|
2280
2288
|
registeredComponents: r
|
|
2281
2289
|
},
|
|
2282
|
-
children: /* @__PURE__ */
|
|
2290
|
+
children: /* @__PURE__ */ Q(
|
|
2283
2291
|
Mt,
|
|
2284
2292
|
{
|
|
2285
2293
|
apiHost: e.apiHost,
|
|
@@ -2301,7 +2309,7 @@ function se(e) {
|
|
|
2301
2309
|
setBuilderContextSignal: i,
|
|
2302
2310
|
children: [
|
|
2303
2311
|
e.isSsrAbTest ? /* @__PURE__ */ S(
|
|
2304
|
-
|
|
2312
|
+
O,
|
|
2305
2313
|
{
|
|
2306
2314
|
id: "builderio-variant-visibility",
|
|
2307
2315
|
scriptStr: t,
|
|
@@ -2337,14 +2345,14 @@ function Qt(e) {
|
|
|
2337
2345
|
var a;
|
|
2338
2346
|
const [t, n] = k(
|
|
2339
2347
|
() => Rt({
|
|
2340
|
-
canTrack:
|
|
2348
|
+
canTrack: q(e.canTrack),
|
|
2341
2349
|
content: e.content
|
|
2342
2350
|
})
|
|
2343
2351
|
);
|
|
2344
2352
|
function o() {
|
|
2345
2353
|
var i;
|
|
2346
2354
|
return Ft(
|
|
2347
|
-
|
|
2355
|
+
H(e.content).map((u) => ({
|
|
2348
2356
|
id: u.testVariationId,
|
|
2349
2357
|
testRatio: u.testRatio
|
|
2350
2358
|
})),
|
|
@@ -2352,7 +2360,7 @@ function Qt(e) {
|
|
|
2352
2360
|
);
|
|
2353
2361
|
}
|
|
2354
2362
|
function r() {
|
|
2355
|
-
return
|
|
2363
|
+
return H(e.content).map((i) => `.variant-${i.testVariationId} { display: none; } `).join("");
|
|
2356
2364
|
}
|
|
2357
2365
|
function l() {
|
|
2358
2366
|
var i;
|
|
@@ -2361,32 +2369,30 @@ function Qt(e) {
|
|
|
2361
2369
|
testVariationId: (i = e.content) == null ? void 0 : i.id
|
|
2362
2370
|
} : we({
|
|
2363
2371
|
item: e.content,
|
|
2364
|
-
canTrack:
|
|
2372
|
+
canTrack: q(e.canTrack)
|
|
2365
2373
|
});
|
|
2366
2374
|
}
|
|
2367
2375
|
return F(() => {
|
|
2368
|
-
}, []), /* @__PURE__ */
|
|
2369
|
-
!e.isNestedRender && W !== "reactNative" ? /* @__PURE__ */
|
|
2376
|
+
}, []), /* @__PURE__ */ Q(j, { children: [
|
|
2377
|
+
!e.isNestedRender && W !== "reactNative" ? /* @__PURE__ */ S(j, { children: be.includes(W) ? /* @__PURE__ */ S(
|
|
2378
|
+
O,
|
|
2379
|
+
{
|
|
2380
|
+
id: "builderio-init-personalization-variants-fns",
|
|
2381
|
+
nonce: e.nonce || "",
|
|
2382
|
+
scriptStr: Ke()
|
|
2383
|
+
}
|
|
2384
|
+
) : null }) : null,
|
|
2385
|
+
t ? /* @__PURE__ */ Q(j, { children: [
|
|
2370
2386
|
/* @__PURE__ */ S(
|
|
2371
|
-
|
|
2387
|
+
O,
|
|
2372
2388
|
{
|
|
2373
2389
|
id: "builderio-init-variants-fns",
|
|
2374
2390
|
scriptStr: Pt(),
|
|
2375
2391
|
nonce: e.nonce || ""
|
|
2376
2392
|
}
|
|
2377
2393
|
),
|
|
2378
|
-
fe.includes(W) ? /* @__PURE__ */ S(
|
|
2379
|
-
q,
|
|
2380
|
-
{
|
|
2381
|
-
id: "builderio-init-personalization-variants-fns",
|
|
2382
|
-
nonce: e.nonce || "",
|
|
2383
|
-
scriptStr: Ke()
|
|
2384
|
-
}
|
|
2385
|
-
) : null
|
|
2386
|
-
] }) : null,
|
|
2387
|
-
t ? /* @__PURE__ */ H(M, { children: [
|
|
2388
2394
|
/* @__PURE__ */ S(
|
|
2389
|
-
|
|
2395
|
+
fe,
|
|
2390
2396
|
{
|
|
2391
2397
|
id: "builderio-variants",
|
|
2392
2398
|
styles: r(),
|
|
@@ -2394,15 +2400,15 @@ function Qt(e) {
|
|
|
2394
2400
|
}
|
|
2395
2401
|
),
|
|
2396
2402
|
/* @__PURE__ */ S(
|
|
2397
|
-
|
|
2403
|
+
O,
|
|
2398
2404
|
{
|
|
2399
2405
|
id: "builderio-variants-visibility",
|
|
2400
2406
|
scriptStr: o(),
|
|
2401
2407
|
nonce: e.nonce || ""
|
|
2402
2408
|
}
|
|
2403
2409
|
),
|
|
2404
|
-
(a =
|
|
2405
|
-
|
|
2410
|
+
(a = H(e.content)) == null ? void 0 : a.map((i) => /* @__PURE__ */ S(
|
|
2411
|
+
ce,
|
|
2406
2412
|
{
|
|
2407
2413
|
apiHost: e.apiHost,
|
|
2408
2414
|
isNestedRender: e.isNestedRender,
|
|
@@ -2430,7 +2436,7 @@ function Qt(e) {
|
|
|
2430
2436
|
))
|
|
2431
2437
|
] }) : null,
|
|
2432
2438
|
/* @__PURE__ */ S(
|
|
2433
|
-
|
|
2439
|
+
ce,
|
|
2434
2440
|
{
|
|
2435
2441
|
apiHost: e.apiHost,
|
|
2436
2442
|
nonce: e.nonce,
|
|
@@ -2463,7 +2469,7 @@ const ln = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2463
2469
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2464
2470
|
export {
|
|
2465
2471
|
qe as DEFAULT_INDEX,
|
|
2466
|
-
|
|
2472
|
+
O as InlinedScript,
|
|
2467
2473
|
Me as SDKS_REQUIRING_RESET_APPROACH,
|
|
2468
2474
|
nn as checkShouldRenderVariants,
|
|
2469
2475
|
ln as contentVariants,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as f, useState as p, useEffect as d } from "react";
|
|
3
|
-
import { isEditing as m, logger as g } from "./server-entry-
|
|
3
|
+
import { isEditing as m, logger as g } from "./server-entry-1520920a.js";
|
|
4
4
|
function T(r) {
|
|
5
5
|
const n = f(null), [s, y] = p(() => []), [i, h] = p(() => []);
|
|
6
6
|
function o() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),n=require("react"),l=require("./server-entry-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),n=require("react"),l=require("./server-entry-5ed2b32b.cjs");function f(c){const r=n.useRef(null),[i,m]=n.useState(()=>[]),[u,g]=n.useState(()=>[]);function o(){var d;if(!r.current||!((d=r.current)!=null&&d.getElementsByTagName)||typeof window=="undefined")return;const a=r.current.getElementsByTagName("script");for(let s=0;s<a.length;s++){const e=a[s];if(e.src){if(i.includes(e.src))continue;i.push(e.src);const t=document.createElement("script");t.async=!0,t.src=e.src,document.head.appendChild(t)}else if(!e.type||["text/javascript","application/javascript","application/ecmascript"].includes(e.type)){if(u.includes(e.innerText))continue;try{u.push(e.innerText),new Function(e.innerText)()}catch(t){l.logger.warn("[BUILDER.IO] `CustomCode`: Error running script:",t)}}}}return n.useEffect(()=>{o()},[]),n.useEffect(()=>{l.isEditing()&&o()},[c.code]),p.jsx("div",{ref:r,className:"builder-custom-code"+(c.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:c.code}})}exports.default=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),r=require("react"),m=require("./server-entry-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),r=require("react"),m=require("./server-entry-5ed2b32b.cjs"),f=["text/javascript","application/javascript","application/ecmascript"],S=s=>f.includes(s.type);function g(s){const t=r.useRef(null),[i,E]=r.useState(()=>[]),[u,y]=r.useState(()=>[]),[a,l]=r.useState(()=>!1);function p(){if(!t.current||!t.current.getElementsByTagName)return;const o=t.current.getElementsByTagName("script");for(let c=0;c<o.length;c++){const e=o[c];if(e.src&&!i.includes(e.src)){i.push(e.src);const n=document.createElement("script");n.async=!0,n.src=e.src,document.head.appendChild(n)}else if(S(e)&&!u.includes(e.innerText))try{u.push(e.innerText),new Function(e.innerText)()}catch(n){m.logger.warn("[BUILDER.IO] `Embed`: Error running script:",n)}}}return r.useEffect(()=>{t.current&&!a&&(l(!0),p())},[t.current,a]),d.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:s.content}})}exports.default=g;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as d, useState as c, useEffect as f } from "react";
|
|
3
|
-
import { logger as E } from "./server-entry-
|
|
3
|
+
import { logger as E } from "./server-entry-1520920a.js";
|
|
4
4
|
const g = ["text/javascript", "application/javascript", "application/ecmascript"], I = (r) => g.includes(r.type);
|
|
5
5
|
function y(r) {
|
|
6
6
|
const e = d(null), [i, S] = c(() => []), [u, T] = c(() => []), [o, p] = c(() => !1);
|