@builder.io/sdk-react 1.0.23 → 1.0.25

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.
Files changed (83) hide show
  1. package/lib/browser/blocks-exports.cjs +31 -31
  2. package/lib/browser/blocks-exports.mjs +1042 -826
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/init.cjs +8 -1
  6. package/lib/browser/init.mjs +37 -2
  7. package/lib/browser/{server-entry-4ca9f249.js → server-entry-d15ee928.js} +2 -1
  8. package/lib/browser/{server-entry-f69e2b2a.cjs → server-entry-f28ec73b.cjs} +2 -2
  9. package/lib/browser/server-entry.cjs +1 -1
  10. package/lib/browser/server-entry.mjs +1 -1
  11. package/lib/edge/{blocks-93608689.js → blocks-7c1422af.js} +682 -685
  12. package/lib/edge/blocks-8c31869c.cjs +32 -0
  13. package/lib/edge/blocks-exports.cjs +1 -1
  14. package/lib/edge/blocks-exports.mjs +2 -2
  15. package/lib/edge/button-3439cb1b.js +31 -0
  16. package/lib/edge/button-96857fcf.cjs +1 -0
  17. package/lib/edge/columns-0d152875.js +163 -0
  18. package/lib/edge/columns-930c3d9a.cjs +28 -0
  19. package/lib/edge/{content-variants-f416bff5.js → content-variants-1ff6980e.js} +404 -262
  20. package/lib/edge/content-variants-d62785c6.cjs +134 -0
  21. package/lib/edge/{form-8526db32.js → form-1dbd32d7.js} +3 -3
  22. package/lib/edge/{form-44ceed15.cjs → form-69ed6cc5.cjs} +1 -1
  23. package/lib/edge/{get-class-prop-name-e85bf7a3.js → get-class-prop-name-58140fb7.js} +2 -1
  24. package/lib/edge/get-class-prop-name-c793129b.cjs +1 -0
  25. package/lib/edge/image-764070f8.cjs +17 -0
  26. package/lib/edge/{image-0008c792.js → image-9d24a962.js} +24 -24
  27. package/lib/edge/{img-a5802e2b.cjs → img-305b1676.cjs} +1 -1
  28. package/lib/edge/{img-5ef224a8.js → img-d4b1130f.js} +1 -1
  29. package/lib/edge/index.cjs +1 -1
  30. package/lib/edge/index.mjs +1 -1
  31. package/lib/edge/init.cjs +8 -1
  32. package/lib/edge/init.mjs +37 -2
  33. package/lib/edge/{input-f1aa0191.cjs → input-28dd9b60.cjs} +1 -1
  34. package/lib/edge/{input-3f85283b.js → input-a7054c28.js} +1 -1
  35. package/lib/edge/{select-d4c018c0.cjs → select-57b6e444.cjs} +1 -1
  36. package/lib/edge/{select-4fe889b6.js → select-dd83a040.js} +1 -1
  37. package/lib/edge/{server-entry-e1e18fd2.js → server-entry-cb8ad418.js} +2 -1
  38. package/lib/edge/{server-entry-c4b7844d.cjs → server-entry-d9413c6f.cjs} +2 -2
  39. package/lib/edge/server-entry.cjs +1 -1
  40. package/lib/edge/server-entry.mjs +1 -1
  41. package/lib/edge/{slot-2a11e808.cjs → slot-3f6aff1b.cjs} +1 -1
  42. package/lib/edge/{slot-97599025.js → slot-7dbe2bcb.js} +3 -3
  43. package/lib/edge/symbol-63f3b56e.cjs +1 -0
  44. package/lib/edge/{symbol-a90a41a3.js → symbol-a20aae0e.js} +32 -26
  45. package/lib/edge/tabs-f559c3bf.cjs +1 -0
  46. package/lib/edge/tabs-f5fd67a5.js +69 -0
  47. package/lib/node/blocks-exports.cjs +32 -32
  48. package/lib/node/blocks-exports.mjs +1158 -942
  49. package/lib/node/index.cjs +1 -1
  50. package/lib/node/index.mjs +2 -2
  51. package/lib/node/init.cjs +1 -1
  52. package/lib/node/init.mjs +8 -6
  53. package/lib/node/node-runtime-79a56b80.cjs +48 -0
  54. package/lib/node/{node-runtime-8062cfb8.js → node-runtime-def43b7b.js} +49 -47
  55. package/lib/node/{server-entry-3e54c767.js → server-entry-28bf4f4c.js} +1 -1
  56. package/lib/node/{server-entry-461bfaf9.cjs → server-entry-c4d16d70.cjs} +1 -1
  57. package/lib/node/server-entry.cjs +1 -1
  58. package/lib/node/server-entry.mjs +1 -1
  59. package/package.json +1 -1
  60. package/types/blocks/columns/columns.types.d.ts +1 -1
  61. package/types/blocks/columns/helpers.d.ts +1 -0
  62. package/types/blocks/tabs/component-info.d.ts +2 -0
  63. package/types/blocks/tabs/index.d.ts +1 -0
  64. package/types/blocks/tabs/tabs.d.ts +4 -0
  65. package/types/blocks/tabs/tabs.types.d.ts +13 -0
  66. package/types/blocks/text/text.types.d.ts +2 -1
  67. package/types/components/block/block.helpers.d.ts +4 -2
  68. package/types/components/content/components/styles.helpers.d.ts +1 -0
  69. package/types/components/dynamic-div.d.ts +15 -0
  70. package/types/constants/sdk-version.d.ts +1 -1
  71. package/types/functions/evaluate/node-runtime/init.d.ts +4 -1
  72. package/types/functions/evaluate/node-runtime/node-runtime.d.ts +4 -1
  73. package/types/types/targets.d.ts +1 -1
  74. package/lib/edge/blocks-5539f58f.cjs +0 -32
  75. package/lib/edge/button-7e98d8f3.cjs +0 -1
  76. package/lib/edge/button-8816ab35.js +0 -28
  77. package/lib/edge/columns-8db639b5.cjs +0 -28
  78. package/lib/edge/columns-d065e3c4.js +0 -156
  79. package/lib/edge/content-variants-44d061f2.cjs +0 -134
  80. package/lib/edge/get-class-prop-name-7b951501.cjs +0 -1
  81. package/lib/edge/image-ee3dd857.cjs +0 -17
  82. package/lib/edge/symbol-dbb5c95e.cjs +0 -1
  83. package/lib/node/node-runtime-11a8cdfe.cjs +0 -48
