@builder.io/sdk-react 2.0.26 → 2.0.28
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 +14 -14
- package/lib/browser/blocks-exports.mjs +366 -362
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-f2c8ba91.cjs → server-entry-7260e494.cjs} +1 -1
- package/lib/browser/{server-entry-720336f2.js → server-entry-ffd47885.js} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-0a97d42c.js → accordion-616460c1.js} +1 -1
- package/lib/edge/{accordion-e8975004.cjs → accordion-7ef6a928.cjs} +1 -1
- package/lib/edge/{blocks-13ac260d.cjs → blocks-896a56b0.cjs} +1 -1
- package/lib/edge/{blocks-79d4ca8d.js → blocks-dd91ae28.js} +3 -3
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-a01a8a04.cjs → button-1fa8b647.cjs} +1 -1
- package/lib/edge/{button-17d873fa.js → button-f917a1c0.js} +2 -2
- package/lib/edge/columns-5756d7b8.cjs +28 -0
- package/lib/edge/{columns-b8bb106c.js → columns-dacb342b.js} +67 -63
- package/lib/edge/{content-variants-32296e48.cjs → content-variants-afc4a718.cjs} +1 -1
- package/lib/edge/{content-variants-6560c3c8.js → content-variants-cd80b703.js} +11 -11
- package/lib/edge/{evaluate-1c58cb0f.js → evaluate-17c2cadd.js} +1 -1
- package/lib/edge/{evaluate-92fb6615.cjs → evaluate-2fcda9ec.cjs} +1 -1
- package/lib/edge/{form-d8609725.js → form-dc7f56c9.js} +4 -4
- package/lib/edge/{form-11832191.cjs → form-efce5c78.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-e5b5610b.cjs → get-class-prop-name-2ce20e98.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-1dd91564.js → get-class-prop-name-5437ca23.js} +1 -1
- package/lib/edge/{img-d044ae25.cjs → img-35a1343f.cjs} +1 -1
- package/lib/edge/{img-bf66df07.js → img-d187da14.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-ab613ef1.js → input-38f565ce.js} +1 -1
- package/lib/edge/{input-9340f0ba.cjs → input-9a6498fd.cjs} +1 -1
- package/lib/edge/{select-cda5352c.cjs → select-135b7397.cjs} +1 -1
- package/lib/edge/{select-c9f8f72d.js → select-6cb0b4b7.js} +1 -1
- package/lib/edge/{server-entry-c809a8ff.js → server-entry-216eb1bf.js} +1 -1
- package/lib/edge/{server-entry-4d4f2c4b.cjs → server-entry-3e6518b6.cjs} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-b66c52dc.cjs → slot-b0728030.cjs} +1 -1
- package/lib/edge/{slot-69765c02.js → slot-d692126c.js} +4 -4
- package/lib/edge/{symbol-1b3f8d1f.cjs → symbol-0ac2655e.cjs} +1 -1
- package/lib/edge/{symbol-335cfb65.js → symbol-df30241a.js} +2 -2
- package/lib/edge/{tabs-bf6cc6f2.cjs → tabs-47ed7dde.cjs} +1 -1
- package/lib/edge/{tabs-629e6a1f.js → tabs-b925777d.js} +4 -4
- package/lib/edge/{text-ff5a8f9b.cjs → text-0f85a76c.cjs} +1 -1
- package/lib/edge/{text-2d218073.js → text-337389ba.js} +2 -2
- package/lib/node/blocks-exports.cjs +25 -25
- package/lib/node/blocks-exports.mjs +372 -367
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +26 -25
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +6 -5
- package/lib/node/{server-entry-ac34c1ae.cjs → server-entry-3e017173.cjs} +1 -1
- package/lib/node/{server-entry-12c82a21.js → server-entry-ca0dcb45.js} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-94a10439.js → setIvm-2100f4f5.js} +45 -57
- package/lib/node/setIvm-2d47478e.cjs +48 -0
- package/lib/node/setIvm.cjs +1 -0
- package/lib/node/setIvm.mjs +5 -0
- package/lib/node/should-force-browser-runtime-in-node-a77d7cfc.js +17 -0
- package/lib/node/should-force-browser-runtime-in-node-fd3ca2a8.cjs +1 -0
- package/package.json +8 -2
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/functions/evaluate/node-runtime/setIvm.d.ts +1 -0
- package/lib/edge/columns-c4c26bf0.cjs +0 -28
- package/lib/node/should-force-browser-runtime-in-node-1e38f5d9.cjs +0 -48
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as l, Fragment as
|
|
3
|
-
import { TARGET as D, isBrowser as _, logger as ne, checkIsDefined as Z, isPreviewing as xe, isEditing as N, registerInsertMenu as Le, setupBrowserForEditing as Oe, createRegisterComponentMessage as Ue, getDefaultCanTrack as q, _track as le, fetchOneEntry as ve, createEditorListener as He, serializeIncludingFunctions as se, handleABTestingSync as je } from "./server-entry-
|
|
4
|
-
import { createContext as Se, useEffect as B, useState as
|
|
5
|
-
import { getFunctionArguments as Me, flattenState as _e,
|
|
2
|
+
import { jsx as l, Fragment as T, jsxs as V } from "react/jsx-runtime";
|
|
3
|
+
import { TARGET as D, isBrowser as _, logger as ne, checkIsDefined as Z, isPreviewing as xe, isEditing as N, registerInsertMenu as Le, setupBrowserForEditing as Oe, createRegisterComponentMessage as Ue, getDefaultCanTrack as q, _track as le, fetchOneEntry as ve, createEditorListener as He, serializeIncludingFunctions as se, handleABTestingSync as je } from "./server-entry-ca0dcb45.js";
|
|
4
|
+
import { createContext as Se, useEffect as B, useState as w, useRef as $, useContext as ce, createElement as ke } from "react";
|
|
5
|
+
import { getFunctionArguments as Me, flattenState as _e, runInNode as qe, parseCode as Ke, getBuilderGlobals as ze, set as Ce, fastClone as ie } from "./setIvm-2100f4f5.js";
|
|
6
|
+
import { shouldForceBrowserRuntimeInNode as Je } from "./should-force-browser-runtime-in-node-a77d7cfc.js";
|
|
6
7
|
const Ge = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Ye = (e) => typeof e == "string" && Ge.has(e.toLowerCase());
|
|
7
8
|
function oe(e) {
|
|
8
|
-
return /* @__PURE__ */ l(
|
|
9
|
+
return /* @__PURE__ */ l(T, { children: Ye(e.TagName) ? /* @__PURE__ */ l(T, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ l(T, { 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 }) }) });
|
|
9
10
|
}
|
|
10
11
|
const U = () => {
|
|
11
12
|
switch (D) {
|
|
@@ -96,9 +97,9 @@ const Ie = (e, t, n) => {
|
|
|
96
97
|
})
|
|
97
98
|
});
|
|
98
99
|
return new Function(...s.map(([d]) => d), e)(...s.map(([, d]) => d));
|
|
99
|
-
}, tt = (e) => _() ||
|
|
100
|
+
}, tt = (e) => _() || Je({
|
|
100
101
|
shouldLogWarning: !0
|
|
101
|
-
}) ? et(e) :
|
|
102
|
+
}) ? et(e) : qe(e), nt = /^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/, it = /(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/, ot = (e) => {
|
|
102
103
|
var t, n, i, o, a, r;
|
|
103
104
|
return ((i = (n = (t = nt.exec(e.trim())) == null ? void 0 : t.groups) == null ? void 0 : n.getPath) == null ? void 0 : i.slice(1)) || ((r = (a = (o = it.exec(e.trim())) == null ? void 0 : o.groups) == null ? void 0 : a.getPath) == null ? void 0 : r.slice(1));
|
|
104
105
|
};
|
|
@@ -120,10 +121,10 @@ function L({
|
|
|
120
121
|
...n
|
|
121
122
|
}, s);
|
|
122
123
|
const d = {
|
|
123
|
-
code:
|
|
124
|
+
code: Ke(e, {
|
|
124
125
|
isExpression: r
|
|
125
126
|
}),
|
|
126
|
-
builder:
|
|
127
|
+
builder: ze(),
|
|
127
128
|
context: t,
|
|
128
129
|
event: a,
|
|
129
130
|
rootSetState: o,
|
|
@@ -300,8 +301,8 @@ function mt(e) {
|
|
|
300
301
|
leading: !1
|
|
301
302
|
});
|
|
302
303
|
function s(h) {
|
|
303
|
-
const
|
|
304
|
-
return
|
|
304
|
+
const g = h.getBoundingClientRect(), m = window.innerHeight, f = (e.thresholdPercent || 0) / 100 * m;
|
|
305
|
+
return g.bottom > f && g.top < m - f;
|
|
305
306
|
}
|
|
306
307
|
const d = e.steps[0].styles;
|
|
307
308
|
function c() {
|
|
@@ -484,16 +485,16 @@ function kt(e) {
|
|
|
484
485
|
return Z(i.hide) ? !i.hide : Z(i.show) ? i.show : !0;
|
|
485
486
|
}
|
|
486
487
|
function n() {
|
|
487
|
-
var
|
|
488
|
+
var S, p, b;
|
|
488
489
|
const i = e.block, o = i.responsiveStyles, a = e.context.content, r = Ae(
|
|
489
|
-
((
|
|
490
|
+
((S = a == null ? void 0 : a.meta) == null ? void 0 : S.breakpoints) || {}
|
|
490
491
|
), s = o == null ? void 0 : o.large, d = o == null ? void 0 : o.medium, c = o == null ? void 0 : o.small, h = i.id;
|
|
491
492
|
if (!h)
|
|
492
493
|
return "";
|
|
493
|
-
const
|
|
494
|
+
const g = s ? j({
|
|
494
495
|
className: h,
|
|
495
496
|
styles: s
|
|
496
|
-
}) : "",
|
|
497
|
+
}) : "", m = d ? j({
|
|
497
498
|
className: h,
|
|
498
499
|
styles: d,
|
|
499
500
|
mediaQuery: de(
|
|
@@ -507,29 +508,29 @@ function kt(e) {
|
|
|
507
508
|
"small",
|
|
508
509
|
r
|
|
509
510
|
)
|
|
510
|
-
}) : "",
|
|
511
|
-
let
|
|
512
|
-
if (
|
|
513
|
-
const
|
|
514
|
-
|
|
511
|
+
}) : "", f = i.animations && i.animations.find((x) => x.trigger === "hover");
|
|
512
|
+
let k = "";
|
|
513
|
+
if (f) {
|
|
514
|
+
const x = ((b = (p = f.steps) == null ? void 0 : p[1]) == null ? void 0 : b.styles) || {};
|
|
515
|
+
k = j({
|
|
515
516
|
className: `${h}:hover`,
|
|
516
517
|
styles: {
|
|
517
|
-
...
|
|
518
|
-
transition: `all ${
|
|
519
|
-
|
|
518
|
+
...x,
|
|
519
|
+
transition: `all ${f.duration}s ${K(
|
|
520
|
+
f.easing
|
|
520
521
|
)}`,
|
|
521
|
-
transitionDelay:
|
|
522
|
+
transitionDelay: f.delay ? `${f.delay}s` : "0s"
|
|
522
523
|
}
|
|
523
524
|
}) || "";
|
|
524
525
|
}
|
|
525
526
|
return [
|
|
526
|
-
|
|
527
|
-
|
|
527
|
+
g,
|
|
528
|
+
m,
|
|
528
529
|
v,
|
|
529
|
-
|
|
530
|
+
k
|
|
530
531
|
].join(" ");
|
|
531
532
|
}
|
|
532
|
-
return /* @__PURE__ */ l(
|
|
533
|
+
return /* @__PURE__ */ l(T, { children: n() && t() ? /* @__PURE__ */ l(T, { children: /* @__PURE__ */ l(
|
|
533
534
|
z,
|
|
534
535
|
{
|
|
535
536
|
id: "builderio-block",
|
|
@@ -623,7 +624,7 @@ function Rt(e) {
|
|
|
623
624
|
}
|
|
624
625
|
function Pt(e) {
|
|
625
626
|
return B(() => {
|
|
626
|
-
}, []), /* @__PURE__ */ l(
|
|
627
|
+
}, []), /* @__PURE__ */ l(T, { children: e.children });
|
|
627
628
|
}
|
|
628
629
|
function Bt(e) {
|
|
629
630
|
function t() {
|
|
@@ -641,7 +642,7 @@ function Bt(e) {
|
|
|
641
642
|
})
|
|
642
643
|
} : {};
|
|
643
644
|
}
|
|
644
|
-
return /* @__PURE__ */ l(
|
|
645
|
+
return /* @__PURE__ */ l(T, { children: e.Wrapper.load ? /* @__PURE__ */ l(T, { children: /* @__PURE__ */ l(
|
|
645
646
|
Pt,
|
|
646
647
|
{
|
|
647
648
|
load: e.Wrapper.load,
|
|
@@ -684,10 +685,10 @@ const Vt = ({
|
|
|
684
685
|
};
|
|
685
686
|
function ue(e) {
|
|
686
687
|
var i;
|
|
687
|
-
const [t, n] =
|
|
688
|
+
const [t, n] = w(
|
|
688
689
|
() => e.isInteractive ? Bt : e.componentRef
|
|
689
690
|
);
|
|
690
|
-
return /* @__PURE__ */ l(
|
|
691
|
+
return /* @__PURE__ */ l(T, { children: e.componentRef ? /* @__PURE__ */ l(T, { children: /* @__PURE__ */ l(
|
|
691
692
|
t,
|
|
692
693
|
{
|
|
693
694
|
...Vt({
|
|
@@ -714,7 +715,7 @@ function ue(e) {
|
|
|
714
715
|
) }) : null });
|
|
715
716
|
}
|
|
716
717
|
function me(e) {
|
|
717
|
-
const [t, n] =
|
|
718
|
+
const [t, n] = w(() => e.repeatContext);
|
|
718
719
|
return /* @__PURE__ */ l(ae.Provider, { value: t, children: /* @__PURE__ */ l(
|
|
719
720
|
H,
|
|
720
721
|
{
|
|
@@ -726,22 +727,22 @@ function me(e) {
|
|
|
726
727
|
) });
|
|
727
728
|
}
|
|
728
729
|
function H(e) {
|
|
729
|
-
var h,
|
|
730
|
+
var h, g, m, v;
|
|
730
731
|
function t() {
|
|
731
732
|
return pt({
|
|
732
733
|
block: e.block,
|
|
733
734
|
context: e.context
|
|
734
735
|
});
|
|
735
736
|
}
|
|
736
|
-
const [n, i] =
|
|
737
|
+
const [n, i] = w(() => ({
|
|
737
738
|
value: null,
|
|
738
739
|
update: !1
|
|
739
740
|
}));
|
|
740
741
|
function o() {
|
|
741
|
-
var
|
|
742
|
+
var k;
|
|
742
743
|
if (n.value && !n.update && !xe())
|
|
743
744
|
return n.value;
|
|
744
|
-
const
|
|
745
|
+
const f = (k = e.block.repeat) != null && k.collection ? e.block : st({
|
|
745
746
|
block: e.block,
|
|
746
747
|
localState: e.context.localState,
|
|
747
748
|
rootState: e.context.rootState,
|
|
@@ -749,7 +750,7 @@ function H(e) {
|
|
|
749
750
|
context: e.context.context,
|
|
750
751
|
shouldEvaluateBindings: !0
|
|
751
752
|
});
|
|
752
|
-
return n.value =
|
|
753
|
+
return n.value = f, n.update = !1, f;
|
|
753
754
|
}
|
|
754
755
|
function a() {
|
|
755
756
|
return bt({
|
|
@@ -758,25 +759,25 @@ function H(e) {
|
|
|
758
759
|
});
|
|
759
760
|
}
|
|
760
761
|
function r() {
|
|
761
|
-
var
|
|
762
|
-
return e.block.tagName === "a" || ((
|
|
762
|
+
var k;
|
|
763
|
+
return e.block.tagName === "a" || ((k = o().properties) == null ? void 0 : k.href) || o().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
763
764
|
}
|
|
764
765
|
function s() {
|
|
765
|
-
var
|
|
766
|
-
if ((
|
|
767
|
-
return !!((
|
|
768
|
-
const
|
|
769
|
-
return ("show" in o() ? o().show : !0) && !
|
|
766
|
+
var S, p;
|
|
767
|
+
if ((S = e.block.repeat) != null && S.collection)
|
|
768
|
+
return !!((p = t == null ? void 0 : t()) != null && p.length);
|
|
769
|
+
const f = "hide" in o() ? o().hide : !1;
|
|
770
|
+
return ("show" in o() ? o().show : !0) && !f;
|
|
770
771
|
}
|
|
771
772
|
function d() {
|
|
772
|
-
var
|
|
773
|
-
return !((
|
|
773
|
+
var k, S;
|
|
774
|
+
return !((k = a == null ? void 0 : a()) != null && k.component) && !t() ? (S = o().children) != null ? S : [] : [];
|
|
774
775
|
}
|
|
775
776
|
function c() {
|
|
776
|
-
var
|
|
777
|
+
var f, k, S, p;
|
|
777
778
|
return {
|
|
778
|
-
blockChildren: (
|
|
779
|
-
componentRef: (
|
|
779
|
+
blockChildren: (f = o().children) != null ? f : [],
|
|
780
|
+
componentRef: (k = a == null ? void 0 : a()) == null ? void 0 : k.component,
|
|
780
781
|
componentOptions: {
|
|
781
782
|
...Xe(o()),
|
|
782
783
|
...vt(a(), o()),
|
|
@@ -791,31 +792,31 @@ function H(e) {
|
|
|
791
792
|
linkComponent: e.linkComponent,
|
|
792
793
|
registeredComponents: e.registeredComponents,
|
|
793
794
|
builderBlock: o(),
|
|
794
|
-
includeBlockProps: ((
|
|
795
|
-
isInteractive: !((
|
|
795
|
+
includeBlockProps: ((S = a == null ? void 0 : a()) == null ? void 0 : S.noWrap) === !0,
|
|
796
|
+
isInteractive: !((p = a == null ? void 0 : a()) != null && p.isRSC && D === "rsc")
|
|
796
797
|
};
|
|
797
798
|
}
|
|
798
799
|
return B(() => {
|
|
799
|
-
const
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
...
|
|
803
|
-
elementId:
|
|
800
|
+
const f = o().id, k = o().animations;
|
|
801
|
+
k && f && dt(
|
|
802
|
+
k.map((S) => ({
|
|
803
|
+
...S,
|
|
804
|
+
elementId: f
|
|
804
805
|
}))
|
|
805
806
|
);
|
|
806
807
|
}, []), B(() => {
|
|
807
808
|
n.update = !0;
|
|
808
|
-
}), /* @__PURE__ */ l(
|
|
809
|
+
}), /* @__PURE__ */ l(T, { children: s() ? /* @__PURE__ */ V(T, { children: [
|
|
809
810
|
/* @__PURE__ */ l(kt, { block: o(), context: e.context }),
|
|
810
|
-
(h = a == null ? void 0 : a()) != null && h.noWrap ? t() ? /* @__PURE__ */ l(
|
|
811
|
+
(h = a == null ? void 0 : a()) != null && h.noWrap ? t() ? /* @__PURE__ */ l(T, { children: (v = t()) == null ? void 0 : v.map((f, k) => /* @__PURE__ */ l(
|
|
811
812
|
me,
|
|
812
813
|
{
|
|
813
|
-
repeatContext:
|
|
814
|
-
block:
|
|
814
|
+
repeatContext: f.context,
|
|
815
|
+
block: f.block,
|
|
815
816
|
registeredComponents: e.registeredComponents,
|
|
816
817
|
linkComponent: e.linkComponent
|
|
817
818
|
},
|
|
818
|
-
|
|
819
|
+
k
|
|
819
820
|
)) }) : /* @__PURE__ */ l(
|
|
820
821
|
ue,
|
|
821
822
|
{
|
|
@@ -829,15 +830,15 @@ function H(e) {
|
|
|
829
830
|
includeBlockProps: c().includeBlockProps,
|
|
830
831
|
isInteractive: c().isInteractive
|
|
831
832
|
}
|
|
832
|
-
) : /* @__PURE__ */ l(
|
|
833
|
+
) : /* @__PURE__ */ l(T, { children: t() ? /* @__PURE__ */ l(T, { children: (m = t()) == null ? void 0 : m.map((f, k) => /* @__PURE__ */ l(
|
|
833
834
|
me,
|
|
834
835
|
{
|
|
835
|
-
repeatContext:
|
|
836
|
-
block:
|
|
836
|
+
repeatContext: f.context,
|
|
837
|
+
block: f.block,
|
|
837
838
|
registeredComponents: e.registeredComponents,
|
|
838
839
|
linkComponent: e.linkComponent
|
|
839
840
|
},
|
|
840
|
-
|
|
841
|
+
k
|
|
841
842
|
)) }) : /* @__PURE__ */ V(
|
|
842
843
|
Rt,
|
|
843
844
|
{
|
|
@@ -859,15 +860,15 @@ function H(e) {
|
|
|
859
860
|
isInteractive: c().isInteractive
|
|
860
861
|
}
|
|
861
862
|
),
|
|
862
|
-
(
|
|
863
|
+
(g = d()) == null ? void 0 : g.map((f) => /* @__PURE__ */ l(
|
|
863
864
|
H,
|
|
864
865
|
{
|
|
865
|
-
block:
|
|
866
|
+
block: f,
|
|
866
867
|
registeredComponents: e.registeredComponents,
|
|
867
868
|
linkComponent: e.linkComponent,
|
|
868
869
|
context: e.context
|
|
869
870
|
},
|
|
870
|
-
|
|
871
|
+
f.id
|
|
871
872
|
))
|
|
872
873
|
]
|
|
873
874
|
}
|
|
@@ -911,7 +912,7 @@ function At(e) {
|
|
|
911
912
|
));
|
|
912
913
|
}
|
|
913
914
|
return B(() => {
|
|
914
|
-
}, []), /* @__PURE__ */ V(
|
|
915
|
+
}, []), /* @__PURE__ */ V(T, { children: [
|
|
915
916
|
/* @__PURE__ */ l(
|
|
916
917
|
e.BlocksWrapper,
|
|
917
918
|
{
|
|
@@ -947,7 +948,7 @@ function F(e) {
|
|
|
947
948
|
classNameProp: e.className,
|
|
948
949
|
BlocksWrapper: ((i = e.context) == null ? void 0 : i.BlocksWrapper) || (t == null ? void 0 : t.BlocksWrapper),
|
|
949
950
|
BlocksWrapperProps: ((o = e.context) == null ? void 0 : o.BlocksWrapperProps) || (t == null ? void 0 : t.BlocksWrapperProps),
|
|
950
|
-
children: e.blocks ? /* @__PURE__ */ l(
|
|
951
|
+
children: e.blocks ? /* @__PURE__ */ l(T, { children: (a = e.blocks) == null ? void 0 : a.map((r) => /* @__PURE__ */ l(
|
|
951
952
|
H,
|
|
952
953
|
{
|
|
953
954
|
block: r,
|
|
@@ -962,143 +963,147 @@ function F(e) {
|
|
|
962
963
|
}
|
|
963
964
|
const Wt = (e) => `builder-columns ${e}-breakpoints`;
|
|
964
965
|
function Nt(e) {
|
|
965
|
-
var k,
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
), [i, o] = T(() => e.columns || []), [a, r] = T(
|
|
969
|
-
() => e.stackColumnsAt || "tablet"
|
|
970
|
-
);
|
|
971
|
-
function s(m) {
|
|
972
|
-
return m.link ? e.builderLinkComponent || "a" : "div";
|
|
966
|
+
var k, S;
|
|
967
|
+
function t() {
|
|
968
|
+
return typeof e.space == "number" ? e.space || 0 : 20;
|
|
973
969
|
}
|
|
974
|
-
function
|
|
975
|
-
|
|
976
|
-
return ((y = i[m]) == null ? void 0 : y.width) || 100 / i.length;
|
|
970
|
+
function n() {
|
|
971
|
+
return e.columns || [];
|
|
977
972
|
}
|
|
978
|
-
function
|
|
979
|
-
|
|
980
|
-
|
|
973
|
+
function i() {
|
|
974
|
+
return e.stackColumnsAt || "tablet";
|
|
975
|
+
}
|
|
976
|
+
function o(p) {
|
|
977
|
+
return p.link ? e.builderLinkComponent || "a" : "div";
|
|
978
|
+
}
|
|
979
|
+
function a(p) {
|
|
980
|
+
var b;
|
|
981
|
+
return ((b = n()[p]) == null ? void 0 : b.width) || 100 / n().length;
|
|
982
|
+
}
|
|
983
|
+
function r(p) {
|
|
984
|
+
const b = a(p), x = t() * (n().length - 1) * (b / 100);
|
|
985
|
+
return `calc(${b}% - ${x}px)`;
|
|
981
986
|
}
|
|
982
|
-
function
|
|
983
|
-
stackedStyle:
|
|
984
|
-
desktopStyle:
|
|
987
|
+
function s({
|
|
988
|
+
stackedStyle: p,
|
|
989
|
+
desktopStyle: b
|
|
985
990
|
}) {
|
|
986
|
-
return
|
|
991
|
+
return i() === "tablet" ? p : b;
|
|
987
992
|
}
|
|
988
|
-
function
|
|
989
|
-
stackedStyle:
|
|
990
|
-
desktopStyle:
|
|
993
|
+
function d({
|
|
994
|
+
stackedStyle: p,
|
|
995
|
+
desktopStyle: b
|
|
991
996
|
}) {
|
|
992
|
-
return
|
|
997
|
+
return i() === "never" ? b : p;
|
|
993
998
|
}
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
function
|
|
999
|
+
function c() {
|
|
1000
|
+
return e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column";
|
|
1001
|
+
}
|
|
1002
|
+
function h() {
|
|
998
1003
|
return {
|
|
999
|
-
"--flex-dir":
|
|
1000
|
-
"--flex-dir-tablet":
|
|
1001
|
-
stackedStyle:
|
|
1004
|
+
"--flex-dir": c(),
|
|
1005
|
+
"--flex-dir-tablet": s({
|
|
1006
|
+
stackedStyle: c(),
|
|
1002
1007
|
desktopStyle: "row"
|
|
1003
1008
|
})
|
|
1004
1009
|
};
|
|
1005
1010
|
}
|
|
1006
|
-
function
|
|
1007
|
-
const
|
|
1011
|
+
function g(p) {
|
|
1012
|
+
const b = p === 0 ? 0 : t(), x = r(p), A = `${b}px`, C = "100%", I = 0;
|
|
1008
1013
|
return {
|
|
1009
1014
|
...{
|
|
1010
1015
|
display: "flex",
|
|
1011
1016
|
flexDirection: "column",
|
|
1012
1017
|
alignItems: "stretch"
|
|
1013
1018
|
},
|
|
1014
|
-
width:
|
|
1015
|
-
["marginLeft"]:
|
|
1016
|
-
"--column-width-mobile":
|
|
1017
|
-
stackedStyle:
|
|
1018
|
-
desktopStyle:
|
|
1019
|
+
width: x,
|
|
1020
|
+
["marginLeft"]: A,
|
|
1021
|
+
"--column-width-mobile": d({
|
|
1022
|
+
stackedStyle: C,
|
|
1023
|
+
desktopStyle: x
|
|
1019
1024
|
}),
|
|
1020
|
-
"--column-margin-left-mobile":
|
|
1021
|
-
stackedStyle:
|
|
1022
|
-
desktopStyle:
|
|
1025
|
+
"--column-margin-left-mobile": d({
|
|
1026
|
+
stackedStyle: I,
|
|
1027
|
+
desktopStyle: A
|
|
1023
1028
|
}),
|
|
1024
|
-
"--column-width-tablet":
|
|
1025
|
-
stackedStyle:
|
|
1026
|
-
desktopStyle:
|
|
1029
|
+
"--column-width-tablet": s({
|
|
1030
|
+
stackedStyle: C,
|
|
1031
|
+
desktopStyle: x
|
|
1027
1032
|
}),
|
|
1028
|
-
"--column-margin-left-tablet":
|
|
1029
|
-
stackedStyle:
|
|
1030
|
-
desktopStyle:
|
|
1033
|
+
"--column-margin-left-tablet": s({
|
|
1034
|
+
stackedStyle: I,
|
|
1035
|
+
desktopStyle: A
|
|
1031
1036
|
})
|
|
1032
1037
|
};
|
|
1033
1038
|
}
|
|
1034
|
-
function
|
|
1035
|
-
var
|
|
1039
|
+
function m(p) {
|
|
1040
|
+
var x, A;
|
|
1036
1041
|
return Ae(
|
|
1037
|
-
((
|
|
1038
|
-
)[
|
|
1042
|
+
((A = (x = e.builderContext.content) == null ? void 0 : x.meta) == null ? void 0 : A.breakpoints) || {}
|
|
1043
|
+
)[p].max;
|
|
1039
1044
|
}
|
|
1040
|
-
function
|
|
1041
|
-
const
|
|
1045
|
+
function v() {
|
|
1046
|
+
const p = `.${e.builderBlock.id}-breakpoints > .builder-column`;
|
|
1042
1047
|
return `
|
|
1043
|
-
@media (max-width: ${
|
|
1048
|
+
@media (max-width: ${m("medium")}px) {
|
|
1044
1049
|
.${e.builderBlock.id}-breakpoints {
|
|
1045
1050
|
flex-direction: var(--flex-dir-tablet);
|
|
1046
1051
|
align-items: stretch;
|
|
1047
1052
|
}
|
|
1048
1053
|
|
|
1049
|
-
${
|
|
1054
|
+
${p} {
|
|
1050
1055
|
width: var(--column-width-tablet) !important;
|
|
1051
1056
|
margin-left: var(--column-margin-left-tablet) !important;
|
|
1052
1057
|
}
|
|
1053
1058
|
}
|
|
1054
1059
|
|
|
1055
|
-
@media (max-width: ${
|
|
1060
|
+
@media (max-width: ${m("small")}px) {
|
|
1056
1061
|
.${e.builderBlock.id}-breakpoints {
|
|
1057
1062
|
flex-direction: var(--flex-dir);
|
|
1058
1063
|
align-items: stretch;
|
|
1059
1064
|
}
|
|
1060
1065
|
|
|
1061
|
-
${
|
|
1066
|
+
${p} {
|
|
1062
1067
|
width: var(--column-width-mobile) !important;
|
|
1063
1068
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
1064
1069
|
}
|
|
1065
1070
|
},
|
|
1066
1071
|
`;
|
|
1067
1072
|
}
|
|
1068
|
-
function
|
|
1073
|
+
function f(p, b) {
|
|
1069
1074
|
return {
|
|
1070
|
-
...
|
|
1071
|
-
href:
|
|
1075
|
+
...p.link ? {
|
|
1076
|
+
href: p.link
|
|
1072
1077
|
} : {},
|
|
1073
1078
|
[U()]: "builder-column",
|
|
1074
|
-
style: Be(
|
|
1079
|
+
style: Be(g(b))
|
|
1075
1080
|
};
|
|
1076
1081
|
}
|
|
1077
|
-
return /* @__PURE__ */ V(
|
|
1082
|
+
return /* @__PURE__ */ V(T, { children: [
|
|
1078
1083
|
/* @__PURE__ */ V(
|
|
1079
1084
|
"div",
|
|
1080
1085
|
{
|
|
1081
|
-
className: Wt((k = e.builderBlock) == null ? void 0 : k.id) + " div-
|
|
1082
|
-
style:
|
|
1086
|
+
className: Wt((k = e.builderBlock) == null ? void 0 : k.id) + " div-424156c6",
|
|
1087
|
+
style: h(),
|
|
1083
1088
|
children: [
|
|
1084
1089
|
/* @__PURE__ */ l(
|
|
1085
1090
|
z,
|
|
1086
1091
|
{
|
|
1087
1092
|
id: "builderio-columns",
|
|
1088
|
-
styles:
|
|
1093
|
+
styles: v(),
|
|
1089
1094
|
nonce: e.builderContext.nonce
|
|
1090
1095
|
}
|
|
1091
1096
|
),
|
|
1092
|
-
(
|
|
1097
|
+
(S = e.columns) == null ? void 0 : S.map((p, b) => /* @__PURE__ */ l(
|
|
1093
1098
|
oe,
|
|
1094
1099
|
{
|
|
1095
|
-
TagName:
|
|
1100
|
+
TagName: o(p),
|
|
1096
1101
|
actionAttributes: {},
|
|
1097
|
-
attributes:
|
|
1102
|
+
attributes: f(p, b),
|
|
1098
1103
|
children: /* @__PURE__ */ l(
|
|
1099
1104
|
F,
|
|
1100
1105
|
{
|
|
1101
|
-
path: `component.options.columns.${
|
|
1106
|
+
path: `component.options.columns.${b}.blocks`,
|
|
1102
1107
|
parent: e.builderBlock.id,
|
|
1103
1108
|
styleProp: {
|
|
1104
1109
|
flexGrow: "1"
|
|
@@ -1106,16 +1111,16 @@ function Nt(e) {
|
|
|
1106
1111
|
context: e.builderContext,
|
|
1107
1112
|
registeredComponents: e.builderComponents,
|
|
1108
1113
|
linkComponent: e.builderLinkComponent,
|
|
1109
|
-
blocks:
|
|
1114
|
+
blocks: p.blocks
|
|
1110
1115
|
}
|
|
1111
1116
|
)
|
|
1112
1117
|
},
|
|
1113
|
-
|
|
1118
|
+
b
|
|
1114
1119
|
))
|
|
1115
1120
|
]
|
|
1116
1121
|
}
|
|
1117
1122
|
),
|
|
1118
|
-
/* @__PURE__ */ l("style", { children: `.div-
|
|
1123
|
+
/* @__PURE__ */ l("style", { children: `.div-424156c6 {
|
|
1119
1124
|
display: flex;
|
|
1120
1125
|
line-height: normal;
|
|
1121
1126
|
}` })
|
|
@@ -1157,19 +1162,19 @@ function J(e) {
|
|
|
1157
1162
|
function Lt(e) {
|
|
1158
1163
|
var o, a, r, s, d, c;
|
|
1159
1164
|
function t() {
|
|
1160
|
-
var
|
|
1161
|
-
const
|
|
1162
|
-
if (!
|
|
1165
|
+
var m;
|
|
1166
|
+
const g = e.image || e.src;
|
|
1167
|
+
if (!g || // We can auto add srcset for cdn.builder.io and shopify
|
|
1163
1168
|
// images, otherwise you can supply this prop manually
|
|
1164
|
-
!(
|
|
1169
|
+
!(g.match(/builder\.io/) || g.match(/cdn\.shopify\.com/)))
|
|
1165
1170
|
return e.srcset;
|
|
1166
1171
|
if (!e.noWebp) {
|
|
1167
|
-
if (e.srcset && ((
|
|
1172
|
+
if (e.srcset && ((m = e.image) != null && m.includes("builder.io/api/v1/image"))) {
|
|
1168
1173
|
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
1169
|
-
return console.debug("Removed given srcset"), J(
|
|
1174
|
+
return console.debug("Removed given srcset"), J(g);
|
|
1170
1175
|
} else if (e.image && !e.srcset)
|
|
1171
|
-
return J(
|
|
1172
|
-
return J(
|
|
1176
|
+
return J(g);
|
|
1177
|
+
return J(g);
|
|
1173
1178
|
}
|
|
1174
1179
|
}
|
|
1175
1180
|
function n() {
|
|
@@ -1187,8 +1192,8 @@ function Lt(e) {
|
|
|
1187
1192
|
return e.aspectRatio ? h : void 0;
|
|
1188
1193
|
}
|
|
1189
1194
|
return B(() => {
|
|
1190
|
-
}, []), /* @__PURE__ */ V(
|
|
1191
|
-
/* @__PURE__ */ V(
|
|
1195
|
+
}, []), /* @__PURE__ */ V(T, { children: [
|
|
1196
|
+
/* @__PURE__ */ V(T, { children: [
|
|
1192
1197
|
/* @__PURE__ */ V("picture", { children: [
|
|
1193
1198
|
n() ? /* @__PURE__ */ l("source", { type: "image/webp", srcSet: n() }) : null,
|
|
1194
1199
|
/* @__PURE__ */ l(
|
|
@@ -1219,7 +1224,7 @@ function Lt(e) {
|
|
|
1219
1224
|
}
|
|
1220
1225
|
}
|
|
1221
1226
|
) : null,
|
|
1222
|
-
(s = (r = e.builderBlock) == null ? void 0 : r.children) != null && s.length && e.fitContent ? /* @__PURE__ */ l(
|
|
1227
|
+
(s = (r = e.builderBlock) == null ? void 0 : r.children) != null && s.length && e.fitContent ? /* @__PURE__ */ l(T, { children: e.children }) : null,
|
|
1223
1228
|
!e.fitContent && ((c = (d = e.builderBlock) == null ? void 0 : d.children) != null && c.length) ? /* @__PURE__ */ l("div", { className: "div-7a292ab8-2", children: e.children }) : null
|
|
1224
1229
|
] }),
|
|
1225
1230
|
/* @__PURE__ */ l("style", { children: `.img-7a292ab8 {
|
|
@@ -1388,8 +1393,8 @@ const G = {
|
|
|
1388
1393
|
}
|
|
1389
1394
|
}, he = (e) => e.toString();
|
|
1390
1395
|
function Ht(e) {
|
|
1391
|
-
var
|
|
1392
|
-
const [t, n] =
|
|
1396
|
+
var g;
|
|
1397
|
+
const [t, n] = w(() => []);
|
|
1393
1398
|
function i() {
|
|
1394
1399
|
return !!(e.grid || e.oneAtATime);
|
|
1395
1400
|
}
|
|
@@ -1415,57 +1420,57 @@ function Ht(e) {
|
|
|
1415
1420
|
cursor: "pointer"
|
|
1416
1421
|
};
|
|
1417
1422
|
return Object.fromEntries(
|
|
1418
|
-
Object.entries(v).filter(([
|
|
1423
|
+
Object.entries(v).filter(([f, k]) => k !== void 0)
|
|
1419
1424
|
);
|
|
1420
1425
|
}
|
|
1421
|
-
function r(
|
|
1422
|
-
return `builder-accordion-title builder-accordion-title-${t.includes(
|
|
1426
|
+
function r(m) {
|
|
1427
|
+
return `builder-accordion-title builder-accordion-title-${t.includes(m) ? "open" : "closed"}`;
|
|
1423
1428
|
}
|
|
1424
|
-
function s(
|
|
1425
|
-
return `builder-accordion-detail builder-accordion-detail-${t.includes(
|
|
1429
|
+
function s(m) {
|
|
1430
|
+
return `builder-accordion-detail builder-accordion-detail-${t.includes(m) ? "open" : "closed"}`;
|
|
1426
1431
|
}
|
|
1427
1432
|
function d() {
|
|
1428
|
-
let
|
|
1433
|
+
let m = null;
|
|
1429
1434
|
if (e.grid && t.length && document) {
|
|
1430
|
-
const
|
|
1431
|
-
let
|
|
1432
|
-
`.builder-accordion-title[data-index="${
|
|
1435
|
+
const f = t[0];
|
|
1436
|
+
let S = document.querySelector(
|
|
1437
|
+
`.builder-accordion-title[data-index="${f}"]`
|
|
1433
1438
|
);
|
|
1434
|
-
if (
|
|
1435
|
-
let
|
|
1436
|
-
for (;
|
|
1437
|
-
if (
|
|
1438
|
-
if (
|
|
1439
|
+
if (m = f, S) {
|
|
1440
|
+
let p = S.getBoundingClientRect();
|
|
1441
|
+
for (; S = S && S.nextElementSibling; )
|
|
1442
|
+
if (S) {
|
|
1443
|
+
if (S.classList.contains("builder-accordion-detail"))
|
|
1439
1444
|
continue;
|
|
1440
|
-
const
|
|
1441
|
-
if (
|
|
1442
|
-
const
|
|
1443
|
-
|
|
1445
|
+
const b = S.getBoundingClientRect();
|
|
1446
|
+
if (b.left > p.left) {
|
|
1447
|
+
const x = parseInt(
|
|
1448
|
+
S.getAttribute("data-index") || "",
|
|
1444
1449
|
10
|
|
1445
1450
|
);
|
|
1446
|
-
isNaN(
|
|
1451
|
+
isNaN(x) || (p = b, m = x);
|
|
1447
1452
|
} else
|
|
1448
1453
|
break;
|
|
1449
1454
|
}
|
|
1450
1455
|
}
|
|
1451
1456
|
}
|
|
1452
|
-
return typeof
|
|
1457
|
+
return typeof m == "number" && (m = m + 1), m;
|
|
1453
1458
|
}
|
|
1454
1459
|
function c() {
|
|
1455
|
-
const
|
|
1460
|
+
const m = {
|
|
1456
1461
|
order: typeof d() == "number" ? d() : void 0,
|
|
1457
1462
|
...e.grid && {
|
|
1458
1463
|
width: "100%"
|
|
1459
1464
|
}
|
|
1460
1465
|
};
|
|
1461
1466
|
return Object.fromEntries(
|
|
1462
|
-
Object.entries(
|
|
1467
|
+
Object.entries(m).filter(([v, f]) => f !== void 0)
|
|
1463
1468
|
);
|
|
1464
1469
|
}
|
|
1465
|
-
function h(
|
|
1466
|
-
t.includes(
|
|
1470
|
+
function h(m) {
|
|
1471
|
+
t.includes(m) ? n(i() ? [] : t.filter((v) => v !== m)) : n(i() ? [m] : t.concat(m));
|
|
1467
1472
|
}
|
|
1468
|
-
return /* @__PURE__ */ l("div", { className: "builder-accordion", style: o(), children: (
|
|
1473
|
+
return /* @__PURE__ */ l("div", { className: "builder-accordion", style: o(), children: (g = e.items) == null ? void 0 : g.map((m, v) => /* @__PURE__ */ V(T, { children: [
|
|
1469
1474
|
/* @__PURE__ */ l(
|
|
1470
1475
|
"div",
|
|
1471
1476
|
{
|
|
@@ -1476,11 +1481,11 @@ function Ht(e) {
|
|
|
1476
1481
|
order: d() !== null ? he(v) : he(v + 1)
|
|
1477
1482
|
},
|
|
1478
1483
|
"data-index": v,
|
|
1479
|
-
onClick: (
|
|
1484
|
+
onClick: (f) => h(v),
|
|
1480
1485
|
children: /* @__PURE__ */ l(
|
|
1481
1486
|
F,
|
|
1482
1487
|
{
|
|
1483
|
-
blocks:
|
|
1488
|
+
blocks: m.title,
|
|
1484
1489
|
path: `items.${v}.title`,
|
|
1485
1490
|
parent: e.builderBlock.id,
|
|
1486
1491
|
context: e.builderContext,
|
|
@@ -1498,7 +1503,7 @@ function Ht(e) {
|
|
|
1498
1503
|
children: /* @__PURE__ */ l(
|
|
1499
1504
|
F,
|
|
1500
1505
|
{
|
|
1501
|
-
blocks:
|
|
1506
|
+
blocks: m.detail,
|
|
1502
1507
|
path: `items.${v}.detail`,
|
|
1503
1508
|
parent: e.builderBlock.id,
|
|
1504
1509
|
context: e.builderContext,
|
|
@@ -1782,13 +1787,13 @@ const jt = {
|
|
|
1782
1787
|
function n(r, s = 6e4) {
|
|
1783
1788
|
return new Promise((d, c) => {
|
|
1784
1789
|
const h = document.createElement("img");
|
|
1785
|
-
let
|
|
1790
|
+
let g = !1;
|
|
1786
1791
|
h.onload = () => {
|
|
1787
|
-
|
|
1788
|
-
}, h.addEventListener("error", (
|
|
1789
|
-
console.warn("Image load failed",
|
|
1792
|
+
g = !0, d(h);
|
|
1793
|
+
}, h.addEventListener("error", (m) => {
|
|
1794
|
+
console.warn("Image load failed", m.error), c(m.error);
|
|
1790
1795
|
}), h.src = r, setTimeout(() => {
|
|
1791
|
-
|
|
1796
|
+
g || c(new Error("Image load timed out"));
|
|
1792
1797
|
}, s);
|
|
1793
1798
|
});
|
|
1794
1799
|
}
|
|
@@ -2131,7 +2136,7 @@ const Gt = {
|
|
|
2131
2136
|
};
|
|
2132
2137
|
function Qt(e) {
|
|
2133
2138
|
var a;
|
|
2134
|
-
const [t, n] =
|
|
2139
|
+
const [t, n] = w(
|
|
2135
2140
|
() => e.defaultActiveTab ? e.defaultActiveTab - 1 : 0
|
|
2136
2141
|
);
|
|
2137
2142
|
function i(r) {
|
|
@@ -2266,7 +2271,7 @@ const en = {
|
|
|
2266
2271
|
}]
|
|
2267
2272
|
};
|
|
2268
2273
|
function tn(e) {
|
|
2269
|
-
const t = $(null), [n, i] =
|
|
2274
|
+
const t = $(null), [n, i] = w(() => []), [o, a] = w(() => []);
|
|
2270
2275
|
return B(() => {
|
|
2271
2276
|
var s;
|
|
2272
2277
|
if (!((s = t.current) != null && s.getElementsByTagName) || typeof window == "undefined")
|
|
@@ -2320,22 +2325,22 @@ const nn = {
|
|
|
2320
2325
|
}]
|
|
2321
2326
|
}, on = ["text/javascript", "application/javascript", "application/ecmascript"], an = (e) => on.includes(e.type);
|
|
2322
2327
|
function rn(e) {
|
|
2323
|
-
const t = $(null), [n, i] =
|
|
2328
|
+
const t = $(null), [n, i] = w(() => []), [o, a] = w(() => []), [r, s] = w(() => !1);
|
|
2324
2329
|
function d() {
|
|
2325
2330
|
if (!t.current || !t.current.getElementsByTagName)
|
|
2326
2331
|
return;
|
|
2327
2332
|
const c = t.current.getElementsByTagName("script");
|
|
2328
2333
|
for (let h = 0; h < c.length; h++) {
|
|
2329
|
-
const
|
|
2330
|
-
if (
|
|
2331
|
-
n.push(
|
|
2332
|
-
const
|
|
2333
|
-
|
|
2334
|
-
} else if (an(
|
|
2334
|
+
const g = c[h];
|
|
2335
|
+
if (g.src && !n.includes(g.src)) {
|
|
2336
|
+
n.push(g.src);
|
|
2337
|
+
const m = document.createElement("script");
|
|
2338
|
+
m.async = !0, m.src = g.src, document.head.appendChild(m);
|
|
2339
|
+
} else if (an(g) && !o.includes(g.innerText))
|
|
2335
2340
|
try {
|
|
2336
|
-
o.push(
|
|
2337
|
-
} catch (
|
|
2338
|
-
console.warn("`Embed`: Error running script:",
|
|
2341
|
+
o.push(g.innerText), new Function(g.innerText)();
|
|
2342
|
+
} catch (m) {
|
|
2343
|
+
console.warn("`Embed`: Error running script:", m);
|
|
2339
2344
|
}
|
|
2340
2345
|
}
|
|
2341
2346
|
}
|
|
@@ -2592,115 +2597,115 @@ const ln = {
|
|
|
2592
2597
|
return sn.includes(e) ? e : "production";
|
|
2593
2598
|
};
|
|
2594
2599
|
function dn(e) {
|
|
2595
|
-
var
|
|
2596
|
-
const t = $(null), [n, i] =
|
|
2600
|
+
var g, m;
|
|
2601
|
+
const t = $(null), [n, i] = w(() => "unsubmitted"), [o, a] = w(() => null), [r, s] = w(() => "");
|
|
2597
2602
|
function d(v) {
|
|
2598
|
-
var
|
|
2599
|
-
const
|
|
2603
|
+
var k, S;
|
|
2604
|
+
const f = {
|
|
2600
2605
|
...e.builderContext.rootState,
|
|
2601
2606
|
...v
|
|
2602
2607
|
};
|
|
2603
|
-
e.builderContext.rootSetState ? (
|
|
2608
|
+
e.builderContext.rootSetState ? (S = (k = e.builderContext).rootSetState) == null || S.call(k, f) : e.builderContext.rootState = f;
|
|
2604
2609
|
}
|
|
2605
2610
|
function c() {
|
|
2606
2611
|
return N() && e.previewState || n;
|
|
2607
2612
|
}
|
|
2608
2613
|
function h(v) {
|
|
2609
|
-
var
|
|
2610
|
-
const
|
|
2614
|
+
var k;
|
|
2615
|
+
const f = e.sendWithJs || e.sendSubmissionsTo === "email";
|
|
2611
2616
|
if (e.sendSubmissionsTo === "zapier")
|
|
2612
2617
|
v.preventDefault();
|
|
2613
|
-
else if (
|
|
2618
|
+
else if (f) {
|
|
2614
2619
|
if (!(e.action || e.sendSubmissionsTo === "email")) {
|
|
2615
2620
|
v.preventDefault();
|
|
2616
2621
|
return;
|
|
2617
2622
|
}
|
|
2618
2623
|
v.preventDefault();
|
|
2619
|
-
const
|
|
2620
|
-
let
|
|
2621
|
-
const
|
|
2622
|
-
let
|
|
2624
|
+
const S = v.currentTarget || v.target, p = e.customHeaders || {};
|
|
2625
|
+
let b;
|
|
2626
|
+
const x = new FormData(S), A = Array.from(S.querySelectorAll("input,select,textarea")).filter((u) => !!u.name).map((u) => {
|
|
2627
|
+
let y;
|
|
2623
2628
|
const E = u.name;
|
|
2624
2629
|
if (u instanceof HTMLInputElement)
|
|
2625
2630
|
if (u.type === "radio") {
|
|
2626
2631
|
if (u.checked)
|
|
2627
|
-
return
|
|
2632
|
+
return y = u.name, {
|
|
2628
2633
|
key: E,
|
|
2629
|
-
value:
|
|
2634
|
+
value: y
|
|
2630
2635
|
};
|
|
2631
2636
|
} else if (u.type === "checkbox")
|
|
2632
|
-
|
|
2637
|
+
y = u.checked;
|
|
2633
2638
|
else if (u.type === "number" || u.type === "range") {
|
|
2634
|
-
const
|
|
2635
|
-
isNaN(
|
|
2639
|
+
const R = u.valueAsNumber;
|
|
2640
|
+
isNaN(R) || (y = R);
|
|
2636
2641
|
} else
|
|
2637
|
-
u.type === "file" ?
|
|
2642
|
+
u.type === "file" ? y = u.files : y = u.value;
|
|
2638
2643
|
else
|
|
2639
|
-
|
|
2644
|
+
y = u.value;
|
|
2640
2645
|
return {
|
|
2641
2646
|
key: E,
|
|
2642
|
-
value:
|
|
2647
|
+
value: y
|
|
2643
2648
|
};
|
|
2644
2649
|
});
|
|
2645
|
-
let
|
|
2646
|
-
if (e.sendSubmissionsTo === "email" && (
|
|
2647
|
-
(u instanceof File || Array.isArray(u) && u[0] instanceof File || u instanceof FileList) && (
|
|
2648
|
-
}),
|
|
2649
|
-
|
|
2650
|
+
let C = e.contentType;
|
|
2651
|
+
if (e.sendSubmissionsTo === "email" && (C = "multipart/form-data"), Array.from(A).forEach(({ value: u }) => {
|
|
2652
|
+
(u instanceof File || Array.isArray(u) && u[0] instanceof File || u instanceof FileList) && (C = "multipart/form-data");
|
|
2653
|
+
}), C !== "application/json")
|
|
2654
|
+
b = x;
|
|
2650
2655
|
else {
|
|
2651
2656
|
const u = {};
|
|
2652
|
-
Array.from(
|
|
2653
|
-
Ce(u, E,
|
|
2654
|
-
}),
|
|
2657
|
+
Array.from(A).forEach(({ value: y, key: E }) => {
|
|
2658
|
+
Ce(u, E, y);
|
|
2659
|
+
}), b = JSON.stringify(u);
|
|
2655
2660
|
}
|
|
2656
|
-
|
|
2657
|
-
const
|
|
2658
|
-
if (t.current && (t.current.dispatchEvent(
|
|
2661
|
+
C && C !== "multipart/form-data" && (f && ((k = e.action) != null && k.includes("zapier.com")) || (p["content-type"] = C));
|
|
2662
|
+
const I = new CustomEvent("presubmit", { detail: { body: b } });
|
|
2663
|
+
if (t.current && (t.current.dispatchEvent(I), I.defaultPrevented))
|
|
2659
2664
|
return;
|
|
2660
2665
|
i("sending");
|
|
2661
|
-
const
|
|
2666
|
+
const P = `${cn() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
|
|
2662
2667
|
e.sendSubmissionsToEmail || ""
|
|
2663
2668
|
)}&name=${encodeURIComponent(e.name || "")}`;
|
|
2664
2669
|
fetch(
|
|
2665
|
-
e.sendSubmissionsTo === "email" ?
|
|
2666
|
-
{ body:
|
|
2670
|
+
e.sendSubmissionsTo === "email" ? P : e.action,
|
|
2671
|
+
{ body: b, headers: p, method: e.method || "post" }
|
|
2667
2672
|
).then(
|
|
2668
2673
|
async (u) => {
|
|
2669
|
-
let
|
|
2674
|
+
let y;
|
|
2670
2675
|
const E = u.headers.get("content-type");
|
|
2671
|
-
if (E && E.indexOf("application/json") !== -1 ?
|
|
2672
|
-
let
|
|
2673
|
-
|
|
2676
|
+
if (E && E.indexOf("application/json") !== -1 ? y = await u.json() : y = await u.text(), !u.ok && e.errorMessagePath) {
|
|
2677
|
+
let R = Ie(y, e.errorMessagePath);
|
|
2678
|
+
R && (typeof R != "string" && (R = JSON.stringify(R)), s(R), d({ formErrorMessage: R }));
|
|
2674
2679
|
}
|
|
2675
|
-
if (a(
|
|
2676
|
-
const
|
|
2677
|
-
detail: { res: u, body:
|
|
2680
|
+
if (a(y), i(u.ok ? "success" : "error"), u.ok) {
|
|
2681
|
+
const R = new CustomEvent("submit:success", {
|
|
2682
|
+
detail: { res: u, body: y }
|
|
2678
2683
|
});
|
|
2679
2684
|
if (t.current) {
|
|
2680
|
-
if (t.current.dispatchEvent(
|
|
2685
|
+
if (t.current.dispatchEvent(R), R.defaultPrevented)
|
|
2681
2686
|
return;
|
|
2682
2687
|
e.resetFormOnSubmit !== !1 && t.current.reset();
|
|
2683
2688
|
}
|
|
2684
2689
|
if (e.successUrl)
|
|
2685
2690
|
if (t.current) {
|
|
2686
|
-
const
|
|
2691
|
+
const W = new CustomEvent("route", {
|
|
2687
2692
|
detail: { url: e.successUrl }
|
|
2688
2693
|
});
|
|
2689
|
-
t.current.dispatchEvent(
|
|
2694
|
+
t.current.dispatchEvent(W), W.defaultPrevented || (location.href = e.successUrl);
|
|
2690
2695
|
} else
|
|
2691
2696
|
location.href = e.successUrl;
|
|
2692
2697
|
}
|
|
2693
2698
|
},
|
|
2694
2699
|
(u) => {
|
|
2695
|
-
const
|
|
2700
|
+
const y = new CustomEvent("submit:error", {
|
|
2696
2701
|
detail: { error: u }
|
|
2697
2702
|
});
|
|
2698
|
-
t.current && (t.current.dispatchEvent(
|
|
2703
|
+
t.current && (t.current.dispatchEvent(y), y.defaultPrevented) || (a(u), i("error"));
|
|
2699
2704
|
}
|
|
2700
2705
|
);
|
|
2701
2706
|
}
|
|
2702
2707
|
}
|
|
2703
|
-
return /* @__PURE__ */ V(
|
|
2708
|
+
return /* @__PURE__ */ V(T, { children: [
|
|
2704
2709
|
" ",
|
|
2705
2710
|
/* @__PURE__ */ V(
|
|
2706
2711
|
"form",
|
|
@@ -2713,7 +2718,7 @@ function dn(e) {
|
|
|
2713
2718
|
onSubmit: (v) => h(v),
|
|
2714
2719
|
...e.attributes,
|
|
2715
2720
|
children: [
|
|
2716
|
-
e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ l(
|
|
2721
|
+
e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ l(T, { children: (m = (g = e.builderBlock) == null ? void 0 : g.children) == null ? void 0 : m.map((v, f) => /* @__PURE__ */ l(
|
|
2717
2722
|
H,
|
|
2718
2723
|
{
|
|
2719
2724
|
block: v,
|
|
@@ -2721,7 +2726,7 @@ function dn(e) {
|
|
|
2721
2726
|
registeredComponents: e.builderComponents,
|
|
2722
2727
|
linkComponent: e.builderLinkComponent
|
|
2723
2728
|
},
|
|
2724
|
-
`form-block-${
|
|
2729
|
+
`form-block-${f}`
|
|
2725
2730
|
)) }) : null,
|
|
2726
2731
|
c() === "error" ? /* @__PURE__ */ l(
|
|
2727
2732
|
F,
|
|
@@ -3447,37 +3452,37 @@ font-weight: ${s};
|
|
|
3447
3452
|
}
|
|
3448
3453
|
`, Ln = (e) => e ? "" : Dn, On = (e) => `variant-${e}`;
|
|
3449
3454
|
function Un(e) {
|
|
3450
|
-
var
|
|
3455
|
+
var b, x, A;
|
|
3451
3456
|
const t = $(null);
|
|
3452
|
-
function n(
|
|
3453
|
-
var
|
|
3454
|
-
const
|
|
3457
|
+
function n(C) {
|
|
3458
|
+
var P, u;
|
|
3459
|
+
const I = {
|
|
3455
3460
|
...e.builderContextSignal.rootState,
|
|
3456
|
-
...
|
|
3461
|
+
...C
|
|
3457
3462
|
};
|
|
3458
|
-
e.builderContextSignal.rootSetState ? (u = (
|
|
3459
|
-
...
|
|
3460
|
-
rootState:
|
|
3463
|
+
e.builderContextSignal.rootSetState ? (u = (P = e.builderContextSignal).rootSetState) == null || u.call(P, I) : e.setBuilderContextSignal((y) => ({
|
|
3464
|
+
...y,
|
|
3465
|
+
rootState: I
|
|
3461
3466
|
}));
|
|
3462
3467
|
}
|
|
3463
|
-
function i(
|
|
3464
|
-
var
|
|
3465
|
-
const
|
|
3468
|
+
function i(C) {
|
|
3469
|
+
var P, u, y, E, R;
|
|
3470
|
+
const I = {
|
|
3466
3471
|
...e.builderContextSignal.content,
|
|
3467
|
-
...
|
|
3472
|
+
...C,
|
|
3468
3473
|
data: {
|
|
3469
|
-
...(
|
|
3470
|
-
...
|
|
3474
|
+
...(P = e.builderContextSignal.content) == null ? void 0 : P.data,
|
|
3475
|
+
...C == null ? void 0 : C.data
|
|
3471
3476
|
},
|
|
3472
3477
|
meta: {
|
|
3473
3478
|
...(u = e.builderContextSignal.content) == null ? void 0 : u.meta,
|
|
3474
|
-
...
|
|
3475
|
-
breakpoints: ((
|
|
3479
|
+
...C == null ? void 0 : C.meta,
|
|
3480
|
+
breakpoints: ((y = C == null ? void 0 : C.meta) == null ? void 0 : y.breakpoints) || ((R = (E = e.builderContextSignal.content) == null ? void 0 : E.meta) == null ? void 0 : R.breakpoints)
|
|
3476
3481
|
}
|
|
3477
3482
|
};
|
|
3478
|
-
e.setBuilderContextSignal((
|
|
3479
|
-
...
|
|
3480
|
-
content:
|
|
3483
|
+
e.setBuilderContextSignal((W) => ({
|
|
3484
|
+
...W,
|
|
3485
|
+
content: I
|
|
3481
3486
|
}));
|
|
3482
3487
|
}
|
|
3483
3488
|
function o() {
|
|
@@ -3486,60 +3491,60 @@ function Un(e) {
|
|
|
3486
3491
|
"aria-hidden": !0
|
|
3487
3492
|
};
|
|
3488
3493
|
}
|
|
3489
|
-
const [a, r] =
|
|
3494
|
+
const [a, r] = w(
|
|
3490
3495
|
() => e.contentWrapper || "div"
|
|
3491
3496
|
);
|
|
3492
|
-
function s(
|
|
3497
|
+
function s(C) {
|
|
3493
3498
|
return He({
|
|
3494
3499
|
model: e.model,
|
|
3495
3500
|
trustedHosts: e.trustedHosts,
|
|
3496
3501
|
callbacks: {
|
|
3497
|
-
configureSdk: (
|
|
3498
|
-
var
|
|
3499
|
-
const { breakpoints:
|
|
3500
|
-
!u || u !== ((
|
|
3502
|
+
configureSdk: (I) => {
|
|
3503
|
+
var y;
|
|
3504
|
+
const { breakpoints: P, contentId: u } = I;
|
|
3505
|
+
!u || u !== ((y = e.builderContextSignal.content) == null ? void 0 : y.id) || P && i({
|
|
3501
3506
|
meta: {
|
|
3502
|
-
breakpoints:
|
|
3507
|
+
breakpoints: P
|
|
3503
3508
|
}
|
|
3504
3509
|
});
|
|
3505
3510
|
},
|
|
3506
|
-
animation: (
|
|
3507
|
-
Re(
|
|
3511
|
+
animation: (I) => {
|
|
3512
|
+
Re(I);
|
|
3508
3513
|
},
|
|
3509
|
-
contentUpdate: (
|
|
3510
|
-
i(
|
|
3514
|
+
contentUpdate: (I) => {
|
|
3515
|
+
i(I);
|
|
3511
3516
|
}
|
|
3512
3517
|
}
|
|
3513
|
-
})(
|
|
3518
|
+
})(C);
|
|
3514
3519
|
}
|
|
3515
|
-
const [d, c] =
|
|
3516
|
-
function
|
|
3517
|
-
var
|
|
3520
|
+
const [d, c] = w(() => ({})), [h, g] = w(() => ({})), [m, v] = w(() => !1);
|
|
3521
|
+
function f(C) {
|
|
3522
|
+
var I, P;
|
|
3518
3523
|
if (e.builderContextSignal.content) {
|
|
3519
|
-
const u = (
|
|
3524
|
+
const u = (I = e.builderContextSignal.content) == null ? void 0 : I.testVariationId, y = (P = e.builderContextSignal.content) == null ? void 0 : P.id;
|
|
3520
3525
|
le({
|
|
3521
3526
|
apiHost: e.apiHost,
|
|
3522
3527
|
type: "click",
|
|
3523
3528
|
canTrack: q(e.canTrack),
|
|
3524
|
-
contentId:
|
|
3529
|
+
contentId: y,
|
|
3525
3530
|
apiKey: e.apiKey,
|
|
3526
|
-
variationId: u !==
|
|
3527
|
-
...Wn(
|
|
3528
|
-
unique: !
|
|
3531
|
+
variationId: u !== y ? u : void 0,
|
|
3532
|
+
...Wn(C),
|
|
3533
|
+
unique: !m
|
|
3529
3534
|
});
|
|
3530
3535
|
}
|
|
3531
|
-
|
|
3536
|
+
m || v(!0);
|
|
3532
3537
|
}
|
|
3533
|
-
function
|
|
3534
|
-
var
|
|
3535
|
-
const
|
|
3536
|
-
Object.entries(
|
|
3537
|
-
if (!E || h[
|
|
3538
|
+
function k() {
|
|
3539
|
+
var I, P, u;
|
|
3540
|
+
const C = (u = (P = (I = e.builderContextSignal.content) == null ? void 0 : I.data) == null ? void 0 : P.httpRequests) != null ? u : {};
|
|
3541
|
+
Object.entries(C).forEach(([y, E]) => {
|
|
3542
|
+
if (!E || h[y] || d[y] && !N())
|
|
3538
3543
|
return;
|
|
3539
|
-
h[
|
|
3540
|
-
const
|
|
3544
|
+
h[y] = !0;
|
|
3545
|
+
const R = E.replace(
|
|
3541
3546
|
/{{([^}]+)}}/g,
|
|
3542
|
-
(
|
|
3547
|
+
(W, De) => String(
|
|
3543
3548
|
L({
|
|
3544
3549
|
code: De,
|
|
3545
3550
|
context: e.context || {},
|
|
@@ -3549,18 +3554,18 @@ function Un(e) {
|
|
|
3549
3554
|
})
|
|
3550
3555
|
)
|
|
3551
3556
|
);
|
|
3552
|
-
fetch(
|
|
3557
|
+
fetch(R).then((W) => W.json()).then((W) => {
|
|
3553
3558
|
n({
|
|
3554
|
-
[
|
|
3555
|
-
}), d[
|
|
3556
|
-
}).catch((
|
|
3557
|
-
console.error("error fetching dynamic data", E,
|
|
3559
|
+
[y]: W
|
|
3560
|
+
}), d[y] = !0;
|
|
3561
|
+
}).catch((W) => {
|
|
3562
|
+
console.error("error fetching dynamic data", E, W);
|
|
3558
3563
|
}).finally(() => {
|
|
3559
|
-
h[
|
|
3564
|
+
h[y] = !1;
|
|
3560
3565
|
});
|
|
3561
3566
|
});
|
|
3562
3567
|
}
|
|
3563
|
-
function
|
|
3568
|
+
function S() {
|
|
3564
3569
|
N() && window.dispatchEvent(
|
|
3565
3570
|
new CustomEvent(
|
|
3566
3571
|
"builder:component:stateChange",
|
|
@@ -3575,9 +3580,9 @@ function Un(e) {
|
|
|
3575
3580
|
)
|
|
3576
3581
|
);
|
|
3577
3582
|
}
|
|
3578
|
-
const
|
|
3579
|
-
return
|
|
3580
|
-
var
|
|
3583
|
+
const p = $(!1);
|
|
3584
|
+
return p.current || (k(), S(), p.current = !0), B(() => {
|
|
3585
|
+
var C, I;
|
|
3581
3586
|
if (_()) {
|
|
3582
3587
|
if (N() && !e.isNestedRender && (window.addEventListener("message", s), Le(), Oe({
|
|
3583
3588
|
...e.locale ? {
|
|
@@ -3593,39 +3598,39 @@ function Un(e) {
|
|
|
3593
3598
|
e.builderContextSignal.componentInfos
|
|
3594
3599
|
).forEach((u) => {
|
|
3595
3600
|
var E;
|
|
3596
|
-
const
|
|
3597
|
-
(E = window.parent) == null || E.postMessage(
|
|
3601
|
+
const y = Ue(u);
|
|
3602
|
+
(E = window.parent) == null || E.postMessage(y, "*");
|
|
3598
3603
|
}), window.addEventListener(
|
|
3599
3604
|
"builder:component:stateChangeListenerActivated",
|
|
3600
|
-
|
|
3605
|
+
S
|
|
3601
3606
|
)), e.builderContextSignal.content && q(e.canTrack)) {
|
|
3602
|
-
const u = (
|
|
3607
|
+
const u = (C = e.builderContextSignal.content) == null ? void 0 : C.testVariationId, y = (I = e.builderContextSignal.content) == null ? void 0 : I.id, E = e.apiKey;
|
|
3603
3608
|
le({
|
|
3604
3609
|
apiHost: e.apiHost,
|
|
3605
3610
|
type: "impression",
|
|
3606
3611
|
canTrack: !0,
|
|
3607
|
-
contentId:
|
|
3612
|
+
contentId: y,
|
|
3608
3613
|
apiKey: E,
|
|
3609
|
-
variationId: u !==
|
|
3614
|
+
variationId: u !== y ? u : void 0
|
|
3610
3615
|
});
|
|
3611
3616
|
}
|
|
3612
3617
|
if (xe() && !N()) {
|
|
3613
|
-
const u = new URL(location.href).searchParams,
|
|
3614
|
-
`builder.overrides.${
|
|
3615
|
-
),
|
|
3616
|
-
|
|
3618
|
+
const u = new URL(location.href).searchParams, y = u.get("builder.preview"), E = u.get(
|
|
3619
|
+
`builder.overrides.${y}`
|
|
3620
|
+
), R = u.get("apiKey") || u.get("builder.space");
|
|
3621
|
+
y === e.model && R === e.apiKey && (!e.content || E === e.content.id) && ve({
|
|
3617
3622
|
model: e.model,
|
|
3618
3623
|
apiKey: e.apiKey,
|
|
3619
3624
|
apiVersion: e.builderContextSignal.apiVersion
|
|
3620
|
-
}).then((
|
|
3621
|
-
|
|
3625
|
+
}).then((W) => {
|
|
3626
|
+
W && i(W);
|
|
3622
3627
|
});
|
|
3623
3628
|
}
|
|
3624
3629
|
}
|
|
3625
3630
|
}, []), B(() => {
|
|
3626
3631
|
e.content && i(e.content);
|
|
3627
3632
|
}, [e.content]), B(() => {
|
|
3628
|
-
|
|
3633
|
+
S();
|
|
3629
3634
|
}, [e.builderContextSignal.rootState]), B(() => {
|
|
3630
3635
|
e.data && n(e.data);
|
|
3631
3636
|
}, [e.data]), B(() => {
|
|
@@ -3635,17 +3640,17 @@ function Un(e) {
|
|
|
3635
3640
|
}, [e.locale]), B(() => () => {
|
|
3636
3641
|
_() && (window.removeEventListener("message", s), window.removeEventListener(
|
|
3637
3642
|
"builder:component:stateChangeListenerActivated",
|
|
3638
|
-
|
|
3643
|
+
S
|
|
3639
3644
|
));
|
|
3640
3645
|
}, []), /* @__PURE__ */ l(ae.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ l(
|
|
3641
3646
|
a,
|
|
3642
3647
|
{
|
|
3643
3648
|
ref: t,
|
|
3644
|
-
onClick: (
|
|
3645
|
-
"builder-content-id": (
|
|
3649
|
+
onClick: (C) => f(C),
|
|
3650
|
+
"builder-content-id": (b = e.builderContextSignal.content) == null ? void 0 : b.id,
|
|
3646
3651
|
"builder-model": e.model,
|
|
3647
3652
|
className: On(
|
|
3648
|
-
((
|
|
3653
|
+
((x = e.content) == null ? void 0 : x.testVariationId) || ((A = e.content) == null ? void 0 : A.id)
|
|
3649
3654
|
),
|
|
3650
3655
|
...o(),
|
|
3651
3656
|
...e.contentWrapperProps,
|
|
@@ -3654,7 +3659,7 @@ function Un(e) {
|
|
|
3654
3659
|
) : null });
|
|
3655
3660
|
}
|
|
3656
3661
|
function Hn(e) {
|
|
3657
|
-
const [t, n] =
|
|
3662
|
+
const [t, n] = w(
|
|
3658
3663
|
() => `
|
|
3659
3664
|
${$n({
|
|
3660
3665
|
cssCode: e.cssCode,
|
|
@@ -3704,43 +3709,43 @@ const jn = ({
|
|
|
3704
3709
|
meta: e == null ? void 0 : e.meta
|
|
3705
3710
|
} : void 0;
|
|
3706
3711
|
function ye(e) {
|
|
3707
|
-
var c, h,
|
|
3708
|
-
const [t, n] =
|
|
3712
|
+
var c, h, g, m, v, f, k, S, p;
|
|
3713
|
+
const [t, n] = w(
|
|
3709
3714
|
() => {
|
|
3710
|
-
var
|
|
3715
|
+
var b, x;
|
|
3711
3716
|
return Bn({
|
|
3712
3717
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3713
|
-
variationId: (
|
|
3718
|
+
variationId: (b = e.content) == null ? void 0 : b.testVariationId,
|
|
3714
3719
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3715
|
-
contentId: (
|
|
3720
|
+
contentId: (x = e.content) == null ? void 0 : x.id
|
|
3716
3721
|
});
|
|
3717
3722
|
}
|
|
3718
3723
|
);
|
|
3719
|
-
function i(
|
|
3720
|
-
s((
|
|
3721
|
-
...
|
|
3722
|
-
rootState:
|
|
3724
|
+
function i(b) {
|
|
3725
|
+
s((x) => ({
|
|
3726
|
+
...x,
|
|
3727
|
+
rootState: b
|
|
3723
3728
|
}));
|
|
3724
3729
|
}
|
|
3725
|
-
const [o, a] =
|
|
3730
|
+
const [o, a] = w(
|
|
3726
3731
|
() => {
|
|
3727
|
-
var
|
|
3732
|
+
var b;
|
|
3728
3733
|
return [
|
|
3729
3734
|
...ge(),
|
|
3730
|
-
...((
|
|
3735
|
+
...((b = e.customComponents) == null ? void 0 : b.filter(({ models: x }) => !(x != null && x.length) || !e.model ? !0 : x.includes(e.model))) || []
|
|
3731
3736
|
].reduce(
|
|
3732
|
-
(
|
|
3733
|
-
...
|
|
3734
|
-
[
|
|
3735
|
-
component:
|
|
3736
|
-
...se(
|
|
3737
|
+
(x, { component: A, ...C }) => ({
|
|
3738
|
+
...x,
|
|
3739
|
+
[C.name]: {
|
|
3740
|
+
component: A,
|
|
3741
|
+
...se(C)
|
|
3737
3742
|
}
|
|
3738
3743
|
}),
|
|
3739
3744
|
{}
|
|
3740
3745
|
);
|
|
3741
3746
|
}
|
|
3742
|
-
), [r, s] =
|
|
3743
|
-
var
|
|
3747
|
+
), [r, s] = w(() => {
|
|
3748
|
+
var b;
|
|
3744
3749
|
return {
|
|
3745
3750
|
content: Mn({
|
|
3746
3751
|
content: e.content,
|
|
@@ -3759,11 +3764,11 @@ function ye(e) {
|
|
|
3759
3764
|
apiVersion: e.apiVersion,
|
|
3760
3765
|
componentInfos: [
|
|
3761
3766
|
...ge(),
|
|
3762
|
-
...((
|
|
3767
|
+
...((b = e.customComponents) == null ? void 0 : b.filter(({ models: x }) => !(x != null && x.length) || !e.model ? !0 : x.includes(e.model))) || []
|
|
3763
3768
|
].reduce(
|
|
3764
|
-
(
|
|
3765
|
-
...
|
|
3766
|
-
[
|
|
3769
|
+
(x, { component: A, ...C }) => ({
|
|
3770
|
+
...x,
|
|
3771
|
+
[C.name]: se(C)
|
|
3767
3772
|
}),
|
|
3768
3773
|
{}
|
|
3769
3774
|
),
|
|
@@ -3777,14 +3782,14 @@ function ye(e) {
|
|
|
3777
3782
|
e.apiKey || ne.error(
|
|
3778
3783
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
3779
3784
|
);
|
|
3780
|
-
const
|
|
3781
|
-
|
|
3782
|
-
code:
|
|
3785
|
+
const b = (h = (c = r.content) == null ? void 0 : c.data) == null ? void 0 : h.jsCode;
|
|
3786
|
+
b && L({
|
|
3787
|
+
code: b,
|
|
3783
3788
|
context: e.context || {},
|
|
3784
3789
|
localState: void 0,
|
|
3785
3790
|
rootState: r.rootState,
|
|
3786
|
-
rootSetState: (
|
|
3787
|
-
Object.assign(r.rootState,
|
|
3791
|
+
rootSetState: (x) => {
|
|
3792
|
+
Object.assign(r.rootState, x);
|
|
3788
3793
|
},
|
|
3789
3794
|
isExpression: !1
|
|
3790
3795
|
}), d.current = !0;
|
|
@@ -3829,15 +3834,15 @@ function ye(e) {
|
|
|
3829
3834
|
{
|
|
3830
3835
|
nonce: e.nonce || "",
|
|
3831
3836
|
isNestedRender: e.isNestedRender,
|
|
3832
|
-
contentId: (
|
|
3833
|
-
cssCode: (v = (
|
|
3834
|
-
customFonts: (
|
|
3837
|
+
contentId: (g = r.content) == null ? void 0 : g.id,
|
|
3838
|
+
cssCode: (v = (m = r.content) == null ? void 0 : m.data) == null ? void 0 : v.cssCode,
|
|
3839
|
+
customFonts: (k = (f = r.content) == null ? void 0 : f.data) == null ? void 0 : k.customFonts
|
|
3835
3840
|
}
|
|
3836
3841
|
),
|
|
3837
3842
|
/* @__PURE__ */ l(
|
|
3838
3843
|
F,
|
|
3839
3844
|
{
|
|
3840
|
-
blocks: (
|
|
3845
|
+
blocks: (p = (S = r.content) == null ? void 0 : S.data) == null ? void 0 : p.blocks,
|
|
3841
3846
|
context: r,
|
|
3842
3847
|
registeredComponents: o,
|
|
3843
3848
|
linkComponent: e.linkComponent
|
|
@@ -3851,7 +3856,7 @@ function ye(e) {
|
|
|
3851
3856
|
}
|
|
3852
3857
|
function _n(e) {
|
|
3853
3858
|
var r;
|
|
3854
|
-
const [t, n] =
|
|
3859
|
+
const [t, n] = w(
|
|
3855
3860
|
() => wn({
|
|
3856
3861
|
canTrack: q(e.canTrack),
|
|
3857
3862
|
content: e.content
|
|
@@ -3881,7 +3886,7 @@ function _n(e) {
|
|
|
3881
3886
|
});
|
|
3882
3887
|
}
|
|
3883
3888
|
return B(() => {
|
|
3884
|
-
}, []), /* @__PURE__ */ V(
|
|
3889
|
+
}, []), /* @__PURE__ */ V(T, { children: [
|
|
3885
3890
|
!e.isNestedRender && D !== "reactNative" ? /* @__PURE__ */ l(
|
|
3886
3891
|
te,
|
|
3887
3892
|
{
|
|
@@ -3890,7 +3895,7 @@ function _n(e) {
|
|
|
3890
3895
|
nonce: e.nonce || ""
|
|
3891
3896
|
}
|
|
3892
3897
|
) : null,
|
|
3893
|
-
t ? /* @__PURE__ */ V(
|
|
3898
|
+
t ? /* @__PURE__ */ V(T, { children: [
|
|
3894
3899
|
/* @__PURE__ */ l(
|
|
3895
3900
|
z,
|
|
3896
3901
|
{
|
|
@@ -3991,24 +3996,24 @@ function Kn(e) {
|
|
|
3991
3996
|
return "div";
|
|
3992
3997
|
}
|
|
3993
3998
|
function i() {
|
|
3994
|
-
var
|
|
3999
|
+
var g, m;
|
|
3995
4000
|
return [
|
|
3996
4001
|
e.attributes[U()],
|
|
3997
4002
|
"builder-symbol",
|
|
3998
|
-
(
|
|
3999
|
-
(
|
|
4003
|
+
(g = e.symbol) != null && g.inline ? "builder-inline-symbol" : void 0,
|
|
4004
|
+
(m = e.symbol) != null && m.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
4000
4005
|
].filter(Boolean).join(" ");
|
|
4001
4006
|
}
|
|
4002
|
-
const [o, a] =
|
|
4003
|
-
var
|
|
4004
|
-
return (
|
|
4007
|
+
const [o, a] = w(() => {
|
|
4008
|
+
var g;
|
|
4009
|
+
return (g = e.symbol) == null ? void 0 : g.content;
|
|
4005
4010
|
});
|
|
4006
4011
|
function r() {
|
|
4007
4012
|
o || qn({
|
|
4008
4013
|
symbol: e.symbol,
|
|
4009
4014
|
builderContextValue: e.builderContext
|
|
4010
|
-
}).then((
|
|
4011
|
-
|
|
4015
|
+
}).then((g) => {
|
|
4016
|
+
g && a(g);
|
|
4012
4017
|
});
|
|
4013
4018
|
}
|
|
4014
4019
|
return B(() => {
|