@builder.io/sdk-react 2.0.15 → 2.0.19
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 +21 -21
- package/lib/browser/blocks-exports.mjs +258 -242
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-b4e02b7f.js → server-entry-12189812.js} +1 -2
- package/lib/browser/{server-entry-6758904f.cjs → server-entry-c8020f19.cjs} +2 -2
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-cc5e4262.js → accordion-634b0466.js} +1 -1
- package/lib/edge/{accordion-9d6ead4a.cjs → accordion-eaf2e50a.cjs} +1 -1
- package/lib/edge/{blocks-28f8515f.js → blocks-51761337.js} +91 -78
- package/lib/edge/blocks-b8c9a72a.cjs +12 -0
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-5b479c4f.js → button-6d2144c3.js} +2 -2
- package/lib/edge/{button-d5d5a523.cjs → button-a0aad19e.cjs} +1 -1
- package/lib/edge/{columns-80468479.js → columns-030a6892.js} +4 -4
- package/lib/edge/{columns-52de76ba.cjs → columns-44d76a14.cjs} +1 -1
- package/lib/edge/{content-variants-ab7b16da.cjs → content-variants-3eef022e.cjs} +1 -1
- package/lib/edge/{content-variants-4a3c14d6.js → content-variants-46a433c2.js} +11 -11
- package/lib/edge/{evaluate-b34c0621.cjs → evaluate-29260bf8.cjs} +7 -7
- package/lib/edge/{evaluate-9643776e.js → evaluate-6febb3ef.js} +65 -60
- package/lib/edge/{form-2490bc65.cjs → form-59059e97.cjs} +1 -1
- package/lib/edge/{form-8614781e.js → form-855a28fc.js} +4 -4
- package/lib/edge/{get-class-prop-name-3fcaaa4e.cjs → get-class-prop-name-6320e936.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-982b0eeb.js → get-class-prop-name-a6353748.js} +1 -1
- package/lib/edge/{img-5481830d.cjs → img-1f88586f.cjs} +1 -1
- package/lib/edge/{img-2750ffb8.js → img-56b4a196.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-4018ed38.cjs → input-35f6fbdd.cjs} +1 -1
- package/lib/edge/{input-a53f13e5.js → input-7873f170.js} +1 -1
- package/lib/edge/{select-a9ba7290.js → select-eb16d7cc.js} +1 -1
- package/lib/edge/{select-b5257730.cjs → select-f03c5ba6.cjs} +1 -1
- package/lib/edge/{server-entry-425ab225.js → server-entry-77a5a1a0.js} +1 -2
- package/lib/edge/{server-entry-c0a129cd.cjs → server-entry-dbe27fb2.cjs} +2 -2
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-7c52b924.cjs → slot-93865012.cjs} +1 -1
- package/lib/edge/{slot-2806840c.js → slot-c9a7a451.js} +4 -4
- package/lib/edge/{symbol-f4a3bd00.js → symbol-6657c638.js} +2 -2
- package/lib/edge/{symbol-2a759e66.cjs → symbol-b6b36212.cjs} +1 -1
- package/lib/edge/{tabs-238833b0.cjs → tabs-020fedaa.cjs} +1 -1
- package/lib/edge/{tabs-1e5bb78c.js → tabs-44484f49.js} +4 -4
- package/lib/edge/{text-95df08ad.cjs → text-562c8568.cjs} +1 -1
- package/lib/edge/{text-4492d4a7.js → text-e00e3cdc.js} +2 -2
- package/lib/node/blocks-exports.cjs +22 -22
- package/lib/node/blocks-exports.mjs +236 -232
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +2 -2
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +12 -8
- package/lib/node/{server-entry-6758904f.cjs → server-entry-82ab17f2.cjs} +1 -1
- package/lib/node/{server-entry-b4e02b7f.js → server-entry-902ea0c4.js} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{node-runtime-e5a24b2b.js → should-force-browser-runtime-in-node-0b0cefdf.js} +51 -37
- package/lib/node/should-force-browser-runtime-in-node-f20178fa.cjs +48 -0
- package/package.json +1 -1
- package/types/components/awaiter.d.ts +14 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/context/component-reference-types.d.ts +4 -0
- package/types/context/types.d.ts +2 -1
- package/types/functions/evaluate/should-force-browser-runtime-in-node.d.ts +3 -1
- package/lib/browser/init.cjs +0 -8
- package/lib/browser/init.mjs +0 -59
- package/lib/edge/blocks-f9516def.cjs +0 -12
- package/lib/edge/init.cjs +0 -8
- package/lib/edge/init.mjs +0 -59
- package/lib/node/node-runtime-9a8c1fa3.cjs +0 -48
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
var _e = Object.defineProperty;
|
|
3
3
|
var ze = (e, t, n) => t in e ? _e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
4
|
var ne = (e, t, n) => (ze(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
5
|
-
import { jsx as l, Fragment as
|
|
6
|
-
import { TARGET as U, isEditing as $, isBrowser as H, getUserAttributes as Je, checkIsDefined as Q, logger as Z, isPreviewing as Re, registerInsertMenu as Ye, setupBrowserForEditing as Ge, createRegisterComponentMessage as Qe, getDefaultCanTrack as X, _track as he, fetchOneEntry as Ee, createEditorListener as Xe, fetch as Ze, serializeIncludingFunctions as ge, handleABTestingSync as et } from "./server-entry-
|
|
5
|
+
import { jsx as l, Fragment as I, jsxs as V } from "react/jsx-runtime";
|
|
6
|
+
import { TARGET as U, isEditing as $, isBrowser as H, getUserAttributes as Je, checkIsDefined as Q, logger as Z, isPreviewing as Re, registerInsertMenu as Ye, setupBrowserForEditing as Ge, createRegisterComponentMessage as Qe, getDefaultCanTrack as X, _track as he, fetchOneEntry as Ee, createEditorListener as Xe, fetch as Ze, serializeIncludingFunctions as ge, handleABTestingSync as et } from "./server-entry-12189812.js";
|
|
7
7
|
import { createContext as Be, useState as T, useEffect as P, useRef as z, useContext as be, createElement as Pe } from "react";
|
|
8
8
|
const tt = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), nt = (e) => typeof e == "string" && tt.has(e.toLowerCase());
|
|
9
9
|
function de(e) {
|
|
10
|
-
return /* @__PURE__ */ l(
|
|
10
|
+
return /* @__PURE__ */ l(I, { children: nt(e.TagName) ? /* @__PURE__ */ l(I, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ l(I, { children: typeof e.TagName == "string" ? /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
|
|
11
11
|
}
|
|
12
12
|
const _ = () => {
|
|
13
13
|
switch (U) {
|
|
@@ -144,13 +144,17 @@ function ct() {
|
|
|
144
144
|
var e;
|
|
145
145
|
return typeof process != "undefined" && Q((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
146
146
|
}
|
|
147
|
-
const dt = (
|
|
148
|
-
|
|
147
|
+
const dt = ({
|
|
148
|
+
shouldLogWarning: e
|
|
149
|
+
}) => {
|
|
150
|
+
var o;
|
|
149
151
|
if (!ct())
|
|
150
152
|
return !1;
|
|
151
|
-
const
|
|
152
|
-
return
|
|
153
|
-
}, ut = (e) => (H() || dt(
|
|
153
|
+
const t = process.arch === "arm64", n = process.version.startsWith("v20"), i = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
|
|
154
|
+
return t && n && !i ? (e && Z.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
|
|
155
|
+
}, ut = (e) => (H() || dt({
|
|
156
|
+
shouldLogWarning: !0
|
|
157
|
+
}), pe(e)), mt = !0, L = class L {
|
|
154
158
|
static getCacheKey(t) {
|
|
155
159
|
return JSON.stringify({
|
|
156
160
|
...t,
|
|
@@ -212,7 +216,7 @@ function K({
|
|
|
212
216
|
return;
|
|
213
217
|
}
|
|
214
218
|
}
|
|
215
|
-
const me = (e) => JSON.parse(JSON.stringify(e)),
|
|
219
|
+
const me = (e) => JSON.parse(JSON.stringify(e)), We = (e, t, n) => {
|
|
216
220
|
if (Object(e) !== e)
|
|
217
221
|
return e;
|
|
218
222
|
const i = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
@@ -275,7 +279,7 @@ const ft = ["svelte", "vue", "angular", "qwik", "solid"].includes(U), ht = (e) =
|
|
|
275
279
|
context: t,
|
|
276
280
|
enableCache: !0
|
|
277
281
|
});
|
|
278
|
-
|
|
282
|
+
We(a, r, d);
|
|
279
283
|
}
|
|
280
284
|
return a;
|
|
281
285
|
};
|
|
@@ -330,7 +334,7 @@ function yt(e) {
|
|
|
330
334
|
break;
|
|
331
335
|
}
|
|
332
336
|
}
|
|
333
|
-
function
|
|
337
|
+
function Ne(e) {
|
|
334
338
|
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
335
339
|
}
|
|
336
340
|
function Fe(e, t) {
|
|
@@ -349,7 +353,7 @@ function xt(e) {
|
|
|
349
353
|
function $e(e) {
|
|
350
354
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
351
355
|
if (!t.length) {
|
|
352
|
-
|
|
356
|
+
Ne(e.elementId || e.id || "");
|
|
353
357
|
return;
|
|
354
358
|
}
|
|
355
359
|
Array.from(t).forEach((n) => {
|
|
@@ -363,7 +367,7 @@ function $e(e) {
|
|
|
363
367
|
function vt(e) {
|
|
364
368
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
365
369
|
if (!t.length) {
|
|
366
|
-
|
|
370
|
+
Ne(e.elementId || e.id || "");
|
|
367
371
|
return;
|
|
368
372
|
}
|
|
369
373
|
Array.from(t).forEach((n) => {
|
|
@@ -565,7 +569,7 @@ function Pt(e) {
|
|
|
565
569
|
return Q(i.hide) ? !i.hide : Q(i.show) ? i.show : !0;
|
|
566
570
|
}
|
|
567
571
|
function n() {
|
|
568
|
-
var f,
|
|
572
|
+
var f, R, B;
|
|
569
573
|
const i = e.block, o = i.responsiveStyles, a = e.context.content, r = Ue(
|
|
570
574
|
((f = a == null ? void 0 : a.meta) == null ? void 0 : f.breakpoints) || {}
|
|
571
575
|
), s = o == null ? void 0 : o.large, d = o == null ? void 0 : o.medium, c = o == null ? void 0 : o.small, u = i.id;
|
|
@@ -591,7 +595,7 @@ function Pt(e) {
|
|
|
591
595
|
}) : "", h = i.animations && i.animations.find((A) => A.trigger === "hover");
|
|
592
596
|
let p = "";
|
|
593
597
|
if (h) {
|
|
594
|
-
const A = ((B = (
|
|
598
|
+
const A = ((B = (R = h.steps) == null ? void 0 : R[1]) == null ? void 0 : B.styles) || {};
|
|
595
599
|
p = Y({
|
|
596
600
|
className: `${u}:hover`,
|
|
597
601
|
styles: {
|
|
@@ -610,7 +614,7 @@ function Pt(e) {
|
|
|
610
614
|
p
|
|
611
615
|
].join(" ");
|
|
612
616
|
}
|
|
613
|
-
return /* @__PURE__ */ l(
|
|
617
|
+
return /* @__PURE__ */ l(I, { children: n() && t() ? /* @__PURE__ */ l(I, { children: /* @__PURE__ */ l(
|
|
614
618
|
te,
|
|
615
619
|
{
|
|
616
620
|
id: "builderio-block",
|
|
@@ -622,7 +626,7 @@ function Pt(e) {
|
|
|
622
626
|
function Vt(e) {
|
|
623
627
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
624
628
|
}
|
|
625
|
-
const At = (e) => `on${Vt(e)}`,
|
|
629
|
+
const At = (e) => `on${Vt(e)}`, Wt = (e, t) => (n) => K({
|
|
626
630
|
code: e,
|
|
627
631
|
context: t.context,
|
|
628
632
|
localState: t.localState,
|
|
@@ -649,11 +653,11 @@ function Me(e) {
|
|
|
649
653
|
r = r.replace("on:", "");
|
|
650
654
|
break;
|
|
651
655
|
}
|
|
652
|
-
t[r] =
|
|
656
|
+
t[r] = Wt(a, e);
|
|
653
657
|
}
|
|
654
658
|
return t;
|
|
655
659
|
}
|
|
656
|
-
function
|
|
660
|
+
function Nt({
|
|
657
661
|
properties: e
|
|
658
662
|
}) {
|
|
659
663
|
return e;
|
|
@@ -676,7 +680,7 @@ function fe({
|
|
|
676
680
|
}),
|
|
677
681
|
[_()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
|
|
678
682
|
};
|
|
679
|
-
return
|
|
683
|
+
return Nt({
|
|
680
684
|
properties: n,
|
|
681
685
|
context: t,
|
|
682
686
|
block: e
|
|
@@ -704,6 +708,9 @@ function $t(e) {
|
|
|
704
708
|
);
|
|
705
709
|
}
|
|
706
710
|
function Dt(e) {
|
|
711
|
+
return /* @__PURE__ */ l(I, { children: e.children });
|
|
712
|
+
}
|
|
713
|
+
function Lt(e) {
|
|
707
714
|
function t() {
|
|
708
715
|
return e.includeBlockProps ? {
|
|
709
716
|
...fe({
|
|
@@ -719,9 +726,18 @@ function Dt(e) {
|
|
|
719
726
|
})
|
|
720
727
|
} : {};
|
|
721
728
|
}
|
|
722
|
-
return /* @__PURE__ */ l(
|
|
729
|
+
return /* @__PURE__ */ l(I, { children: e.Wrapper.load ? /* @__PURE__ */ l(I, { children: /* @__PURE__ */ l(
|
|
730
|
+
Dt,
|
|
731
|
+
{
|
|
732
|
+
load: e.Wrapper.load,
|
|
733
|
+
fallback: e.Wrapper.fallback,
|
|
734
|
+
props: e.wrapperProps,
|
|
735
|
+
attributes: t(),
|
|
736
|
+
children: e.children
|
|
737
|
+
}
|
|
738
|
+
) }) : /* @__PURE__ */ l(e.Wrapper, { ...e.wrapperProps, attributes: t(), children: e.children }) });
|
|
723
739
|
}
|
|
724
|
-
const
|
|
740
|
+
const Ot = ({
|
|
725
741
|
componentOptions: e,
|
|
726
742
|
builderBlock: t,
|
|
727
743
|
context: n,
|
|
@@ -754,12 +770,12 @@ const Lt = ({
|
|
|
754
770
|
function xe(e) {
|
|
755
771
|
var i;
|
|
756
772
|
const [t, n] = T(
|
|
757
|
-
() => e.isInteractive ?
|
|
773
|
+
() => e.isInteractive ? Lt : e.componentRef
|
|
758
774
|
);
|
|
759
|
-
return /* @__PURE__ */ l(
|
|
775
|
+
return /* @__PURE__ */ l(I, { children: e.componentRef ? /* @__PURE__ */ l(I, { children: /* @__PURE__ */ l(
|
|
760
776
|
t,
|
|
761
777
|
{
|
|
762
|
-
...
|
|
778
|
+
...Ot({
|
|
763
779
|
componentOptions: e.componentOptions,
|
|
764
780
|
builderBlock: e.builderBlock,
|
|
765
781
|
context: e.context,
|
|
@@ -831,9 +847,9 @@ function J(e) {
|
|
|
831
847
|
return e.block.tagName === "a" || ((p = o().properties) == null ? void 0 : p.href) || o().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
832
848
|
}
|
|
833
849
|
function s() {
|
|
834
|
-
var f,
|
|
850
|
+
var f, R;
|
|
835
851
|
if ((f = e.block.repeat) != null && f.collection)
|
|
836
|
-
return !!((
|
|
852
|
+
return !!((R = t == null ? void 0 : t()) != null && R.length);
|
|
837
853
|
const h = "hide" in o() ? o().hide : !1;
|
|
838
854
|
return ("show" in o() ? o().show : !0) && !h;
|
|
839
855
|
}
|
|
@@ -842,7 +858,7 @@ function J(e) {
|
|
|
842
858
|
return !((p = a == null ? void 0 : a()) != null && p.component) && !t() ? (f = o().children) != null ? f : [] : [];
|
|
843
859
|
}
|
|
844
860
|
function c() {
|
|
845
|
-
var h, p, f,
|
|
861
|
+
var h, p, f, R;
|
|
846
862
|
return {
|
|
847
863
|
blockChildren: (h = o().children) != null ? h : [],
|
|
848
864
|
componentRef: (p = a == null ? void 0 : a()) == null ? void 0 : p.component,
|
|
@@ -861,7 +877,7 @@ function J(e) {
|
|
|
861
877
|
registeredComponents: e.registeredComponents,
|
|
862
878
|
builderBlock: o(),
|
|
863
879
|
includeBlockProps: ((f = a == null ? void 0 : a()) == null ? void 0 : f.noWrap) === !0,
|
|
864
|
-
isInteractive: !((
|
|
880
|
+
isInteractive: !((R = a == null ? void 0 : a()) != null && R.isRSC && U === "rsc")
|
|
865
881
|
};
|
|
866
882
|
}
|
|
867
883
|
return P(() => {
|
|
@@ -874,9 +890,9 @@ function J(e) {
|
|
|
874
890
|
);
|
|
875
891
|
}, []), P(() => {
|
|
876
892
|
n.update = !0;
|
|
877
|
-
}), /* @__PURE__ */ l(
|
|
893
|
+
}), /* @__PURE__ */ l(I, { children: s() ? /* @__PURE__ */ V(I, { children: [
|
|
878
894
|
/* @__PURE__ */ l(Pt, { block: o(), context: e.context }),
|
|
879
|
-
(u = a == null ? void 0 : a()) != null && u.noWrap ? t() ? /* @__PURE__ */ l(
|
|
895
|
+
(u = a == null ? void 0 : a()) != null && u.noWrap ? t() ? /* @__PURE__ */ l(I, { children: (x = t()) == null ? void 0 : x.map((h, p) => /* @__PURE__ */ l(
|
|
880
896
|
ve,
|
|
881
897
|
{
|
|
882
898
|
repeatContext: h.context,
|
|
@@ -898,7 +914,7 @@ function J(e) {
|
|
|
898
914
|
includeBlockProps: c().includeBlockProps,
|
|
899
915
|
isInteractive: c().isInteractive
|
|
900
916
|
}
|
|
901
|
-
) : /* @__PURE__ */ l(
|
|
917
|
+
) : /* @__PURE__ */ l(I, { children: t() ? /* @__PURE__ */ l(I, { children: (m = t()) == null ? void 0 : m.map((h, p) => /* @__PURE__ */ l(
|
|
902
918
|
ve,
|
|
903
919
|
{
|
|
904
920
|
repeatContext: h.context,
|
|
@@ -943,7 +959,7 @@ function J(e) {
|
|
|
943
959
|
) })
|
|
944
960
|
] }) : null });
|
|
945
961
|
}
|
|
946
|
-
function
|
|
962
|
+
function Ut(e) {
|
|
947
963
|
const t = z(null);
|
|
948
964
|
function n() {
|
|
949
965
|
var a;
|
|
@@ -976,7 +992,7 @@ function Ot(e) {
|
|
|
976
992
|
));
|
|
977
993
|
}
|
|
978
994
|
return P(() => {
|
|
979
|
-
}, []), /* @__PURE__ */ V(
|
|
995
|
+
}, []), /* @__PURE__ */ V(I, { children: [
|
|
980
996
|
/* @__PURE__ */ l(
|
|
981
997
|
e.BlocksWrapper,
|
|
982
998
|
{
|
|
@@ -1003,7 +1019,7 @@ function D(e) {
|
|
|
1003
1019
|
var i, o, a;
|
|
1004
1020
|
const t = be(ue), n = be(Ve);
|
|
1005
1021
|
return /* @__PURE__ */ l(
|
|
1006
|
-
|
|
1022
|
+
Ut,
|
|
1007
1023
|
{
|
|
1008
1024
|
blocks: e.blocks,
|
|
1009
1025
|
parent: e.parent,
|
|
@@ -1011,7 +1027,7 @@ function D(e) {
|
|
|
1011
1027
|
styleProp: e.styleProp,
|
|
1012
1028
|
BlocksWrapper: ((i = e.context) == null ? void 0 : i.BlocksWrapper) || t.BlocksWrapper,
|
|
1013
1029
|
BlocksWrapperProps: ((o = e.context) == null ? void 0 : o.BlocksWrapperProps) || t.BlocksWrapperProps,
|
|
1014
|
-
children: e.blocks ? /* @__PURE__ */ l(
|
|
1030
|
+
children: e.blocks ? /* @__PURE__ */ l(I, { children: (a = e.blocks) == null ? void 0 : a.map((r) => /* @__PURE__ */ l(
|
|
1015
1031
|
J,
|
|
1016
1032
|
{
|
|
1017
1033
|
block: r,
|
|
@@ -1024,8 +1040,8 @@ function D(e) {
|
|
|
1024
1040
|
}
|
|
1025
1041
|
);
|
|
1026
1042
|
}
|
|
1027
|
-
const
|
|
1028
|
-
function
|
|
1043
|
+
const Mt = (e) => `builder-columns ${e}-breakpoints`;
|
|
1044
|
+
function jt(e) {
|
|
1029
1045
|
var A, O;
|
|
1030
1046
|
const [t, n] = T(
|
|
1031
1047
|
() => typeof e.space == "number" ? e.space || 0 : 20
|
|
@@ -1036,24 +1052,24 @@ function Mt(e) {
|
|
|
1036
1052
|
return v.link ? e.builderLinkComponent || "a" : "div";
|
|
1037
1053
|
}
|
|
1038
1054
|
function d(v) {
|
|
1039
|
-
var
|
|
1040
|
-
return ((
|
|
1055
|
+
var E;
|
|
1056
|
+
return ((E = i[v]) == null ? void 0 : E.width) || 100 / i.length;
|
|
1041
1057
|
}
|
|
1042
1058
|
function c(v) {
|
|
1043
|
-
const
|
|
1044
|
-
return `calc(${
|
|
1059
|
+
const E = d(v), W = t * (i.length - 1) * (E / 100);
|
|
1060
|
+
return `calc(${E}% - ${W}px)`;
|
|
1045
1061
|
}
|
|
1046
1062
|
function u({
|
|
1047
1063
|
stackedStyle: v,
|
|
1048
|
-
desktopStyle:
|
|
1064
|
+
desktopStyle: E
|
|
1049
1065
|
}) {
|
|
1050
|
-
return a === "tablet" ? v :
|
|
1066
|
+
return a === "tablet" ? v : E;
|
|
1051
1067
|
}
|
|
1052
1068
|
function g({
|
|
1053
1069
|
stackedStyle: v,
|
|
1054
|
-
desktopStyle:
|
|
1070
|
+
desktopStyle: E
|
|
1055
1071
|
}) {
|
|
1056
|
-
return a === "never" ?
|
|
1072
|
+
return a === "never" ? E : v;
|
|
1057
1073
|
}
|
|
1058
1074
|
const [m, x] = T(
|
|
1059
1075
|
() => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
@@ -1068,18 +1084,18 @@ function Mt(e) {
|
|
|
1068
1084
|
};
|
|
1069
1085
|
}
|
|
1070
1086
|
function p(v) {
|
|
1071
|
-
const
|
|
1087
|
+
const E = v === 0 ? 0 : t, W = c(v), y = `${E}px`, b = "100%", S = 0;
|
|
1072
1088
|
return {
|
|
1073
1089
|
...{
|
|
1074
1090
|
display: "flex",
|
|
1075
1091
|
flexDirection: "column",
|
|
1076
1092
|
alignItems: "stretch"
|
|
1077
1093
|
},
|
|
1078
|
-
width:
|
|
1094
|
+
width: W,
|
|
1079
1095
|
["marginLeft"]: y,
|
|
1080
1096
|
"--column-width-mobile": g({
|
|
1081
1097
|
stackedStyle: b,
|
|
1082
|
-
desktopStyle:
|
|
1098
|
+
desktopStyle: W
|
|
1083
1099
|
}),
|
|
1084
1100
|
"--column-margin-left-mobile": g({
|
|
1085
1101
|
stackedStyle: S,
|
|
@@ -1087,7 +1103,7 @@ function Mt(e) {
|
|
|
1087
1103
|
}),
|
|
1088
1104
|
"--column-width-tablet": u({
|
|
1089
1105
|
stackedStyle: b,
|
|
1090
|
-
desktopStyle:
|
|
1106
|
+
desktopStyle: W
|
|
1091
1107
|
}),
|
|
1092
1108
|
"--column-margin-left-tablet": u({
|
|
1093
1109
|
stackedStyle: S,
|
|
@@ -1096,12 +1112,12 @@ function Mt(e) {
|
|
|
1096
1112
|
};
|
|
1097
1113
|
}
|
|
1098
1114
|
function f(v) {
|
|
1099
|
-
var
|
|
1115
|
+
var W, y;
|
|
1100
1116
|
return Ue(
|
|
1101
|
-
((y = (
|
|
1117
|
+
((y = (W = e.builderContext.content) == null ? void 0 : W.meta) == null ? void 0 : y.breakpoints) || {}
|
|
1102
1118
|
)[v].max;
|
|
1103
1119
|
}
|
|
1104
|
-
function
|
|
1120
|
+
function R() {
|
|
1105
1121
|
const v = `.${e.builderBlock.id}-breakpoints > .builder-column`;
|
|
1106
1122
|
return `
|
|
1107
1123
|
@media (max-width: ${f("medium")}px) {
|
|
@@ -1129,40 +1145,40 @@ function Mt(e) {
|
|
|
1129
1145
|
},
|
|
1130
1146
|
`;
|
|
1131
1147
|
}
|
|
1132
|
-
function B(v,
|
|
1148
|
+
function B(v, E) {
|
|
1133
1149
|
return {
|
|
1134
1150
|
...v.link ? {
|
|
1135
1151
|
href: v.link
|
|
1136
1152
|
} : {},
|
|
1137
1153
|
[_()]: "builder-column",
|
|
1138
|
-
style: Le(p(
|
|
1154
|
+
style: Le(p(E))
|
|
1139
1155
|
};
|
|
1140
1156
|
}
|
|
1141
|
-
return /* @__PURE__ */ V(
|
|
1157
|
+
return /* @__PURE__ */ V(I, { children: [
|
|
1142
1158
|
/* @__PURE__ */ V(
|
|
1143
1159
|
"div",
|
|
1144
1160
|
{
|
|
1145
|
-
className:
|
|
1161
|
+
className: Mt((A = e.builderBlock) == null ? void 0 : A.id) + " div-34f576bb",
|
|
1146
1162
|
style: h(),
|
|
1147
1163
|
children: [
|
|
1148
1164
|
/* @__PURE__ */ l(
|
|
1149
1165
|
te,
|
|
1150
1166
|
{
|
|
1151
1167
|
id: "builderio-columns",
|
|
1152
|
-
styles:
|
|
1168
|
+
styles: R(),
|
|
1153
1169
|
nonce: e.builderContext.nonce
|
|
1154
1170
|
}
|
|
1155
1171
|
),
|
|
1156
|
-
(O = e.columns) == null ? void 0 : O.map((v,
|
|
1172
|
+
(O = e.columns) == null ? void 0 : O.map((v, E) => /* @__PURE__ */ l(
|
|
1157
1173
|
de,
|
|
1158
1174
|
{
|
|
1159
1175
|
TagName: s(v),
|
|
1160
1176
|
actionAttributes: {},
|
|
1161
|
-
attributes: B(v,
|
|
1177
|
+
attributes: B(v, E),
|
|
1162
1178
|
children: /* @__PURE__ */ l(
|
|
1163
1179
|
D,
|
|
1164
1180
|
{
|
|
1165
|
-
path: `component.options.columns.${
|
|
1181
|
+
path: `component.options.columns.${E}.blocks`,
|
|
1166
1182
|
parent: e.builderBlock.id,
|
|
1167
1183
|
styleProp: {
|
|
1168
1184
|
flexGrow: "1"
|
|
@@ -1174,7 +1190,7 @@ function Mt(e) {
|
|
|
1174
1190
|
}
|
|
1175
1191
|
)
|
|
1176
1192
|
},
|
|
1177
|
-
|
|
1193
|
+
E
|
|
1178
1194
|
))
|
|
1179
1195
|
]
|
|
1180
1196
|
}
|
|
@@ -1185,17 +1201,17 @@ function Mt(e) {
|
|
|
1185
1201
|
}` })
|
|
1186
1202
|
] });
|
|
1187
1203
|
}
|
|
1188
|
-
function
|
|
1204
|
+
function Ht(e) {
|
|
1189
1205
|
return /* @__PURE__ */ l("span", { children: e.children });
|
|
1190
1206
|
}
|
|
1191
1207
|
function Se(e) {
|
|
1192
1208
|
return e.replace(/http(s)?:/, "");
|
|
1193
1209
|
}
|
|
1194
|
-
function
|
|
1210
|
+
function Kt(e = "", t, n) {
|
|
1195
1211
|
const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), o = e.indexOf("?") !== -1 ? "&" : "?";
|
|
1196
1212
|
return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + o + t + "=" + encodeURIComponent(n);
|
|
1197
1213
|
}
|
|
1198
|
-
function
|
|
1214
|
+
function qt(e, t) {
|
|
1199
1215
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
1200
1216
|
return e;
|
|
1201
1217
|
if (t === "master")
|
|
@@ -1214,11 +1230,11 @@ function ie(e) {
|
|
|
1214
1230
|
if (e.match(/builder\.io/)) {
|
|
1215
1231
|
let n = e;
|
|
1216
1232
|
const i = Number(e.split("?width=")[1]);
|
|
1217
|
-
return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${
|
|
1233
|
+
return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${Kt(e, "width", o)} ${o}w`).concat([n]).join(", ");
|
|
1218
1234
|
}
|
|
1219
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
1235
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [qt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
|
|
1220
1236
|
}
|
|
1221
|
-
function
|
|
1237
|
+
function _t(e) {
|
|
1222
1238
|
var o, a, r, s, d, c;
|
|
1223
1239
|
function t() {
|
|
1224
1240
|
var m;
|
|
@@ -1251,8 +1267,8 @@ function qt(e) {
|
|
|
1251
1267
|
return e.aspectRatio ? u : void 0;
|
|
1252
1268
|
}
|
|
1253
1269
|
return P(() => {
|
|
1254
|
-
}, []), /* @__PURE__ */ V(
|
|
1255
|
-
/* @__PURE__ */ V(
|
|
1270
|
+
}, []), /* @__PURE__ */ V(I, { children: [
|
|
1271
|
+
/* @__PURE__ */ V(I, { children: [
|
|
1256
1272
|
/* @__PURE__ */ V("picture", { children: [
|
|
1257
1273
|
n() ? /* @__PURE__ */ l("source", { type: "image/webp", srcSet: n() }) : null,
|
|
1258
1274
|
/* @__PURE__ */ l(
|
|
@@ -1283,7 +1299,7 @@ function qt(e) {
|
|
|
1283
1299
|
}
|
|
1284
1300
|
}
|
|
1285
1301
|
) : null,
|
|
1286
|
-
(s = (r = e.builderBlock) == null ? void 0 : r.children) != null && s.length && e.fitContent ? /* @__PURE__ */ l(
|
|
1302
|
+
(s = (r = e.builderBlock) == null ? void 0 : r.children) != null && s.length && e.fitContent ? /* @__PURE__ */ l(I, { children: e.children }) : null,
|
|
1287
1303
|
!e.fitContent && ((c = (d = e.builderBlock) == null ? void 0 : d.children) != null && c.length) ? /* @__PURE__ */ l("div", { className: "div-2d6925f2-2", children: e.children }) : null
|
|
1288
1304
|
] }),
|
|
1289
1305
|
/* @__PURE__ */ l("style", { children: `.img-2d6925f2 {
|
|
@@ -1305,7 +1321,7 @@ function qt(e) {
|
|
|
1305
1321
|
}` })
|
|
1306
1322
|
] });
|
|
1307
1323
|
}
|
|
1308
|
-
function
|
|
1324
|
+
function zt(e) {
|
|
1309
1325
|
return /* @__PURE__ */ l(
|
|
1310
1326
|
"section",
|
|
1311
1327
|
{
|
|
@@ -1386,7 +1402,7 @@ const oe = {
|
|
|
1386
1402
|
}
|
|
1387
1403
|
}
|
|
1388
1404
|
}]
|
|
1389
|
-
},
|
|
1405
|
+
}, Jt = {
|
|
1390
1406
|
name: "Builder:Accordion",
|
|
1391
1407
|
canHaveChildren: !0,
|
|
1392
1408
|
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
@@ -1451,7 +1467,7 @@ const oe = {
|
|
|
1451
1467
|
builderLinkComponent: !0
|
|
1452
1468
|
}
|
|
1453
1469
|
}, ke = (e) => e.toString();
|
|
1454
|
-
function
|
|
1470
|
+
function Yt(e) {
|
|
1455
1471
|
var g;
|
|
1456
1472
|
const [t, n] = T(() => []);
|
|
1457
1473
|
function i() {
|
|
@@ -1496,18 +1512,18 @@ function Jt(e) {
|
|
|
1496
1512
|
`.builder-accordion-title[data-index="${h}"]`
|
|
1497
1513
|
);
|
|
1498
1514
|
if (m = h, f) {
|
|
1499
|
-
let
|
|
1515
|
+
let R = f.getBoundingClientRect();
|
|
1500
1516
|
for (; f = f && f.nextElementSibling; )
|
|
1501
1517
|
if (f) {
|
|
1502
1518
|
if (f.classList.contains("builder-accordion-detail"))
|
|
1503
1519
|
continue;
|
|
1504
1520
|
const B = f.getBoundingClientRect();
|
|
1505
|
-
if (B.left >
|
|
1521
|
+
if (B.left > R.left) {
|
|
1506
1522
|
const A = parseInt(
|
|
1507
1523
|
f.getAttribute("data-index") || "",
|
|
1508
1524
|
10
|
|
1509
1525
|
);
|
|
1510
|
-
isNaN(A) || (
|
|
1526
|
+
isNaN(A) || (R = B, m = A);
|
|
1511
1527
|
} else
|
|
1512
1528
|
break;
|
|
1513
1529
|
}
|
|
@@ -1529,7 +1545,7 @@ function Jt(e) {
|
|
|
1529
1545
|
function u(m) {
|
|
1530
1546
|
t.includes(m) ? n(i() ? [] : t.filter((x) => x !== m)) : n(i() ? [m] : t.concat(m));
|
|
1531
1547
|
}
|
|
1532
|
-
return /* @__PURE__ */ l("div", { className: "builder-accordion", style: o(), children: (g = e.items) == null ? void 0 : g.map((m, x) => /* @__PURE__ */ V(
|
|
1548
|
+
return /* @__PURE__ */ l("div", { className: "builder-accordion", style: o(), children: (g = e.items) == null ? void 0 : g.map((m, x) => /* @__PURE__ */ V(I, { children: [
|
|
1533
1549
|
/* @__PURE__ */ l(
|
|
1534
1550
|
"div",
|
|
1535
1551
|
{
|
|
@@ -1574,7 +1590,7 @@ function Jt(e) {
|
|
|
1574
1590
|
) : null
|
|
1575
1591
|
] })) });
|
|
1576
1592
|
}
|
|
1577
|
-
const
|
|
1593
|
+
const Gt = {
|
|
1578
1594
|
name: "Core:Button",
|
|
1579
1595
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1580
1596
|
defaultStyles: {
|
|
@@ -1610,7 +1626,7 @@ const Yt = {
|
|
|
1610
1626
|
shouldReceiveBuilderProps: {
|
|
1611
1627
|
builderLinkComponent: !0
|
|
1612
1628
|
}
|
|
1613
|
-
},
|
|
1629
|
+
}, Qt = {
|
|
1614
1630
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1615
1631
|
name: "Columns",
|
|
1616
1632
|
isRSC: !0,
|
|
@@ -1817,13 +1833,13 @@ const Yt = {
|
|
|
1817
1833
|
builderComponents: !0,
|
|
1818
1834
|
builderLinkComponent: !0
|
|
1819
1835
|
}
|
|
1820
|
-
},
|
|
1836
|
+
}, Xt = {
|
|
1821
1837
|
name: "Fragment",
|
|
1822
1838
|
static: !0,
|
|
1823
1839
|
hidden: !0,
|
|
1824
1840
|
canHaveChildren: !0,
|
|
1825
1841
|
noWrap: !0
|
|
1826
|
-
},
|
|
1842
|
+
}, Zt = {
|
|
1827
1843
|
name: "Image",
|
|
1828
1844
|
static: !0,
|
|
1829
1845
|
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",
|
|
@@ -1931,7 +1947,7 @@ const Yt = {
|
|
|
1931
1947
|
shouldReceiveBuilderProps: {
|
|
1932
1948
|
builderBlock: !0
|
|
1933
1949
|
}
|
|
1934
|
-
},
|
|
1950
|
+
}, en = {
|
|
1935
1951
|
name: "Core:Section",
|
|
1936
1952
|
static: !0,
|
|
1937
1953
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1970,7 +1986,7 @@ const Yt = {
|
|
|
1970
1986
|
}
|
|
1971
1987
|
}
|
|
1972
1988
|
}]
|
|
1973
|
-
},
|
|
1989
|
+
}, tn = {
|
|
1974
1990
|
name: "Slot",
|
|
1975
1991
|
isRSC: !0,
|
|
1976
1992
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -1988,7 +2004,7 @@ const Yt = {
|
|
|
1988
2004
|
builderComponents: !0
|
|
1989
2005
|
}
|
|
1990
2006
|
};
|
|
1991
|
-
function
|
|
2007
|
+
function nn(e) {
|
|
1992
2008
|
var t, n, i;
|
|
1993
2009
|
return /* @__PURE__ */ l(
|
|
1994
2010
|
"div",
|
|
@@ -2012,7 +2028,7 @@ function tn(e) {
|
|
|
2012
2028
|
}
|
|
2013
2029
|
);
|
|
2014
2030
|
}
|
|
2015
|
-
const
|
|
2031
|
+
const on = {
|
|
2016
2032
|
name: "Symbol",
|
|
2017
2033
|
noWrap: !0,
|
|
2018
2034
|
static: !0,
|
|
@@ -2089,7 +2105,7 @@ const nn = {
|
|
|
2089
2105
|
text: "New tab content "
|
|
2090
2106
|
}
|
|
2091
2107
|
}
|
|
2092
|
-
},
|
|
2108
|
+
}, an = {
|
|
2093
2109
|
name: "Builder: Tabs",
|
|
2094
2110
|
inputs: [{
|
|
2095
2111
|
name: "tabs",
|
|
@@ -2193,7 +2209,7 @@ const nn = {
|
|
|
2193
2209
|
builderLinkComponent: !0
|
|
2194
2210
|
}
|
|
2195
2211
|
};
|
|
2196
|
-
function
|
|
2212
|
+
function rn(e) {
|
|
2197
2213
|
var a;
|
|
2198
2214
|
const [t, n] = T(
|
|
2199
2215
|
() => e.defaultActiveTab ? e.defaultActiveTab - 1 : 0
|
|
@@ -2252,7 +2268,7 @@ function an(e) {
|
|
|
2252
2268
|
) }) : null
|
|
2253
2269
|
] });
|
|
2254
2270
|
}
|
|
2255
|
-
const
|
|
2271
|
+
const ln = {
|
|
2256
2272
|
shouldReceiveBuilderProps: {
|
|
2257
2273
|
builderBlock: !1,
|
|
2258
2274
|
builderContext: !0
|
|
@@ -2275,7 +2291,7 @@ const rn = {
|
|
|
2275
2291
|
textAlign: "center"
|
|
2276
2292
|
}
|
|
2277
2293
|
};
|
|
2278
|
-
function
|
|
2294
|
+
function sn(e) {
|
|
2279
2295
|
function t() {
|
|
2280
2296
|
var s;
|
|
2281
2297
|
const n = e.builderContext, {
|
|
@@ -2307,7 +2323,7 @@ function ln(e) {
|
|
|
2307
2323
|
}
|
|
2308
2324
|
);
|
|
2309
2325
|
}
|
|
2310
|
-
const
|
|
2326
|
+
const cn = {
|
|
2311
2327
|
name: "Custom Code",
|
|
2312
2328
|
static: !0,
|
|
2313
2329
|
requiredPermissions: ["editCode"],
|
|
@@ -2330,7 +2346,7 @@ const sn = {
|
|
|
2330
2346
|
advanced: !0
|
|
2331
2347
|
}]
|
|
2332
2348
|
};
|
|
2333
|
-
function
|
|
2349
|
+
function dn(e) {
|
|
2334
2350
|
const t = z(null), [n, i] = T(() => []), [o, a] = T(() => []);
|
|
2335
2351
|
return P(() => {
|
|
2336
2352
|
var s;
|
|
@@ -2368,7 +2384,7 @@ function cn(e) {
|
|
|
2368
2384
|
}
|
|
2369
2385
|
);
|
|
2370
2386
|
}
|
|
2371
|
-
const
|
|
2387
|
+
const un = {
|
|
2372
2388
|
name: "Embed",
|
|
2373
2389
|
static: !0,
|
|
2374
2390
|
inputs: [{
|
|
@@ -2383,8 +2399,8 @@ const dn = {
|
|
|
2383
2399
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
2384
2400
|
hideFromUI: !0
|
|
2385
2401
|
}]
|
|
2386
|
-
},
|
|
2387
|
-
function
|
|
2402
|
+
}, mn = ["text/javascript", "application/javascript", "application/ecmascript"], fn = (e) => mn.includes(e.type);
|
|
2403
|
+
function hn(e) {
|
|
2388
2404
|
const t = z(null), [n, i] = T(() => []), [o, a] = T(() => []), [r, s] = T(() => !1);
|
|
2389
2405
|
function d() {
|
|
2390
2406
|
if (!t.current || !t.current.getElementsByTagName)
|
|
@@ -2396,7 +2412,7 @@ function fn(e) {
|
|
|
2396
2412
|
n.push(g.src);
|
|
2397
2413
|
const m = document.createElement("script");
|
|
2398
2414
|
m.async = !0, m.src = g.src, document.head.appendChild(m);
|
|
2399
|
-
} else if (
|
|
2415
|
+
} else if (fn(g) && !o.includes(g.innerText))
|
|
2400
2416
|
try {
|
|
2401
2417
|
o.push(g.innerText), new Function(g.innerText)();
|
|
2402
2418
|
} catch (m) {
|
|
@@ -2415,7 +2431,7 @@ function fn(e) {
|
|
|
2415
2431
|
}
|
|
2416
2432
|
);
|
|
2417
2433
|
}
|
|
2418
|
-
const
|
|
2434
|
+
const gn = {
|
|
2419
2435
|
name: "Form:Form",
|
|
2420
2436
|
// editableTags: ['builder-form-error']
|
|
2421
2437
|
defaults: {
|
|
@@ -2652,14 +2668,14 @@ const hn = {
|
|
|
2652
2668
|
builderComponents: !0,
|
|
2653
2669
|
builderLinkComponent: !0
|
|
2654
2670
|
}
|
|
2655
|
-
},
|
|
2671
|
+
}, bn = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], pn = () => {
|
|
2656
2672
|
const e = process.env.NODE_ENV || "production";
|
|
2657
|
-
return
|
|
2658
|
-
},
|
|
2673
|
+
return bn.includes(e) ? e : "production";
|
|
2674
|
+
}, yn = (e, t, n) => {
|
|
2659
2675
|
const i = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((o, a) => o != null ? o[a] : o, e);
|
|
2660
2676
|
return i === void 0 || i === e ? n : i;
|
|
2661
2677
|
};
|
|
2662
|
-
function
|
|
2678
|
+
function xn(e) {
|
|
2663
2679
|
var g, m;
|
|
2664
2680
|
const t = z(null), [n, i] = T(() => "unsubmitted"), [o, a] = T(() => null), [r, s] = T(() => "");
|
|
2665
2681
|
function d(x) {
|
|
@@ -2684,7 +2700,7 @@ function yn(e) {
|
|
|
2684
2700
|
return;
|
|
2685
2701
|
}
|
|
2686
2702
|
x.preventDefault();
|
|
2687
|
-
const f = x.currentTarget || x.target,
|
|
2703
|
+
const f = x.currentTarget || x.target, R = e.customHeaders || {};
|
|
2688
2704
|
let B;
|
|
2689
2705
|
const A = new FormData(f), O = Array.from(f.querySelectorAll("input,select,textarea")).filter((y) => !!y.name).map((y) => {
|
|
2690
2706
|
let b;
|
|
@@ -2718,26 +2734,26 @@ function yn(e) {
|
|
|
2718
2734
|
else {
|
|
2719
2735
|
const y = {};
|
|
2720
2736
|
Array.from(O).forEach(({ value: b, key: S }) => {
|
|
2721
|
-
|
|
2737
|
+
We(y, S, b);
|
|
2722
2738
|
}), B = JSON.stringify(y);
|
|
2723
2739
|
}
|
|
2724
|
-
v && v !== "multipart/form-data" && (h && ((p = e.action) != null && p.includes("zapier.com")) || (
|
|
2725
|
-
const
|
|
2726
|
-
if (t.current && (t.current.dispatchEvent(
|
|
2740
|
+
v && v !== "multipart/form-data" && (h && ((p = e.action) != null && p.includes("zapier.com")) || (R["content-type"] = v));
|
|
2741
|
+
const E = new CustomEvent("presubmit", { detail: { body: B } });
|
|
2742
|
+
if (t.current && (t.current.dispatchEvent(E), E.defaultPrevented))
|
|
2727
2743
|
return;
|
|
2728
2744
|
i("sending");
|
|
2729
|
-
const
|
|
2745
|
+
const W = `${pn() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
|
|
2730
2746
|
e.sendSubmissionsToEmail || ""
|
|
2731
2747
|
)}&name=${encodeURIComponent(e.name || "")}`;
|
|
2732
2748
|
fetch(
|
|
2733
|
-
e.sendSubmissionsTo === "email" ?
|
|
2734
|
-
{ body: B, headers:
|
|
2749
|
+
e.sendSubmissionsTo === "email" ? W : e.action,
|
|
2750
|
+
{ body: B, headers: R, method: e.method || "post" }
|
|
2735
2751
|
).then(
|
|
2736
2752
|
async (y) => {
|
|
2737
2753
|
let b;
|
|
2738
2754
|
const S = y.headers.get("content-type");
|
|
2739
2755
|
if (S && S.indexOf("application/json") !== -1 ? b = await y.json() : b = await y.text(), !y.ok && e.errorMessagePath) {
|
|
2740
|
-
let k =
|
|
2756
|
+
let k = yn(b, e.errorMessagePath);
|
|
2741
2757
|
k && (typeof k != "string" && (k = JSON.stringify(k)), s(k), d({ formErrorMessage: k }));
|
|
2742
2758
|
}
|
|
2743
2759
|
if (a(b), i(y.ok ? "success" : "error"), y.ok) {
|
|
@@ -2768,7 +2784,7 @@ function yn(e) {
|
|
|
2768
2784
|
);
|
|
2769
2785
|
}
|
|
2770
2786
|
}
|
|
2771
|
-
return /* @__PURE__ */ V(
|
|
2787
|
+
return /* @__PURE__ */ V(I, { children: [
|
|
2772
2788
|
" ",
|
|
2773
2789
|
/* @__PURE__ */ V(
|
|
2774
2790
|
"form",
|
|
@@ -2781,7 +2797,7 @@ function yn(e) {
|
|
|
2781
2797
|
onSubmit: (x) => u(x),
|
|
2782
2798
|
...e.attributes,
|
|
2783
2799
|
children: [
|
|
2784
|
-
e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ l(
|
|
2800
|
+
e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ l(I, { children: (m = (g = e.builderBlock) == null ? void 0 : g.children) == null ? void 0 : m.map((x, h) => /* @__PURE__ */ l(
|
|
2785
2801
|
J,
|
|
2786
2802
|
{
|
|
2787
2803
|
block: x,
|
|
@@ -2824,7 +2840,7 @@ function yn(e) {
|
|
|
2824
2840
|
" "
|
|
2825
2841
|
] });
|
|
2826
2842
|
}
|
|
2827
|
-
const
|
|
2843
|
+
const vn = {
|
|
2828
2844
|
name: "Form:Input",
|
|
2829
2845
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
2830
2846
|
inputs: [
|
|
@@ -2876,7 +2892,7 @@ const xn = {
|
|
|
2876
2892
|
borderColor: "#ccc"
|
|
2877
2893
|
}
|
|
2878
2894
|
};
|
|
2879
|
-
function
|
|
2895
|
+
function Sn(e) {
|
|
2880
2896
|
return /* @__PURE__ */ Pe(
|
|
2881
2897
|
"input",
|
|
2882
2898
|
{
|
|
@@ -2891,7 +2907,7 @@ function vn(e) {
|
|
|
2891
2907
|
}
|
|
2892
2908
|
);
|
|
2893
2909
|
}
|
|
2894
|
-
const
|
|
2910
|
+
const kn = {
|
|
2895
2911
|
name: "Form:Select",
|
|
2896
2912
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
2897
2913
|
defaultStyles: {
|
|
@@ -2934,7 +2950,7 @@ const Sn = {
|
|
|
2934
2950
|
static: !0,
|
|
2935
2951
|
noWrap: !0
|
|
2936
2952
|
};
|
|
2937
|
-
function
|
|
2953
|
+
function Cn(e) {
|
|
2938
2954
|
var t;
|
|
2939
2955
|
return /* @__PURE__ */ Pe(
|
|
2940
2956
|
"select",
|
|
@@ -2949,7 +2965,7 @@ function kn(e) {
|
|
|
2949
2965
|
(t = e.options) == null ? void 0 : t.map((n, i) => /* @__PURE__ */ l("option", { value: n.value, children: n.name || n.value }, `${n.name}-${i}`))
|
|
2950
2966
|
);
|
|
2951
2967
|
}
|
|
2952
|
-
const
|
|
2968
|
+
const Tn = {
|
|
2953
2969
|
name: "Form:SubmitButton",
|
|
2954
2970
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
2955
2971
|
defaultStyles: {
|
|
@@ -2975,10 +2991,10 @@ const Cn = {
|
|
|
2975
2991
|
// TODO: defaultChildren
|
|
2976
2992
|
// canHaveChildren: true,
|
|
2977
2993
|
};
|
|
2978
|
-
function
|
|
2994
|
+
function In(e) {
|
|
2979
2995
|
return /* @__PURE__ */ l("button", { type: "submit", ...e.attributes, children: e.text });
|
|
2980
2996
|
}
|
|
2981
|
-
const
|
|
2997
|
+
const wn = {
|
|
2982
2998
|
name: "Form:TextArea",
|
|
2983
2999
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
2984
3000
|
inputs: [{
|
|
@@ -3015,7 +3031,7 @@ const In = {
|
|
|
3015
3031
|
static: !0,
|
|
3016
3032
|
noWrap: !0
|
|
3017
3033
|
};
|
|
3018
|
-
function
|
|
3034
|
+
function Rn(e) {
|
|
3019
3035
|
return /* @__PURE__ */ l(
|
|
3020
3036
|
"textarea",
|
|
3021
3037
|
{
|
|
@@ -3028,7 +3044,7 @@ function wn(e) {
|
|
|
3028
3044
|
}
|
|
3029
3045
|
);
|
|
3030
3046
|
}
|
|
3031
|
-
const
|
|
3047
|
+
const En = {
|
|
3032
3048
|
// friendlyName?
|
|
3033
3049
|
name: "Raw:Img",
|
|
3034
3050
|
hideFromInsertMenu: !0,
|
|
@@ -3043,7 +3059,7 @@ const Rn = {
|
|
|
3043
3059
|
noWrap: !0,
|
|
3044
3060
|
static: !0
|
|
3045
3061
|
};
|
|
3046
|
-
function
|
|
3062
|
+
function Bn(e) {
|
|
3047
3063
|
return /* @__PURE__ */ l(
|
|
3048
3064
|
"img",
|
|
3049
3065
|
{
|
|
@@ -3058,7 +3074,7 @@ function En(e) {
|
|
|
3058
3074
|
$() && e.imgSrc || "default-key"
|
|
3059
3075
|
);
|
|
3060
3076
|
}
|
|
3061
|
-
const
|
|
3077
|
+
const Pn = {
|
|
3062
3078
|
name: "Video",
|
|
3063
3079
|
canHaveChildren: !0,
|
|
3064
3080
|
defaultStyles: {
|
|
@@ -3143,7 +3159,7 @@ const Bn = {
|
|
|
3143
3159
|
builderBlock: !0
|
|
3144
3160
|
}
|
|
3145
3161
|
};
|
|
3146
|
-
function
|
|
3162
|
+
function Vn(e) {
|
|
3147
3163
|
var i, o, a, r, s, d, c;
|
|
3148
3164
|
function t() {
|
|
3149
3165
|
return {
|
|
@@ -3244,64 +3260,64 @@ function Pn(e) {
|
|
|
3244
3260
|
}
|
|
3245
3261
|
);
|
|
3246
3262
|
}
|
|
3247
|
-
const
|
|
3248
|
-
component:
|
|
3249
|
-
...
|
|
3263
|
+
const An = () => [{
|
|
3264
|
+
component: dn,
|
|
3265
|
+
...cn
|
|
3250
3266
|
}, {
|
|
3251
|
-
component:
|
|
3252
|
-
...
|
|
3267
|
+
component: hn,
|
|
3268
|
+
...un
|
|
3253
3269
|
}, {
|
|
3254
|
-
component:
|
|
3255
|
-
...
|
|
3270
|
+
component: xn,
|
|
3271
|
+
...gn
|
|
3256
3272
|
}, {
|
|
3257
|
-
component:
|
|
3258
|
-
...
|
|
3273
|
+
component: Sn,
|
|
3274
|
+
...vn
|
|
3259
3275
|
}, {
|
|
3260
|
-
component:
|
|
3261
|
-
...
|
|
3276
|
+
component: In,
|
|
3277
|
+
...Tn
|
|
3262
3278
|
}, {
|
|
3263
|
-
component:
|
|
3264
|
-
...
|
|
3279
|
+
component: Cn,
|
|
3280
|
+
...kn
|
|
3265
3281
|
}, {
|
|
3266
|
-
component:
|
|
3267
|
-
...
|
|
3282
|
+
component: Rn,
|
|
3283
|
+
...wn
|
|
3268
3284
|
}, {
|
|
3269
|
-
component:
|
|
3270
|
-
...
|
|
3285
|
+
component: Bn,
|
|
3286
|
+
...En
|
|
3271
3287
|
}, {
|
|
3272
|
-
component:
|
|
3273
|
-
...
|
|
3288
|
+
component: Vn,
|
|
3289
|
+
...Pn
|
|
3274
3290
|
}], Ce = () => [{
|
|
3275
3291
|
component: it,
|
|
3276
|
-
...Yt
|
|
3277
|
-
}, {
|
|
3278
|
-
component: Mt,
|
|
3279
3292
|
...Gt
|
|
3280
3293
|
}, {
|
|
3281
3294
|
component: jt,
|
|
3282
3295
|
...Qt
|
|
3283
3296
|
}, {
|
|
3284
|
-
component:
|
|
3297
|
+
component: Ht,
|
|
3285
3298
|
...Xt
|
|
3286
3299
|
}, {
|
|
3287
3300
|
component: _t,
|
|
3288
3301
|
...Zt
|
|
3289
3302
|
}, {
|
|
3290
|
-
component:
|
|
3303
|
+
component: zt,
|
|
3291
3304
|
...en
|
|
3292
3305
|
}, {
|
|
3293
|
-
component:
|
|
3294
|
-
...
|
|
3295
|
-
}, {
|
|
3296
|
-
component: ln,
|
|
3297
|
-
...rn
|
|
3306
|
+
component: nn,
|
|
3307
|
+
...tn
|
|
3298
3308
|
}, {
|
|
3299
|
-
component:
|
|
3309
|
+
component: ti,
|
|
3300
3310
|
...on
|
|
3301
3311
|
}, {
|
|
3302
|
-
component:
|
|
3303
|
-
...
|
|
3304
|
-
},
|
|
3312
|
+
component: sn,
|
|
3313
|
+
...ln
|
|
3314
|
+
}, {
|
|
3315
|
+
component: rn,
|
|
3316
|
+
...an
|
|
3317
|
+
}, {
|
|
3318
|
+
component: Yt,
|
|
3319
|
+
...Jt
|
|
3320
|
+
}, ...An()], Wn = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
3305
3321
|
function getAndSetVariantId() {
|
|
3306
3322
|
function setCookie(name, value, days) {
|
|
3307
3323
|
let expires = '';
|
|
@@ -3395,16 +3411,16 @@ const Vn = () => [{
|
|
|
3395
3411
|
...t,
|
|
3396
3412
|
testVariationId: t.id,
|
|
3397
3413
|
id: e == null ? void 0 : e.id
|
|
3398
|
-
})),
|
|
3414
|
+
})), Fn = ({
|
|
3399
3415
|
canTrack: e,
|
|
3400
3416
|
content: t
|
|
3401
|
-
}) => !(!(G(t).length > 0) || !e || H()),
|
|
3402
|
-
window.${je} = ${
|
|
3417
|
+
}) => !(!(G(t).length > 0) || !e || H()), $n = (e) => e === "react" || e === "reactNative", Ke = $n(U), Dn = () => `
|
|
3418
|
+
window.${je} = ${Wn}
|
|
3403
3419
|
window.${He} = ${Nn}
|
|
3404
|
-
`,
|
|
3420
|
+
`, Ln = (e, t) => `
|
|
3405
3421
|
window.${je}(
|
|
3406
3422
|
"${t}",${JSON.stringify(e)}, ${Ke}
|
|
3407
|
-
)`,
|
|
3423
|
+
)`, On = ({
|
|
3408
3424
|
contentId: e,
|
|
3409
3425
|
variationId: t
|
|
3410
3426
|
}) => `window.${He}(
|
|
@@ -3423,7 +3439,7 @@ function ce(e) {
|
|
|
3423
3439
|
function Te(e) {
|
|
3424
3440
|
return Math.round(e * 1e3) / 1e3;
|
|
3425
3441
|
}
|
|
3426
|
-
const
|
|
3442
|
+
const Un = (e, t, n = !0) => {
|
|
3427
3443
|
if (!(e instanceof HTMLElement))
|
|
3428
3444
|
return null;
|
|
3429
3445
|
let i = n ? e : e.parentElement;
|
|
@@ -3434,7 +3450,7 @@ const On = (e, t, n = !0) => {
|
|
|
3434
3450
|
return i;
|
|
3435
3451
|
} while (i = i.parentElement);
|
|
3436
3452
|
return null;
|
|
3437
|
-
},
|
|
3453
|
+
}, Mn = (e) => Un(e, (t) => {
|
|
3438
3454
|
const n = t.getAttribute("builder-id") || t.id;
|
|
3439
3455
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
3440
3456
|
}), Ie = ({
|
|
@@ -3446,8 +3462,8 @@ const On = (e, t, n = !0) => {
|
|
|
3446
3462
|
x: a,
|
|
3447
3463
|
y: r
|
|
3448
3464
|
};
|
|
3449
|
-
},
|
|
3450
|
-
const t = e.target, n = t &&
|
|
3465
|
+
}, jn = (e) => {
|
|
3466
|
+
const t = e.target, n = t && Mn(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
3451
3467
|
return {
|
|
3452
3468
|
targetBuilderElement: i || void 0,
|
|
3453
3469
|
metadata: {
|
|
@@ -3462,7 +3478,7 @@ const On = (e, t, n = !0) => {
|
|
|
3462
3478
|
builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
|
|
3463
3479
|
}
|
|
3464
3480
|
};
|
|
3465
|
-
},
|
|
3481
|
+
}, Hn = (e) => {
|
|
3466
3482
|
var a, r;
|
|
3467
3483
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (r = e.fileUrl) != null ? r : (a = e == null ? void 0 : e.files) == null ? void 0 : a.regular;
|
|
3468
3484
|
let o = "";
|
|
@@ -3488,15 +3504,15 @@ font-weight: ${s};
|
|
|
3488
3504
|
`.trim());
|
|
3489
3505
|
}
|
|
3490
3506
|
return o;
|
|
3491
|
-
},
|
|
3507
|
+
}, Kn = ({
|
|
3492
3508
|
customFonts: e
|
|
3493
3509
|
}) => {
|
|
3494
3510
|
var t;
|
|
3495
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
3496
|
-
},
|
|
3511
|
+
return ((t = e == null ? void 0 : e.map((n) => Hn(n))) == null ? void 0 : t.join(" ")) || "";
|
|
3512
|
+
}, qn = ({
|
|
3497
3513
|
cssCode: e,
|
|
3498
3514
|
contentId: t
|
|
3499
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
3515
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", _n = `
|
|
3500
3516
|
.builder-button {
|
|
3501
3517
|
all: unset;
|
|
3502
3518
|
}
|
|
@@ -3513,9 +3529,9 @@ font-weight: ${s};
|
|
|
3513
3529
|
text-align: inherit;
|
|
3514
3530
|
font-family: inherit;
|
|
3515
3531
|
}
|
|
3516
|
-
`,
|
|
3517
|
-
function
|
|
3518
|
-
var B, A, O, v,
|
|
3532
|
+
`, zn = (e) => e ? "" : _n, Jn = (e) => `variant-${e}`;
|
|
3533
|
+
function Yn(e) {
|
|
3534
|
+
var B, A, O, v, E, W, y;
|
|
3519
3535
|
const t = z(null);
|
|
3520
3536
|
function n(b) {
|
|
3521
3537
|
var k, C;
|
|
@@ -3523,13 +3539,13 @@ function Jn(e) {
|
|
|
3523
3539
|
...e.builderContextSignal.rootState,
|
|
3524
3540
|
...b
|
|
3525
3541
|
};
|
|
3526
|
-
e.builderContextSignal.rootSetState ? (C = (k = e.builderContextSignal).rootSetState) == null || C.call(k, S) : e.setBuilderContextSignal((
|
|
3527
|
-
...
|
|
3542
|
+
e.builderContextSignal.rootSetState ? (C = (k = e.builderContextSignal).rootSetState) == null || C.call(k, S) : e.setBuilderContextSignal((w) => ({
|
|
3543
|
+
...w,
|
|
3528
3544
|
rootState: S
|
|
3529
3545
|
}));
|
|
3530
3546
|
}
|
|
3531
3547
|
function i(b) {
|
|
3532
|
-
var k, C,
|
|
3548
|
+
var k, C, w, N, M;
|
|
3533
3549
|
const S = {
|
|
3534
3550
|
...e.builderContextSignal.content,
|
|
3535
3551
|
...b,
|
|
@@ -3540,7 +3556,7 @@ function Jn(e) {
|
|
|
3540
3556
|
meta: {
|
|
3541
3557
|
...(C = e.builderContextSignal.content) == null ? void 0 : C.meta,
|
|
3542
3558
|
...b == null ? void 0 : b.meta,
|
|
3543
|
-
breakpoints: ((
|
|
3559
|
+
breakpoints: ((w = b == null ? void 0 : b.meta) == null ? void 0 : w.breakpoints) || ((M = (N = e.builderContextSignal.content) == null ? void 0 : N.meta) == null ? void 0 : M.breakpoints)
|
|
3544
3560
|
}
|
|
3545
3561
|
};
|
|
3546
3562
|
e.setBuilderContextSignal((F) => ({
|
|
@@ -3563,9 +3579,9 @@ function Jn(e) {
|
|
|
3563
3579
|
trustedHosts: e.trustedHosts,
|
|
3564
3580
|
callbacks: {
|
|
3565
3581
|
configureSdk: (S) => {
|
|
3566
|
-
var
|
|
3582
|
+
var w;
|
|
3567
3583
|
const { breakpoints: k, contentId: C } = S;
|
|
3568
|
-
!C || C !== ((
|
|
3584
|
+
!C || C !== ((w = e.builderContextSignal.content) == null ? void 0 : w.id) || k && i({
|
|
3569
3585
|
meta: {
|
|
3570
3586
|
breakpoints: k
|
|
3571
3587
|
}
|
|
@@ -3599,14 +3615,14 @@ function Jn(e) {
|
|
|
3599
3615
|
function p(b) {
|
|
3600
3616
|
var S, k;
|
|
3601
3617
|
if (e.builderContextSignal.content) {
|
|
3602
|
-
const C = (S = e.builderContextSignal.content) == null ? void 0 : S.testVariationId,
|
|
3618
|
+
const C = (S = e.builderContextSignal.content) == null ? void 0 : S.testVariationId, w = (k = e.builderContextSignal.content) == null ? void 0 : k.id;
|
|
3603
3619
|
he({
|
|
3604
3620
|
type: "click",
|
|
3605
3621
|
canTrack: X(e.canTrack),
|
|
3606
|
-
contentId:
|
|
3622
|
+
contentId: w,
|
|
3607
3623
|
apiKey: e.apiKey,
|
|
3608
|
-
variationId: C !==
|
|
3609
|
-
...
|
|
3624
|
+
variationId: C !== w ? C : void 0,
|
|
3625
|
+
...jn(b),
|
|
3610
3626
|
unique: !x
|
|
3611
3627
|
});
|
|
3612
3628
|
}
|
|
@@ -3615,11 +3631,11 @@ function Jn(e) {
|
|
|
3615
3631
|
function f() {
|
|
3616
3632
|
var S, k, C;
|
|
3617
3633
|
const b = (C = (k = (S = e.builderContextSignal.content) == null ? void 0 : S.data) == null ? void 0 : k.httpRequests) != null ? C : {};
|
|
3618
|
-
Object.entries(b).forEach(([
|
|
3619
|
-
if (!
|
|
3634
|
+
Object.entries(b).forEach(([w, N]) => {
|
|
3635
|
+
if (!N || g[w] || c[w] && !$())
|
|
3620
3636
|
return;
|
|
3621
|
-
g[
|
|
3622
|
-
const M =
|
|
3637
|
+
g[w] = !0;
|
|
3638
|
+
const M = N.replace(
|
|
3623
3639
|
/{{([^}]+)}}/g,
|
|
3624
3640
|
(F, qe) => String(
|
|
3625
3641
|
K({
|
|
@@ -3634,16 +3650,16 @@ function Jn(e) {
|
|
|
3634
3650
|
);
|
|
3635
3651
|
Ze(M).then((F) => F.json()).then((F) => {
|
|
3636
3652
|
n({
|
|
3637
|
-
[
|
|
3638
|
-
}), c[
|
|
3653
|
+
[w]: F
|
|
3654
|
+
}), c[w] = !0;
|
|
3639
3655
|
}).catch((F) => {
|
|
3640
|
-
console.error("error fetching dynamic data",
|
|
3656
|
+
console.error("error fetching dynamic data", N, F);
|
|
3641
3657
|
}).finally(() => {
|
|
3642
|
-
g[
|
|
3658
|
+
g[w] = !1;
|
|
3643
3659
|
});
|
|
3644
3660
|
});
|
|
3645
3661
|
}
|
|
3646
|
-
function
|
|
3662
|
+
function R() {
|
|
3647
3663
|
$() && window.dispatchEvent(
|
|
3648
3664
|
new CustomEvent(
|
|
3649
3665
|
"builder:component:stateChange",
|
|
@@ -3674,27 +3690,27 @@ function Jn(e) {
|
|
|
3674
3690
|
}), Object.values(
|
|
3675
3691
|
e.builderContextSignal.componentInfos
|
|
3676
3692
|
).forEach((C) => {
|
|
3677
|
-
var
|
|
3678
|
-
const
|
|
3679
|
-
(
|
|
3693
|
+
var N;
|
|
3694
|
+
const w = Qe(C);
|
|
3695
|
+
(N = window.parent) == null || N.postMessage(w, "*");
|
|
3680
3696
|
}), window.addEventListener(
|
|
3681
3697
|
"builder:component:stateChangeListenerActivated",
|
|
3682
|
-
|
|
3698
|
+
R
|
|
3683
3699
|
)), e.builderContextSignal.content && X(e.canTrack)) {
|
|
3684
|
-
const C = (b = e.builderContextSignal.content) == null ? void 0 : b.testVariationId,
|
|
3700
|
+
const C = (b = e.builderContextSignal.content) == null ? void 0 : b.testVariationId, w = (S = e.builderContextSignal.content) == null ? void 0 : S.id, N = e.apiKey;
|
|
3685
3701
|
he({
|
|
3686
3702
|
type: "impression",
|
|
3687
3703
|
canTrack: !0,
|
|
3688
|
-
contentId:
|
|
3689
|
-
apiKey:
|
|
3690
|
-
variationId: C !==
|
|
3704
|
+
contentId: w,
|
|
3705
|
+
apiKey: N,
|
|
3706
|
+
variationId: C !== w ? C : void 0
|
|
3691
3707
|
});
|
|
3692
3708
|
}
|
|
3693
3709
|
if (Re() && !$()) {
|
|
3694
|
-
const C = new URL(location.href).searchParams,
|
|
3695
|
-
`builder.overrides.${
|
|
3710
|
+
const C = new URL(location.href).searchParams, w = C.get("builder.preview"), N = C.get(
|
|
3711
|
+
`builder.overrides.${w}`
|
|
3696
3712
|
), M = C.get("apiKey") || C.get("builder.space");
|
|
3697
|
-
|
|
3713
|
+
w === e.model && M === e.apiKey && (!e.content || N === e.content.id) && Ee({
|
|
3698
3714
|
model: e.model,
|
|
3699
3715
|
apiKey: e.apiKey,
|
|
3700
3716
|
apiVersion: e.builderContextSignal.apiVersion
|
|
@@ -3706,7 +3722,7 @@ function Jn(e) {
|
|
|
3706
3722
|
}, []), P(() => {
|
|
3707
3723
|
e.apiKey || Z.error(
|
|
3708
3724
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
3709
|
-
), d(), f(),
|
|
3725
|
+
), d(), f(), R();
|
|
3710
3726
|
}, []), P(() => {
|
|
3711
3727
|
e.content && i(e.content);
|
|
3712
3728
|
}, [e.content]), P(() => {
|
|
@@ -3714,7 +3730,7 @@ function Jn(e) {
|
|
|
3714
3730
|
}, [(A = (B = e.builderContextSignal.content) == null ? void 0 : B.data) == null ? void 0 : A.jsCode]), P(() => {
|
|
3715
3731
|
f();
|
|
3716
3732
|
}, [(v = (O = e.builderContextSignal.content) == null ? void 0 : O.data) == null ? void 0 : v.httpRequests]), P(() => {
|
|
3717
|
-
|
|
3733
|
+
R();
|
|
3718
3734
|
}, [e.builderContextSignal.rootState]), P(() => {
|
|
3719
3735
|
e.data && n(e.data);
|
|
3720
3736
|
}, [e.data]), P(() => {
|
|
@@ -3724,35 +3740,35 @@ function Jn(e) {
|
|
|
3724
3740
|
}, [e.locale]), P(() => () => {
|
|
3725
3741
|
H() && (window.removeEventListener("message", s), window.removeEventListener(
|
|
3726
3742
|
"builder:component:stateChangeListenerActivated",
|
|
3727
|
-
|
|
3743
|
+
R
|
|
3728
3744
|
));
|
|
3729
3745
|
}, []), /* @__PURE__ */ l(ue.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ l(
|
|
3730
3746
|
a,
|
|
3731
3747
|
{
|
|
3732
3748
|
ref: t,
|
|
3733
3749
|
onClick: (b) => p(b),
|
|
3734
|
-
"builder-content-id": (
|
|
3750
|
+
"builder-content-id": (E = e.builderContextSignal.content) == null ? void 0 : E.id,
|
|
3735
3751
|
"builder-model": e.model,
|
|
3736
3752
|
...o(),
|
|
3737
3753
|
...e.contentWrapperProps,
|
|
3738
|
-
className:
|
|
3739
|
-
((
|
|
3754
|
+
className: Jn(
|
|
3755
|
+
((W = e.content) == null ? void 0 : W.testVariationId) || ((y = e.content) == null ? void 0 : y.id)
|
|
3740
3756
|
),
|
|
3741
3757
|
children: e.children
|
|
3742
3758
|
}
|
|
3743
3759
|
) : null });
|
|
3744
3760
|
}
|
|
3745
|
-
function
|
|
3761
|
+
function Gn(e) {
|
|
3746
3762
|
const [t, n] = T(
|
|
3747
3763
|
() => `
|
|
3748
|
-
${
|
|
3764
|
+
${qn({
|
|
3749
3765
|
cssCode: e.cssCode,
|
|
3750
3766
|
contentId: e.contentId
|
|
3751
3767
|
})}
|
|
3752
|
-
${
|
|
3768
|
+
${Kn({
|
|
3753
3769
|
customFonts: e.customFonts
|
|
3754
3770
|
})}
|
|
3755
|
-
${
|
|
3771
|
+
${zn(e.isNestedRender)}
|
|
3756
3772
|
`.trim()
|
|
3757
3773
|
);
|
|
3758
3774
|
return /* @__PURE__ */ l(
|
|
@@ -3764,7 +3780,7 @@ ${_n(e.isNestedRender)}
|
|
|
3764
3780
|
}
|
|
3765
3781
|
);
|
|
3766
3782
|
}
|
|
3767
|
-
const
|
|
3783
|
+
const Qn = ({
|
|
3768
3784
|
content: e,
|
|
3769
3785
|
data: t,
|
|
3770
3786
|
locale: n
|
|
@@ -3781,7 +3797,7 @@ const Gn = ({
|
|
|
3781
3797
|
locale: n
|
|
3782
3798
|
} : {}
|
|
3783
3799
|
};
|
|
3784
|
-
},
|
|
3800
|
+
}, Xn = ({
|
|
3785
3801
|
content: e,
|
|
3786
3802
|
data: t
|
|
3787
3803
|
}) => e ? {
|
|
@@ -3797,7 +3813,7 @@ function we(e) {
|
|
|
3797
3813
|
const [t, n] = T(
|
|
3798
3814
|
() => {
|
|
3799
3815
|
var p, f;
|
|
3800
|
-
return
|
|
3816
|
+
return On({
|
|
3801
3817
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3802
3818
|
variationId: (p = e.content) == null ? void 0 : p.testVariationId,
|
|
3803
3819
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
@@ -3818,10 +3834,10 @@ function we(e) {
|
|
|
3818
3834
|
...Ce(),
|
|
3819
3835
|
...((p = e.customComponents) == null ? void 0 : p.filter(({ models: f }) => !(f != null && f.length) || !e.model ? !0 : f.includes(e.model))) || []
|
|
3820
3836
|
].reduce(
|
|
3821
|
-
(f, { component:
|
|
3837
|
+
(f, { component: R, ...B }) => ({
|
|
3822
3838
|
...f,
|
|
3823
3839
|
[B.name]: {
|
|
3824
|
-
component:
|
|
3840
|
+
component: R,
|
|
3825
3841
|
...ge(B)
|
|
3826
3842
|
}
|
|
3827
3843
|
}),
|
|
@@ -3831,12 +3847,12 @@ function we(e) {
|
|
|
3831
3847
|
), [r, s] = T(() => {
|
|
3832
3848
|
var p;
|
|
3833
3849
|
return {
|
|
3834
|
-
content:
|
|
3850
|
+
content: Xn({
|
|
3835
3851
|
content: e.content,
|
|
3836
3852
|
data: e.data
|
|
3837
3853
|
}),
|
|
3838
3854
|
localState: void 0,
|
|
3839
|
-
rootState:
|
|
3855
|
+
rootState: Qn({
|
|
3840
3856
|
content: e.content,
|
|
3841
3857
|
data: e.data,
|
|
3842
3858
|
locale: e.locale
|
|
@@ -3850,7 +3866,7 @@ function we(e) {
|
|
|
3850
3866
|
...Ce(),
|
|
3851
3867
|
...((p = e.customComponents) == null ? void 0 : p.filter(({ models: f }) => !(f != null && f.length) || !e.model ? !0 : f.includes(e.model))) || []
|
|
3852
3868
|
].reduce(
|
|
3853
|
-
(f, { component:
|
|
3869
|
+
(f, { component: R, ...B }) => ({
|
|
3854
3870
|
...f,
|
|
3855
3871
|
[B.name]: ge(B)
|
|
3856
3872
|
}),
|
|
@@ -3869,7 +3885,7 @@ function we(e) {
|
|
|
3869
3885
|
registeredComponents: o
|
|
3870
3886
|
},
|
|
3871
3887
|
children: /* @__PURE__ */ V(
|
|
3872
|
-
|
|
3888
|
+
Yn,
|
|
3873
3889
|
{
|
|
3874
3890
|
nonce: e.nonce,
|
|
3875
3891
|
content: e.content,
|
|
@@ -3896,7 +3912,7 @@ function we(e) {
|
|
|
3896
3912
|
}
|
|
3897
3913
|
) : null,
|
|
3898
3914
|
/* @__PURE__ */ l(
|
|
3899
|
-
|
|
3915
|
+
Gn,
|
|
3900
3916
|
{
|
|
3901
3917
|
nonce: e.nonce || "",
|
|
3902
3918
|
isNestedRender: e.isNestedRender,
|
|
@@ -3920,17 +3936,17 @@ function we(e) {
|
|
|
3920
3936
|
}
|
|
3921
3937
|
);
|
|
3922
3938
|
}
|
|
3923
|
-
function
|
|
3939
|
+
function Zn(e) {
|
|
3924
3940
|
var r;
|
|
3925
3941
|
const [t, n] = T(
|
|
3926
|
-
() =>
|
|
3942
|
+
() => Fn({
|
|
3927
3943
|
canTrack: X(e.canTrack),
|
|
3928
3944
|
content: e.content
|
|
3929
3945
|
})
|
|
3930
3946
|
);
|
|
3931
3947
|
function i() {
|
|
3932
3948
|
var s;
|
|
3933
|
-
return
|
|
3949
|
+
return Ln(
|
|
3934
3950
|
G(e.content).map((d) => ({
|
|
3935
3951
|
id: d.testVariationId,
|
|
3936
3952
|
testRatio: d.testRatio
|
|
@@ -3952,16 +3968,16 @@ function Xn(e) {
|
|
|
3952
3968
|
});
|
|
3953
3969
|
}
|
|
3954
3970
|
return P(() => {
|
|
3955
|
-
}, []), /* @__PURE__ */ V(
|
|
3971
|
+
}, []), /* @__PURE__ */ V(I, { children: [
|
|
3956
3972
|
!e.isNestedRender && U !== "reactNative" ? /* @__PURE__ */ l(
|
|
3957
3973
|
ce,
|
|
3958
3974
|
{
|
|
3959
3975
|
id: "builderio-init-variants-fns",
|
|
3960
|
-
scriptStr:
|
|
3976
|
+
scriptStr: Dn(),
|
|
3961
3977
|
nonce: e.nonce || ""
|
|
3962
3978
|
}
|
|
3963
3979
|
) : null,
|
|
3964
|
-
t ? /* @__PURE__ */ V(
|
|
3980
|
+
t ? /* @__PURE__ */ V(I, { children: [
|
|
3965
3981
|
/* @__PURE__ */ l(
|
|
3966
3982
|
te,
|
|
3967
3983
|
{
|
|
@@ -4032,7 +4048,7 @@ function Xn(e) {
|
|
|
4032
4048
|
)
|
|
4033
4049
|
] });
|
|
4034
4050
|
}
|
|
4035
|
-
const
|
|
4051
|
+
const ei = async ({
|
|
4036
4052
|
builderContextValue: e,
|
|
4037
4053
|
symbol: t
|
|
4038
4054
|
}) => {
|
|
@@ -4051,7 +4067,7 @@ const Zn = async ({
|
|
|
4051
4067
|
Z.error("Could not fetch symbol content: ", n);
|
|
4052
4068
|
});
|
|
4053
4069
|
};
|
|
4054
|
-
function
|
|
4070
|
+
function ti(e) {
|
|
4055
4071
|
var s, d, c, u;
|
|
4056
4072
|
function t() {
|
|
4057
4073
|
return "div";
|
|
@@ -4073,7 +4089,7 @@ function ei(e) {
|
|
|
4073
4089
|
return (g = e.symbol) == null ? void 0 : g.content;
|
|
4074
4090
|
});
|
|
4075
4091
|
function r() {
|
|
4076
|
-
o ||
|
|
4092
|
+
o || ei({
|
|
4077
4093
|
symbol: e.symbol,
|
|
4078
4094
|
builderContextValue: e.builderContext
|
|
4079
4095
|
}).then((g) => {
|
|
@@ -4084,7 +4100,7 @@ function ei(e) {
|
|
|
4084
4100
|
}, []), P(() => {
|
|
4085
4101
|
r();
|
|
4086
4102
|
}, [e.symbol]), /* @__PURE__ */ l("div", { ...e.attributes, className: i(), children: /* @__PURE__ */ l(
|
|
4087
|
-
|
|
4103
|
+
Zn,
|
|
4088
4104
|
{
|
|
4089
4105
|
nonce: e.builderContext.nonce,
|
|
4090
4106
|
isNestedRender: !0,
|
|
@@ -4113,12 +4129,12 @@ export {
|
|
|
4113
4129
|
D as Blocks,
|
|
4114
4130
|
ue as BuilderContext,
|
|
4115
4131
|
it as Button,
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4132
|
+
jt as Columns,
|
|
4133
|
+
Zn as Content,
|
|
4134
|
+
Ht as Fragment,
|
|
4135
|
+
_t as Image,
|
|
4136
|
+
zt as Section,
|
|
4137
|
+
ti as Symbol,
|
|
4138
|
+
sn as Text,
|
|
4139
|
+
Vn as Video
|
|
4124
4140
|
};
|