@@ -1,11 +1,11 @@
1
- import { jsx as f, jsxs as P, Fragment as K } from "react/jsx-runtime";
2
- import { lazy as C, useRef as ne, useState as I, useEffect as S } from "react";
3
- import { isBrowser as U, TARGET as Q, isEditing as F, registerInsertMenu as ae, setupBrowserForEditing as ie, createRegisterComponentMessage as oe, getDefaultCanTrack as A, _track as B, isPreviewing as re, fetchOneEntry as se, logger as le, createEditorListener as de, fetch as ce, fastClone as ue, serializeComponentInfo as _, handleABTestingSync as me } from "./server-entry-e1e18fd2.js";
4
- import { Video as pe, Button as ge, Columns as fe, Fragment as he, Image as be, Section as ye, Symbol as xe, Text as ve, BuilderContext as Se } from "./blocks-exports.mjs";
5
- import { triggerAnimation as Ie, evaluate as M, InlinedStyles as G, ComponentsContext as ke, Blocks as Te } from "./blocks-93608689.js";
6
- import "./get-class-prop-name-e85bf7a3.js";
1
+ import { jsx as f, jsxs as D, Fragment as M } from "react/jsx-runtime";
2
+ import { lazy as k, useRef as oe, useState as I, useEffect as S } from "react";
3
+ import { isBrowser as L, TARGET as Z, isEditing as F, registerInsertMenu as re, setupBrowserForEditing as se, createRegisterComponentMessage as le, getDefaultCanTrack as A, _track as O, isPreviewing as de, fetchOneEntry as ce, logger as ue, createEditorListener as me, fetch as pe, fastClone as ge, serializeComponentInfo as z, handleABTestingSync as fe } from "./server-entry-cb8ad418.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 J, InlinedStyles as ee, ComponentsContext as we, Blocks as Ve } from "./blocks-7c1422af.js";
6
+ import "./get-class-prop-name-58140fb7.js";
7
7
  import "./dynamic-renderer-8b343325.js";
8
- const Ce = {
8
+ const Re = {
9
9
  name: "Core:Button",
10
10
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
11
11
  defaultStyles: {
@@ -38,7 +38,7 @@ const Ce = {
38
38
  }],
39
39
  static: !0,
40
40
  noWrap: !0
41
- }, we = {
41
+ }, Ee = {
42
42
  // TODO: ways to statically preprocess JSON for references, functions, etc
43
43
  name: "Columns",
44
44
  isRSC: !0,
@@ -217,7 +217,7 @@ const Ce = {
217
217
  });
218
218
  }
219
219
  const n = e.get("columns");
220
- Array.isArray(n) && n.find((d) => d.get("width")) && (n.find((p) => !p.get("width")) || n.reduce((o, u) => o + u.get("width"), 0) !== 100) && t();
220
+ Array.isArray(n) && n.find((d) => d.get("width")) && (n.find((u) => !u.get("width")) || n.reduce((o, m) => o + m.get("width"), 0) !== 100) && t();
221
221
  }
222
222
  }, {
223
223
  name: "space",
@@ -239,13 +239,13 @@ const Ce = {
239
239
  helperText: "When stacking columns for mobile devices, reverse the ordering",
240
240
  advanced: !0
241
241
  }]
242
- }, Ve = {
242
+ }, Fe = {
243
243
  name: "Fragment",
244
244
  static: !0,
245
245
  hidden: !0,
246
246
  canHaveChildren: !0,
247
247
  noWrap: !0
248
- }, Re = {
248
+ }, We = {
249
249
  name: "Image",
250
250
  static: !0,
251
251
  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",
@@ -266,25 +266,25 @@ const Ce = {
266
266
  onChange: (e) => {
267
267
  e.delete("srcset"), e.delete("noWebp");
268
268
  function n(i, o = 6e4) {
269
- return new Promise((u, v) => {
270
- const b = document.createElement("img");
271
- let w = !1;
272
- b.onload = () => {
273
- w = !0, u(b);
274
- }, b.addEventListener("error", (k) => {
275
- console.warn("Image load failed", k.error), v(k.error);
276
- }), b.src = i, setTimeout(() => {
277
- w || v(new Error("Image load timed out"));
269
+ return new Promise((m, h) => {
270
+ const C = document.createElement("img");
271
+ let T = !1;
272
+ C.onload = () => {
273
+ T = !0, m(C);
274
+ }, C.addEventListener("error", (w) => {
275
+ console.warn("Image load failed", w.error), h(w.error);
276
+ }), C.src = i, setTimeout(() => {
277
+ T || h(new Error("Image load timed out"));
278
278
  }, o);
279
279
  });
280
280
  }
281
281
  function a(i) {
282
282
  return Math.round(i * 1e3) / 1e3;
283
283
  }
284
- const d = e.get("image"), p = e.get("aspectRatio");
284
+ const d = e.get("image"), u = e.get("aspectRatio");
285
285
  if (fetch(d).then((i) => i.blob()).then((i) => {
286
286
  i.type.includes("svg") && e.set("noWebp", !0);
287
- }), d && (!p || p === 0.7041))
287
+ }), d && (!u || u === 0.7041))
288
288
  return n(d).then((i) => {
289
289
  const o = e.get("aspectRatio");
290
290
  e.get("image") === d && (!o || o === 0.7041) && i.width && i.height && (e.set("aspectRatio", a(i.height / i.width)), e.set("height", i.height), e.set("width", i.width));
@@ -345,7 +345,7 @@ const Ce = {
345
345
  advanced: !0,
346
346
  defaultValue: 0.7041
347
347
  }]
348
- }, Ee = {
348
+ }, Ae = {
349
349
  name: "Core:Section",
350
350
  static: !0,
351
351
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -384,7 +384,7 @@ const Ce = {
384
384
  }
385
385
  }
386
386
  }]
387
- }, Fe = {
387
+ }, Pe = {
388
388
  name: "Slot",
389
389
  isRSC: !0,
390
390
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -397,7 +397,7 @@ const Ce = {
397
397
  required: !0,
398
398
  defaultValue: "children"
399
399
  }]
400
- }, We = C(() => import("./slot-97599025.js")), Ae = {
400
+ }, Ue = k(() => import("./slot-7dbe2bcb.js")), De = {
401
401
  name: "Symbol",
402
402
  noWrap: !0,
403
403
  static: !0,
@@ -430,7 +430,142 @@ const Ce = {
430
430
  hideFromUI: !0,
431
431
  type: "boolean"
432
432
  }]
433
- }, Pe = {
433
+ }, P = {
434
+ "@type": "@builder.io/sdk:Element",
435
+ responsiveStyles: {
436
+ large: {
437
+ paddingLeft: "20px",
438
+ paddingRight: "20px",
439
+ paddingTop: "10px",
440
+ paddingBottom: "10px",
441
+ minWidth: "100px",
442
+ textAlign: "center",
443
+ display: "flex",
444
+ flexDirection: "column",
445
+ cursor: "pointer",
446
+ userSelect: "none"
447
+ }
448
+ },
449
+ component: {
450
+ name: "Text",
451
+ options: {
452
+ text: "New tab"
453
+ }
454
+ }
455
+ }, U = {
456
+ "@type": "@builder.io/sdk:Element",
457
+ responsiveStyles: {
458
+ large: {
459
+ height: "200px",
460
+ display: "flex",
461
+ marginTop: "20px",
462
+ flexDirection: "column"
463
+ }
464
+ },
465
+ component: {
466
+ name: "Text",
467
+ options: {
468
+ text: "New tab content "
469
+ }
470
+ }
471
+ }, Le = {
472
+ name: "Builder: Tabs",
473
+ inputs: [{
474
+ name: "tabs",
475
+ type: "list",
476
+ broadcast: !0,
477
+ subFields: [{
478
+ name: "label",
479
+ type: "uiBlocks",
480
+ hideFromUI: !0,
481
+ defaultValue: [P]
482
+ }, {
483
+ name: "content",
484
+ type: "uiBlocks",
485
+ hideFromUI: !0,
486
+ defaultValue: [U]
487
+ }],
488
+ defaultValue: [{
489
+ label: [{
490
+ ...P,
491
+ component: {
492
+ name: "Text",
493
+ options: {
494
+ text: "Tab 1"
495
+ }
496
+ }
497
+ }],
498
+ content: [{
499
+ ...U,
500
+ component: {
501
+ name: "Text",
502
+ options: {
503
+ text: "Tab 1 content"
504
+ }
505
+ }
506
+ }]
507
+ }, {
508
+ label: [{
509
+ ...P,
510
+ component: {
511
+ name: "Text",
512
+ options: {
513
+ text: "Tab 2"
514
+ }
515
+ }
516
+ }],
517
+ content: [{
518
+ ...U,
519
+ component: {
520
+ name: "Text",
521
+ options: {
522
+ text: "Tab 2 content"
523
+ }
524
+ }
525
+ }]
526
+ }]
527
+ }, {
528
+ name: "activeTabStyle",
529
+ type: "uiStyle",
530
+ helperText: "CSS styles for the active tab",
531
+ defaultValue: {
532
+ backgroundColor: "rgba(0, 0, 0, 0.1)"
533
+ }
534
+ }, {
535
+ name: "defaultActiveTab",
536
+ type: "number",
537
+ helperText: 'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',
538
+ defaultValue: 1,
539
+ advanced: !0
540
+ }, {
541
+ name: "collapsible",
542
+ type: "boolean",
543
+ helperText: "If on, clicking an open tab closes it so no tabs are active",
544
+ defaultValue: !1,
545
+ advanced: !0
546
+ }, {
547
+ name: "tabHeaderLayout",
548
+ type: "enum",
549
+ helperText: "Change the layout of the tab headers (uses justify-content)",
550
+ defaultValue: "flex-start",
551
+ enum: [{
552
+ label: "Center",
553
+ value: "center"
554
+ }, {
555
+ label: "Space between",
556
+ value: "space-between"
557
+ }, {
558
+ label: "Space around",
559
+ value: "space-around"
560
+ }, {
561
+ label: "Left",
562
+ value: "flex-start"
563
+ }, {
564
+ label: "Right",
565
+ value: "flex-end"
566
+ }]
567
+ }]
568
+ }, $e = k(() => import("./tabs-f5fd67a5.js")), He = {
434
569
  name: "Text",
435
570
  static: !0,
436
571
  isRSC: !0,
@@ -448,7 +583,7 @@ const Ce = {
448
583
  height: "auto",
449
584
  textAlign: "center"
450
585
  }
451
- }, Ue = {
586
+ }, Ne = {
452
587
  name: "Custom Code",
453
588
  static: !0,
454
589
  requiredPermissions: ["editCode"],
@@ -470,7 +605,7 @@ const Ce = {
470
605
  helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
471
606
  advanced: !0
472
607
  }]
473
- }, $e = C(() => import("./custom-code-7786788e.js")), He = {
608
+ }, je = k(() => import("./custom-code-7786788e.js")), qe = {
474
609
  name: "Embed",
475
610
  static: !0,
476
611
  inputs: [{
@@ -495,7 +630,7 @@ const Ce = {
495
630
  defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
496
631
  hideFromUI: !0
497
632
  }]
498
- }, De = C(() => import("./embed-5c1bbe12.js")), Le = {
633
+ }, Be = k(() => import("./embed-5c1bbe12.js")), Ke = {
499
634
  name: "Form:Form",
500
635
  // editableTags: ['builder-form-error']
501
636
  defaults: {
@@ -726,7 +861,7 @@ const Ce = {
726
861
  }
727
862
  }
728
863
  }]
729
- }, qe = C(() => import("./form-8526db32.js")), Ne = {
864
+ }, _e = k(() => import("./form-1dbd32d7.js")), Me = {
730
865
  name: "Form:Input",
731
866
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
732
867
  inputs: [
@@ -777,7 +912,7 @@ const Ce = {
777
912
  borderStyle: "solid",
778
913
  borderColor: "#ccc"
779
914
  }
780
- }, je = C(() => import("./input-3f85283b.js")), Ke = {
915
+ }, Oe = k(() => import("./input-a7054c28.js")), ze = {
781
916
  name: "Form:Select",
782
917
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
783
918
  defaultStyles: {
@@ -819,7 +954,7 @@ const Ce = {
819
954
  }],
820
955
  static: !0,
821
956
  noWrap: !0
822
- }, Be = C(() => import("./select-4fe889b6.js")), _e = {
957
+ }, Je = k(() => import("./select-dd83a040.js")), Ye = {
823
958
  name: "Form:SubmitButton",
824
959
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
825
960
  defaultStyles: {
@@ -844,7 +979,7 @@ const Ce = {
844
979
  // that only shows if advanced setting is flipped
845
980
  // TODO: defaultChildren
846
981
  // canHaveChildren: true,
847
- }, Me = C(() => import("./submit-button-b48361a7.js")), Oe = {
982
+ }, Qe = k(() => import("./submit-button-b48361a7.js")), Ge = {
848
983
  // friendlyName?
849
984
  name: "Raw:Img",
850
985
  hideFromInsertMenu: !0,
@@ -858,7 +993,7 @@ const Ce = {
858
993
  }],
859
994
  noWrap: !0,
860
995
  static: !0
861
- }, ze = C(() => import("./img-5ef224a8.js")), Je = {
996
+ }, Xe = k(() => import("./img-d4b1130f.js")), Ze = {
862
997
  name: "Video",
863
998
  canHaveChildren: !0,
864
999
  defaultStyles: {
@@ -939,55 +1074,58 @@ const Ce = {
939
1074
  defaultValue: !0,
940
1075
  advanced: !0
941
1076
  }]
942
- }, Ye = () => [{
943
- component: $e,
944
- ...Ue
945
- }, {
946
- component: De,
947
- ...He
948
- }, {
949
- component: qe,
950
- ...Le
951
- }, {
1077
+ }, et = () => [{
952
1078
  component: je,
953
1079
  ...Ne
954
- }, {
955
- component: Me,
956
- ..._e
957
1080
  }, {
958
1081
  component: Be,
1082
+ ...qe
1083
+ }, {
1084
+ component: _e,
959
1085
  ...Ke
960
1086
  }, {
961
- component: ze,
962
- ...Oe
1087
+ component: Oe,
1088
+ ...Me
963
1089
  }, {
964
- component: pe,
965
- ...Je
966
- }], O = () => [{
967
- component: ge,
968
- ...Ce
1090
+ component: Qe,
1091
+ ...Ye
969
1092
  }, {
970
- component: fe,
971
- ...we
1093
+ component: Je,
1094
+ ...ze
972
1095
  }, {
973
- component: he,
974
- ...Ve
1096
+ component: Xe,
1097
+ ...Ge
975
1098
  }, {
1099
+ component: he,
1100
+ ...Ze
1101
+ }], Y = () => [{
976
1102
  component: be,
977
1103
  ...Re
978
1104
  }, {
979
1105
  component: ye,
980
1106
  ...Ee
981
1107
  }, {
982
- component: We,
1108
+ component: xe,
983
1109
  ...Fe
984
1110
  }, {
985
- component: xe,
1111
+ component: ve,
1112
+ ...We
1113
+ }, {
1114
+ component: Se,
986
1115
  ...Ae
987
1116
  }, {
988
- component: ve,
1117
+ component: Ue,
989
1118
  ...Pe
990
- }, ...Ye()], Qe = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1119
+ }, {
1120
+ component: Te,
1121
+ ...De
1122
+ }, {
1123
+ component: Ie,
1124
+ ...He
1125
+ }, {
1126
+ component: $e,
1127
+ ...Le
1128
+ }, ...et()], tt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
991
1129
  function getAndSetVariantId() {
992
1130
  function setCookie(name, value, days) {
993
1131
  let expires = '';
@@ -1043,7 +1181,7 @@ const Ce = {
1043
1181
  }).join('');
1044
1182
  styleEl.innerHTML = newStyleStr;
1045
1183
  }
1046
- }`, Ge = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1184
+ }`, nt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1047
1185
  if (!navigator.cookieEnabled) {
1048
1186
  return;
1049
1187
  }
@@ -1077,24 +1215,24 @@ const Ce = {
1077
1215
  thisScriptEl?.remove();
1078
1216
  }
1079
1217
  return;
1080
- }`, X = "builderIoAbTest", Z = "builderIoRenderContent", W = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1218
+ }`, te = "builderIoAbTest", ne = "builderIoRenderContent", W = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1081
1219
  ...t,
1082
1220
  testVariationId: t.id,
1083
1221
  id: e == null ? void 0 : e.id
1084
- })), Xe = ({
1222
+ })), at = ({
1085
1223
  canTrack: e,
1086
1224
  content: t
1087
- }) => !(!(W(t).length > 0) || !e || U()), Ze = (e) => e === "react" || e === "reactNative", ee = Ze(Q), et = () => `
1088
- window.${X} = ${Qe}
1089
- window.${Z} = ${Ge}
1090
- `, tt = (e, t) => `
1091
- window.${X}(
1092
- "${t}",${JSON.stringify(e)}, ${ee}
1093
- )`, nt = ({
1225
+ }) => !(!(W(t).length > 0) || !e || L()), it = (e) => e === "react" || e === "reactNative", ae = it(Z), ot = () => `
1226
+ window.${te} = ${tt}
1227
+ window.${ne} = ${nt}
1228
+ `, rt = (e, t) => `
1229
+ window.${te}(
1230
+ "${t}",${JSON.stringify(e)}, ${ae}
1231
+ )`, st = ({
1094
1232
  contentId: e,
1095
1233
  variationId: t
1096
- }) => `window.${Z}(
1097
- "${t}", "${e}", ${ee}
1234
+ }) => `window.${ne}(
1235
+ "${t}", "${e}", ${ae}
1098
1236
  )`;
1099
1237
  function $(e) {
1100
1238
  return /* @__PURE__ */ f(
@@ -1105,10 +1243,10 @@ function $(e) {
1105
1243
  }
1106
1244
  );
1107
1245
  }
1108
- function z(e) {
1246
+ function Q(e) {
1109
1247
  return Math.round(e * 1e3) / 1e3;
1110
1248
  }
1111
- const at = (e, t, n = !0) => {
1249
+ const lt = (e, t, n = !0) => {
1112
1250
  if (!(e instanceof HTMLElement))
1113
1251
  return null;
1114
1252
  let a = n ? e : e.parentElement;
@@ -1119,56 +1257,107 @@ const at = (e, t, n = !0) => {
1119
1257
  return a;
1120
1258
  } while (a = a.parentElement);
1121
1259
  return null;
1122
- }, it = (e) => at(e, (t) => {
1260
+ }, dt = (e) => lt(e, (t) => {
1123
1261
  const n = t.getAttribute("builder-id") || t.id;
1124
1262
  return (n == null ? void 0 : n.indexOf("builder-")) === 0;
1125
- }), J = ({
1263
+ }), G = ({
1126
1264
  event: e,
1127
1265
  target: t
1128
1266
  }) => {
1129
- const n = t.getBoundingClientRect(), a = e.clientX - n.left, d = e.clientY - n.top, p = z(a / n.width), i = z(d / n.height);
1267
+ const n = t.getBoundingClientRect(), a = e.clientX - n.left, d = e.clientY - n.top, u = Q(a / n.width), i = Q(d / n.height);
1130
1268
  return {
1131
- x: p,
1269
+ x: u,
1132
1270
  y: i
1133
1271
  };
1134
- }, ot = (e) => {
1135
- const t = e.target, n = t && it(t), a = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
1272
+ }, ct = (e) => {
1273
+ const t = e.target, n = t && dt(t), a = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
1136
1274
  return {
1137
1275
  targetBuilderElement: a || void 0,
1138
1276
  metadata: {
1139
- targetOffset: t ? J({
1277
+ targetOffset: t ? G({
1140
1278
  event: e,
1141
1279
  target: t
1142
1280
  }) : void 0,
1143
- builderTargetOffset: n ? J({
1281
+ builderTargetOffset: n ? G({
1144
1282
  event: e,
1145
1283
  target: n
1146
1284
  }) : void 0,
1147
1285
  builderElementIndex: n && a ? [].slice.call(document.getElementsByClassName(a)).indexOf(n) : void 0
1148
1286
  }
1149
1287
  };
1150
- };
1151
- function rt(e) {
1152
- var T, H, D, L, q, N, j;
1153
- const t = ne(null);
1288
+ }, ut = (e) => {
1289
+ var u, i;
1290
+ const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], a = (i = e.fileUrl) != null ? i : (u = e == null ? void 0 : e.files) == null ? void 0 : u.regular;
1291
+ let d = "";
1292
+ if (a && t && n && (d += `
1293
+ @font-face {
1294
+ font-family: "${t}";
1295
+ src: local("${n}"), url('${a}') format('woff2');
1296
+ font-display: fallback;
1297
+ font-weight: 400;
1298
+ }
1299
+ `.trim()), e.files)
1300
+ for (const o in e.files) {
1301
+ if (!(String(Number(o)) === o))
1302
+ continue;
1303
+ const h = e.files[o];
1304
+ h && h !== a && (d += `
1305
+ @font-face {
1306
+ font-family: "${t}";
1307
+ src: url('${h}') format('woff2');
1308
+ font-display: fallback;
1309
+ font-weight: ${o};
1310
+ }
1311
+ `.trim());
1312
+ }
1313
+ return d;
1314
+ }, mt = ({
1315
+ customFonts: e
1316
+ }) => {
1317
+ var t;
1318
+ return ((t = e == null ? void 0 : e.map((n) => ut(n))) == null ? void 0 : t.join(" ")) || "";
1319
+ }, pt = ({
1320
+ cssCode: e,
1321
+ contentId: t
1322
+ }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", gt = `
1323
+ .builder-button {
1324
+ all: unset;
1325
+ }
1326
+
1327
+ .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
1328
+ margin: 0;
1329
+ }
1330
+ .builder-text > p, .builder-text > .builder-paragraph {
1331
+ color: inherit;
1332
+ line-height: inherit;
1333
+ letter-spacing: inherit;
1334
+ font-weight: inherit;
1335
+ font-size: inherit;
1336
+ text-align: inherit;
1337
+ font-family: inherit;
1338
+ }
1339
+ `, ft = (e) => e ? "" : gt, ht = (e) => `variant-${e}`;
1340
+ function bt(e) {
1341
+ var H, N, j, q, B, K, _;
1342
+ const t = oe(null);
1154
1343
  function n(r) {
1155
- var m, l;
1344
+ var p, l;
1156
1345
  const c = {
1157
1346
  ...e.builderContextSignal.rootState,
1158
1347
  ...r
1159
1348
  };
1160
- e.builderContextSignal.rootSetState ? (l = (m = e.builderContextSignal).rootSetState) == null || l.call(m, c) : e.setBuilderContextSignal((s) => ({
1349
+ e.builderContextSignal.rootSetState ? (l = (p = e.builderContextSignal).rootSetState) == null || l.call(p, c) : e.setBuilderContextSignal((s) => ({
1161
1350
  ...s,
1162
1351
  rootState: c
1163
1352
  }));
1164
1353
  }
1165
1354
  function a(r) {
1166
- var m, l, s, g, V;
1355
+ var p, l, s, g, V;
1167
1356
  const c = {
1168
1357
  ...e.builderContextSignal.content,
1169
1358
  ...r,
1170
1359
  data: {
1171
- ...(m = e.builderContextSignal.content) == null ? void 0 : m.data,
1360
+ ...(p = e.builderContextSignal.content) == null ? void 0 : p.data,
1172
1361
  ...r == null ? void 0 : r.data
1173
1362
  },
1174
1363
  meta: {
@@ -1177,30 +1366,36 @@ function rt(e) {
1177
1366
  breakpoints: ((s = r == null ? void 0 : r.meta) == null ? void 0 : s.breakpoints) || ((V = (g = e.builderContextSignal.content) == null ? void 0 : g.meta) == null ? void 0 : V.breakpoints)
1178
1367
  }
1179
1368
  };
1180
- e.setBuilderContextSignal((x) => ({
1181
- ...x,
1369
+ e.setBuilderContextSignal((b) => ({
1370
+ ...b,
1182
1371
  content: c
1183
1372
  }));
1184
1373
  }
1185
- const [d, p] = I(
1374
+ function d() {
1375
+ return e.showContent ? {} : {
1376
+ hidden: !0,
1377
+ "aria-hidden": !0
1378
+ };
1379
+ }
1380
+ const [u, i] = I(
1186
1381
  () => e.contentWrapper || "div"
1187
1382
  );
1188
- function i(r) {
1189
- return de({
1383
+ function o(r) {
1384
+ return me({
1190
1385
  model: e.model,
1191
1386
  trustedHosts: e.trustedHosts,
1192
1387
  callbacks: {
1193
1388
  configureSdk: (c) => {
1194
1389
  var s;
1195
- const { breakpoints: m, contentId: l } = c;
1196
- !l || l !== ((s = e.builderContextSignal.content) == null ? void 0 : s.id) || m && a({
1390
+ const { breakpoints: p, contentId: l } = c;
1391
+ !l || l !== ((s = e.builderContextSignal.content) == null ? void 0 : s.id) || p && a({
1197
1392
  meta: {
1198
- breakpoints: m
1393
+ breakpoints: p
1199
1394
  }
1200
1395
  });
1201
1396
  },
1202
1397
  animation: (c) => {
1203
- Ie(c);
1398
+ Ce(c);
1204
1399
  },
1205
1400
  contentUpdate: (c) => {
1206
1401
  a(c);
@@ -1208,10 +1403,10 @@ function rt(e) {
1208
1403
  }
1209
1404
  })(r);
1210
1405
  }
1211
- function o() {
1212
- var c, m;
1213
- const r = (m = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : m.jsCode;
1214
- r && M({
1406
+ function m() {
1407
+ var c, p;
1408
+ const r = (p = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : p.jsCode;
1409
+ r && J({
1215
1410
  code: r,
1216
1411
  context: e.context || {},
1217
1412
  localState: void 0,
@@ -1223,35 +1418,35 @@ function rt(e) {
1223
1418
  enableCache: !1
1224
1419
  });
1225
1420
  }
1226
- const [u, v] = I(() => ({})), [b, w] = I(() => ({})), [k, R] = I(() => !1);
1227
- function E(r) {
1228
- var c, m;
1421
+ const [h, C] = I(() => ({})), [T, w] = I(() => ({})), [R, E] = I(() => !1);
1422
+ function y(r) {
1423
+ var c, p;
1229
1424
  if (e.builderContextSignal.content) {
1230
- const l = (c = e.builderContextSignal.content) == null ? void 0 : c.testVariationId, s = (m = e.builderContextSignal.content) == null ? void 0 : m.id;
1231
- B({
1425
+ const l = (c = e.builderContextSignal.content) == null ? void 0 : c.testVariationId, s = (p = e.builderContextSignal.content) == null ? void 0 : p.id;
1426
+ O({
1232
1427
  type: "click",
1233
1428
  canTrack: A(e.canTrack),
1234
1429
  contentId: s,
1235
1430
  apiKey: e.apiKey,
1236
1431
  variationId: l !== s ? l : void 0,
1237
- ...ot(r),
1238
- unique: !k
1432
+ ...ct(r),
1433
+ unique: !R
1239
1434
  });
1240
1435
  }
1241
- k || R(!0);
1436
+ R || E(!0);
1242
1437
  }
1243
- function y() {
1244
- var c, m, l;
1245
- const r = (l = (m = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : m.httpRequests) != null ? l : {};
1438
+ function x() {
1439
+ var c, p, l;
1440
+ const r = (l = (p = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : p.httpRequests) != null ? l : {};
1246
1441
  Object.entries(r).forEach(([s, g]) => {
1247
- if (!g || b[s] || u[s] && !F())
1442
+ if (!g || T[s] || h[s] && !F())
1248
1443
  return;
1249
- b[s] = !0;
1444
+ T[s] = !0;
1250
1445
  const V = g.replace(
1251
1446
  /{{([^}]+)}}/g,
1252
- (x, te) => String(
1253
- M({
1254
- code: te,
1447
+ (b, ie) => String(
1448
+ J({
1449
+ code: ie,
1255
1450
  context: e.context || {},
1256
1451
  localState: void 0,
1257
1452
  rootState: e.builderContextSignal.rootState,
@@ -1260,24 +1455,24 @@ function rt(e) {
1260
1455
  })
1261
1456
  )
1262
1457
  );
1263
- ce(V).then((x) => x.json()).then((x) => {
1458
+ pe(V).then((b) => b.json()).then((b) => {
1264
1459
  n({
1265
- [s]: x
1266
- }), u[s] = !0;
1267
- }).catch((x) => {
1268
- console.error("error fetching dynamic data", g, x);
1460
+ [s]: b
1461
+ }), h[s] = !0;
1462
+ }).catch((b) => {
1463
+ console.error("error fetching dynamic data", g, b);
1269
1464
  }).finally(() => {
1270
- b[s] = !1;
1465
+ T[s] = !1;
1271
1466
  });
1272
1467
  });
1273
1468
  }
1274
- function h() {
1469
+ function v() {
1275
1470
  F() && window.dispatchEvent(
1276
1471
  new CustomEvent(
1277
1472
  "builder:component:stateChange",
1278
1473
  {
1279
1474
  detail: {
1280
- state: ue(e.builderContextSignal.rootState),
1475
+ state: ge(e.builderContextSignal.rootState),
1281
1476
  ref: {
1282
1477
  name: e.model
1283
1478
  }
@@ -1288,8 +1483,8 @@ function rt(e) {
1288
1483
  }
1289
1484
  return S(() => {
1290
1485
  var r, c;
1291
- if (U()) {
1292
- if (F() && (window.addEventListener("message", i), ae(), ie({
1486
+ if (L()) {
1487
+ if (F() && (window.addEventListener("message", o), re(), se({
1293
1488
  ...e.locale ? {
1294
1489
  locale: e.locale
1295
1490
  } : {},
@@ -1303,14 +1498,14 @@ function rt(e) {
1303
1498
  e.builderContextSignal.componentInfos
1304
1499
  ).forEach((l) => {
1305
1500
  var g;
1306
- const s = oe(l);
1501
+ const s = le(l);
1307
1502
  (g = window.parent) == null || g.postMessage(s, "*");
1308
1503
  }), window.addEventListener(
1309
1504
  "builder:component:stateChangeListenerActivated",
1310
- h
1505
+ v
1311
1506
  )), e.builderContextSignal.content && A(e.canTrack)) {
1312
1507
  const l = (r = e.builderContextSignal.content) == null ? void 0 : r.testVariationId, s = (c = e.builderContextSignal.content) == null ? void 0 : c.id, g = e.apiKey;
1313
- B({
1508
+ O({
1314
1509
  type: "impression",
1315
1510
  canTrack: !0,
1316
1511
  contentId: s,
@@ -1318,31 +1513,31 @@ function rt(e) {
1318
1513
  variationId: l !== s ? l : void 0
1319
1514
  });
1320
1515
  }
1321
- if (re() && !F()) {
1516
+ if (de() && !F()) {
1322
1517
  const l = new URL(location.href).searchParams, s = l.get("builder.preview"), g = l.get(
1323
1518
  `builder.preview.${s}`
1324
1519
  ), V = l.get("apiKey") || l.get("builder.space");
1325
- s === e.model && V === e.apiKey && (!e.content || g === e.content.id) && se({
1520
+ s === e.model && V === e.apiKey && (!e.content || g === e.content.id) && ce({
1326
1521
  model: e.model,
1327
1522
  apiKey: e.apiKey,
1328
1523
  apiVersion: e.builderContextSignal.apiVersion
1329
- }).then((x) => {
1330
- x && a(x);
1524
+ }).then((b) => {
1525
+ b && a(b);
1331
1526
  });
1332
1527
  }
1333
1528
  }
1334
1529
  }, []), S(() => {
1335
- e.apiKey || le.error(
1530
+ e.apiKey || ue.error(
1336
1531
  "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
1337
- ), o(), y(), h();
1532
+ ), m(), x(), v();
1338
1533
  }, []), S(() => {
1339
1534
  e.content && a(e.content);
1340
1535
  }, [e.content]), S(() => {
1341
- o();
1342
- }, [(H = (T = e.builderContextSignal.content) == null ? void 0 : T.data) == null ? void 0 : H.jsCode]), S(() => {
1343
- y();
1344
- }, [(L = (D = e.builderContextSignal.content) == null ? void 0 : D.data) == null ? void 0 : L.httpRequests]), S(() => {
1345
- h();
1536
+ m();
1537
+ }, [(N = (H = e.builderContextSignal.content) == null ? void 0 : H.data) == null ? void 0 : N.jsCode]), S(() => {
1538
+ x();
1539
+ }, [(q = (j = e.builderContextSignal.content) == null ? void 0 : j.data) == null ? void 0 : q.httpRequests]), S(() => {
1540
+ v();
1346
1541
  }, [e.builderContextSignal.rootState]), S(() => {
1347
1542
  e.data && n(e.data);
1348
1543
  }, [e.data]), S(() => {
@@ -1350,103 +1545,50 @@ function rt(e) {
1350
1545
  locale: e.locale
1351
1546
  });
1352
1547
  }, [e.locale]), S(() => () => {
1353
- U() && (window.removeEventListener("message", i), window.removeEventListener(
1548
+ L() && (window.removeEventListener("message", o), window.removeEventListener(
1354
1549
  "builder:component:stateChangeListenerActivated",
1355
- h
1550
+ v
1356
1551
  ));
1357
- }, []), /* @__PURE__ */ f(Se.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ f(
1358
- d,
1552
+ }, []), /* @__PURE__ */ f(ke.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ f(
1553
+ u,
1359
1554
  {
1360
1555
  ref: t,
1361
- onClick: (r) => E(r),
1362
- "builder-content-id": (q = e.builderContextSignal.content) == null ? void 0 : q.id,
1556
+ onClick: (r) => y(r),
1557
+ "builder-content-id": (B = e.builderContextSignal.content) == null ? void 0 : B.id,
1363
1558
  "builder-model": e.model,
1364
- ...e.showContent ? {} : {
1365
- hidden: !0,
1366
- "aria-hidden": !0
1367
- },
1559
+ ...d(),
1368
1560
  ...e.contentWrapperProps,
1369
- className: `variant-${((N = e.content) == null ? void 0 : N.testVariationId) || ((j = e.content) == null ? void 0 : j.id)}`,
1561
+ className: ht(
1562
+ ((K = e.content) == null ? void 0 : K.testVariationId) || ((_ = e.content) == null ? void 0 : _.id)
1563
+ ),
1370
1564
  children: e.children
1371
1565
  }
1372
1566
  ) : null });
1373
1567
  }
1374
- const st = (e) => {
1375
- var p, i;
1376
- const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], a = (i = e.fileUrl) != null ? i : (p = e == null ? void 0 : e.files) == null ? void 0 : p.regular;
1377
- let d = "";
1378
- if (a && t && n && (d += `
1379
- @font-face {
1380
- font-family: "${t}";
1381
- src: local("${n}"), url('${a}') format('woff2');
1382
- font-display: fallback;
1383
- font-weight: 400;
1384
- }
1385
- `.trim()), e.files)
1386
- for (const o in e.files) {
1387
- if (!(String(Number(o)) === o))
1388
- continue;
1389
- const v = e.files[o];
1390
- v && v !== a && (d += `
1391
- @font-face {
1392
- font-family: "${t}";
1393
- src: url('${v}') format('woff2');
1394
- font-display: fallback;
1395
- font-weight: ${o};
1396
- }
1397
- `.trim());
1398
- }
1399
- return d;
1400
- }, lt = ({
1401
- customFonts: e
1402
- }) => {
1403
- var t;
1404
- return ((t = e == null ? void 0 : e.map((n) => st(n))) == null ? void 0 : t.join(" ")) || "";
1405
- }, dt = ({
1406
- cssCode: e,
1407
- contentId: t
1408
- }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", ct = `
1409
- .builder-button {
1410
- all: unset;
1411
- }
1412
-
1413
- .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
1414
- margin: 0;
1415
- }
1416
- .builder-text > p, .builder-text > .builder-paragraph {
1417
- color: inherit;
1418
- line-height: inherit;
1419
- letter-spacing: inherit;
1420
- font-weight: inherit;
1421
- font-size: inherit;
1422
- text-align: inherit;
1423
- font-family: inherit;
1424
- }
1425
- `, ut = (e) => e ? "" : ct;
1426
- function mt(e) {
1568
+ function yt(e) {
1427
1569
  const [t, n] = I(
1428
1570
  () => `
1429
- ${dt({
1571
+ ${pt({
1430
1572
  cssCode: e.cssCode,
1431
1573
  contentId: e.contentId
1432
1574
  })}
1433
- ${lt({
1575
+ ${mt({
1434
1576
  customFonts: e.customFonts
1435
1577
  })}
1436
- ${ut(e.isNestedRender)}
1578
+ ${ft(e.isNestedRender)}
1437
1579
  `.trim()
1438
1580
  );
1439
- return /* @__PURE__ */ f(G, { id: "builderio-content", styles: t });
1581
+ return /* @__PURE__ */ f(ee, { id: "builderio-content", styles: t });
1440
1582
  }
1441
- const pt = ({
1583
+ const xt = ({
1442
1584
  content: e,
1443
1585
  data: t,
1444
1586
  locale: n
1445
1587
  }) => {
1446
- var p, i, o;
1447
- const a = {}, d = ((p = e == null ? void 0 : e.data) == null ? void 0 : p.state) || {};
1448
- return (o = (i = e == null ? void 0 : e.data) == null ? void 0 : i.inputs) == null || o.forEach((u) => {
1449
- u.name && u.defaultValue !== void 0 && (a[u.name] = u.defaultValue);
1588
+ var u, i, o;
1589
+ const a = {}, d = ((u = e == null ? void 0 : e.data) == null ? void 0 : u.state) || {};
1590
+ return (o = (i = e == null ? void 0 : e.data) == null ? void 0 : i.inputs) == null || o.forEach((m) => {
1591
+ m.name && m.defaultValue !== void 0 && (a[m.name] = m.defaultValue);
1450
1592
  }), {
1451
1593
  ...a,
1452
1594
  ...d,
@@ -1455,7 +1597,7 @@ const pt = ({
1455
1597
  locale: n
1456
1598
  } : {}
1457
1599
  };
1458
- }, gt = ({
1600
+ }, vt = ({
1459
1601
  content: e,
1460
1602
  data: t
1461
1603
  }) => e ? {
@@ -1466,46 +1608,46 @@ const pt = ({
1466
1608
  },
1467
1609
  meta: e == null ? void 0 : e.meta
1468
1610
  } : void 0;
1469
- function Y(e) {
1470
- var u, v, b, w, k, R, E;
1611
+ function X(e) {
1612
+ var m, h, C, T, w, R, E;
1471
1613
  const [t, n] = I(
1472
1614
  () => {
1473
- var y, h;
1474
- return nt({
1615
+ var y, x;
1616
+ return st({
1475
1617
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
1476
1618
  variationId: (y = e.content) == null ? void 0 : y.testVariationId,
1477
1619
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
1478
- contentId: (h = e.content) == null ? void 0 : h.id
1620
+ contentId: (x = e.content) == null ? void 0 : x.id
1479
1621
  });
1480
1622
  }
1481
1623
  );
1482
1624
  function a(y) {
1483
- o((h) => ({
1484
- ...h,
1625
+ o((x) => ({
1626
+ ...x,
1485
1627
  rootState: y
1486
1628
  }));
1487
1629
  }
1488
- const [d, p] = I(
1630
+ const [d, u] = I(
1489
1631
  () => [
1490
- ...O(),
1632
+ ...Y(),
1491
1633
  ...e.customComponents || []
1492
1634
  ].reduce(
1493
- (y, { component: h, ...T }) => ({
1635
+ (y, { component: x, ...v }) => ({
1494
1636
  ...y,
1495
- [T.name]: {
1496
- component: h,
1497
- ..._(T)
1637
+ [v.name]: {
1638
+ component: x,
1639
+ ...z(v)
1498
1640
  }
1499
1641
  }),
1500
1642
  {}
1501
1643
  )
1502
1644
  ), [i, o] = I(() => ({
1503
- content: gt({
1645
+ content: vt({
1504
1646
  content: e.content,
1505
1647
  data: e.data
1506
1648
  }),
1507
1649
  localState: void 0,
1508
- rootState: pt({
1650
+ rootState: xt({
1509
1651
  content: e.content,
1510
1652
  data: e.data,
1511
1653
  locale: e.locale
@@ -1515,12 +1657,12 @@ function Y(e) {
1515
1657
  apiKey: e.apiKey,
1516
1658
  apiVersion: e.apiVersion,
1517
1659
  componentInfos: [
1518
- ...O(),
1660
+ ...Y(),
1519
1661
  ...e.customComponents || []
1520
1662
  ].reduce(
1521
- (y, { component: h, ...T }) => ({
1663
+ (y, { component: x, ...v }) => ({
1522
1664
  ...y,
1523
- [T.name]: _(T)
1665
+ [v.name]: z(v)
1524
1666
  }),
1525
1667
  {}
1526
1668
  ),
@@ -1529,13 +1671,13 @@ function Y(e) {
1529
1671
  BlocksWrapperProps: e.blocksWrapperProps || {}
1530
1672
  }));
1531
1673
  return /* @__PURE__ */ f(
1532
- ke.Provider,
1674
+ we.Provider,
1533
1675
  {
1534
1676
  value: {
1535
1677
  registeredComponents: d
1536
1678
  },
1537
- children: /* @__PURE__ */ P(
1538
- rt,
1679
+ children: /* @__PURE__ */ D(
1680
+ bt,
1539
1681
  {
1540
1682
  content: e.content,
1541
1683
  data: e.data,
@@ -1561,16 +1703,16 @@ function Y(e) {
1561
1703
  }
1562
1704
  ) : null,
1563
1705
  /* @__PURE__ */ f(
1564
- mt,
1706
+ yt,
1565
1707
  {
1566
1708
  isNestedRender: e.isNestedRender,
1567
- contentId: (u = i.content) == null ? void 0 : u.id,
1568
- cssCode: (b = (v = i.content) == null ? void 0 : v.data) == null ? void 0 : b.cssCode,
1569
- customFonts: (k = (w = i.content) == null ? void 0 : w.data) == null ? void 0 : k.customFonts
1709
+ contentId: (m = i.content) == null ? void 0 : m.id,
1710
+ cssCode: (C = (h = i.content) == null ? void 0 : h.data) == null ? void 0 : C.cssCode,
1711
+ customFonts: (w = (T = i.content) == null ? void 0 : T.data) == null ? void 0 : w.customFonts
1570
1712
  }
1571
1713
  ),
1572
1714
  /* @__PURE__ */ f(
1573
- Te,
1715
+ Ve,
1574
1716
  {
1575
1717
  blocks: (E = (R = i.content) == null ? void 0 : R.data) == null ? void 0 : E.blocks,
1576
1718
  context: i,
@@ -1584,20 +1726,20 @@ function Y(e) {
1584
1726
  }
1585
1727
  );
1586
1728
  }
1587
- function It(e) {
1729
+ function Rt(e) {
1588
1730
  var i;
1589
1731
  const [t, n] = I(
1590
- () => Xe({
1732
+ () => at({
1591
1733
  canTrack: A(e.canTrack),
1592
1734
  content: e.content
1593
1735
  })
1594
1736
  );
1595
1737
  function a() {
1596
1738
  var o;
1597
- return tt(
1598
- W(e.content).map((u) => ({
1599
- id: u.testVariationId,
1600
- testRatio: u.testRatio
1739
+ return rt(
1740
+ W(e.content).map((m) => ({
1741
+ id: m.testVariationId,
1742
+ testRatio: m.testRatio
1601
1743
  })),
1602
1744
  ((o = e.content) == null ? void 0 : o.id) || ""
1603
1745
  );
@@ -1605,28 +1747,28 @@ function It(e) {
1605
1747
  function d() {
1606
1748
  return W(e.content).map((o) => `.variant-${o.testVariationId} { display: none; } `).join("");
1607
1749
  }
1608
- function p() {
1750
+ function u() {
1609
1751
  var o;
1610
1752
  return t ? {
1611
1753
  ...e.content,
1612
1754
  testVariationId: (o = e.content) == null ? void 0 : o.id
1613
- } : me({
1755
+ } : fe({
1614
1756
  item: e.content,
1615
1757
  canTrack: A(e.canTrack)
1616
1758
  });
1617
1759
  }
1618
1760
  return S(() => {
1619
- }, []), /* @__PURE__ */ P(K, { children: [
1620
- !e.isNestedRender && Q !== "reactNative" ? /* @__PURE__ */ f(
1761
+ }, []), /* @__PURE__ */ D(M, { children: [
1762
+ !e.isNestedRender && Z !== "reactNative" ? /* @__PURE__ */ f(
1621
1763
  $,
1622
1764
  {
1623
1765
  id: "builderio-init-variants-fns",
1624
- scriptStr: et()
1766
+ scriptStr: ot()
1625
1767
  }
1626
1768
  ) : null,
1627
- t ? /* @__PURE__ */ P(K, { children: [
1769
+ t ? /* @__PURE__ */ D(M, { children: [
1628
1770
  /* @__PURE__ */ f(
1629
- G,
1771
+ ee,
1630
1772
  {
1631
1773
  id: "builderio-variants",
1632
1774
  styles: d()
@@ -1640,7 +1782,7 @@ function It(e) {
1640
1782
  }
1641
1783
  ),
1642
1784
  (i = W(e.content)) == null ? void 0 : i.map((o) => /* @__PURE__ */ f(
1643
- Y,
1785
+ X,
1644
1786
  {
1645
1787
  isNestedRender: e.isNestedRender,
1646
1788
  content: o,
@@ -1666,10 +1808,10 @@ function It(e) {
1666
1808
  ))
1667
1809
  ] }) : null,
1668
1810
  /* @__PURE__ */ f(
1669
- Y,
1811
+ X,
1670
1812
  {
1671
1813
  isNestedRender: e.isNestedRender,
1672
- content: p(),
1814
+ content: u(),
1673
1815
  showContent: !0,
1674
1816
  model: e.model,
1675
1817
  data: e.data,
@@ -1692,5 +1834,5 @@ function It(e) {
1692
1834
  ] });
1693
1835
  }
1694
1836
  export {
1695
- It as default
1837
+ Rt as default
1696
1838
  };