@levo-so/studio 0.1.104 → 0.1.106
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/{BillingStep-2cKT5Pir.js → BillingStep-BNRcxjRl.js} +1 -1
- package/{Button-DtPwDEN0.js → Button-BIpdwMrO.js} +29 -29
- package/{EntryCard-j4uZb2cE.js → EntryCard-yFsTPjEj.js} +2 -2
- package/{LoginCard-asvOHIRg.js → LoginCard-CUapIHAo.js} +2 -2
- package/{LoginForm-BdsPVHdO.js → LoginForm-n-6Z7eVb.js} +1 -1
- package/{LoginModal-CyvbEK26.js → LoginModal-wyVhIJk8.js} +3 -3
- package/{MessageCard-lrXKEsBP.js → MessageCard-C2fU_Bo_.js} +1 -1
- package/{MessageFooter-D-dCrzJH.js → MessageFooter-4qIEK91O.js} +1 -1
- package/{ModalManager-BcPk4sbK.js → ModalManager-D-yKU_15.js} +1 -1
- package/{PendingApprovalCard-hYkupl9A.js → PendingApprovalCard-CDZRD8Jm.js} +2 -2
- package/{PopupRenderer-C7OHYphU-IWM6d7gW.js → PopupRenderer-CV5HY1dP-DlAn5Rc8.js} +281 -280
- package/{bookingCard-BdV2YSkq.js → bookingCard-MDpR8SL_.js} +3 -3
- package/collection.d.ts +5 -4
- package/collection.js +3 -3
- package/{dist-CsX9NP5P.js → dist-BjFMATnH.js} +1258 -896
- package/index.js +457 -449
- package/{generateRadiusScale-BpcgkGtN.js → inlineCollectionTheme-WpCvMKrW.js} +19 -4
- package/package.json +4 -4
- package/studio.css +1 -1
- package/{utils-CZLafTgN.js → utils-B01DL3RB.js} +1 -1
- package/widgets-NzmPF3Ji.js +215 -0
- package/widgets-eu5zXTf-.js +0 -230
- /package/{StripePaymentModal-DrLMN18M.js → StripePaymentModal-Do1xHctU.js} +0 -0
- /package/{dialog-C8-iHixJ.js → dialog-DoxC50i0.js} +0 -0
- /package/{useLogin-B2qE8710.js → useLogin-D4A5iRey.js} +0 -0
package/index.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { r as e, t } from "./inlineRteTheme-Ajq9PNpQ.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { n as
|
|
8
|
-
import { n as
|
|
9
|
-
import {
|
|
10
|
-
import { a as
|
|
11
|
-
import { t as
|
|
12
|
-
import { n as
|
|
13
|
-
import {
|
|
14
|
-
import { c as
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import
|
|
3
|
+
import { t as n } from "./inlineCollectionTheme-WpCvMKrW.js";
|
|
4
|
+
import { _ as r, g as i, v as a } from "./PopupRenderer-CV5HY1dP-DlAn5Rc8.js";
|
|
5
|
+
import { t as o } from "./RteThemeProvider-Cfepkyer.js";
|
|
6
|
+
import { n as s, r as c, t as l } from "./nodeAlignment-DKCIjzlR.js";
|
|
7
|
+
import { _ as u, a as d, b as f, c as p, d as m, f as h, g, h as _, i as v, l as y, m as b, n as x, o as S, p as C, r as w, s as T, t as E, u as D, v as O, y as k } from "./Button-BIpdwMrO.js";
|
|
8
|
+
import { n as A, t as j } from "./AuthProvider-C6bvedwF.js";
|
|
9
|
+
import { n as M, t as N } from "./ModalManager-D-yKU_15.js";
|
|
10
|
+
import { a as ee, i as te, n as ne, o as re, r as ie, s as ae, t as oe } from "./dialog-DoxC50i0.js";
|
|
11
|
+
import { t as se } from "./useLogin-D4A5iRey.js";
|
|
12
|
+
import { n as ce, t as le } from "./StripePaymentModal-Do1xHctU.js";
|
|
13
|
+
import { c as ue } from "./widgets-NzmPF3Ji.js";
|
|
14
|
+
import { a as de, c as fe, i as pe, l as me, n as he, o as ge, r as _e, s as ve, t as ye } from "./authentication-hnV1BI8s.js";
|
|
15
|
+
import { c as be } from "react/compiler-runtime";
|
|
16
|
+
import { LevoInsightsBlock as xe, LevoInsightsPage as Se, Spinner as Ce, cn as P, errorHandler as we, useLevo as F } from "@levo-so/react";
|
|
17
|
+
import * as Te from "react";
|
|
18
|
+
import I, { Fragment as Ee, Suspense as De, createContext as Oe, forwardRef as ke, lazy as L, memo as Ae, use as je, useCallback as Me, useContext as Ne, useEffect as R, useId as Pe, useLayoutEffect as Fe, useMemo as z, useRef as B, useState as V, useSyncExternalStore as Ie } from "react";
|
|
18
19
|
import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
|
|
19
20
|
import Le, { clsx as Re } from "clsx";
|
|
20
21
|
import { createRuntimeFn as ze } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
@@ -545,8 +546,8 @@ var gr = ut.create({
|
|
|
545
546
|
},
|
|
546
547
|
addCommands() {
|
|
547
548
|
let e = (e) => (t) => ({ state: n, tr: r }) => {
|
|
548
|
-
let i =
|
|
549
|
-
return i.length === 0 ? !1 :
|
|
549
|
+
let i = c(n.selection, this.options.types);
|
|
550
|
+
return i.length === 0 ? !1 : s(r, i, "backgroundColor", e(i, t));
|
|
550
551
|
};
|
|
551
552
|
return {
|
|
552
553
|
setNodeBackgroundColor: e((e, t) => t || null),
|
|
@@ -795,7 +796,7 @@ function Lr() {
|
|
|
795
796
|
Pr !== null && (cancelAnimationFrame(Pr), Pr = null);
|
|
796
797
|
}
|
|
797
798
|
function Rr(e) {
|
|
798
|
-
let t = B(null), n = B(!1), r = B(/* @__PURE__ */ new Set()), i = Ie(
|
|
799
|
+
let t = B(null), n = B(!1), r = B(/* @__PURE__ */ new Set()), i = Ie(Me((e) => (r.current.add(e), () => r.current.delete(e)), []), Me(() => n.current, []));
|
|
799
800
|
return R(() => {
|
|
800
801
|
if (!e) {
|
|
801
802
|
n.current && (n.current = !1, r.current.forEach((e) => e()));
|
|
@@ -1294,7 +1295,7 @@ var zr = (e) => ({
|
|
|
1294
1295
|
},
|
|
1295
1296
|
children: [
|
|
1296
1297
|
/* @__PURE__ */ U("style", { children: "\n @keyframes shimmer {\n 0% { background-position: 200% 0; }\n 100% { background-position: -200% 0; }\n }\n @keyframes scanLine {\n 0% { top: 0%; opacity: 0; }\n 5% { opacity: 1; }\n 50% { top: calc(100% - 2px); }\n 55% { opacity: 0.6; }\n 95% { opacity: 1; }\n 100% { top: 0%; opacity: 0; }\n }\n " }),
|
|
1297
|
-
Object.keys(f).map((t) => /* @__PURE__ */ W(
|
|
1298
|
+
Object.keys(f).map((t) => /* @__PURE__ */ W(Ee, { children: [/* @__PURE__ */ U(Kr, {
|
|
1298
1299
|
type: t,
|
|
1299
1300
|
item: e.hovered[t],
|
|
1300
1301
|
isSelected: !1,
|
|
@@ -3426,7 +3427,7 @@ var li = (e, t) => e ? e.replace(/\{([\w.-]+)\}/g, (e, n) => {
|
|
|
3426
3427
|
strict: t,
|
|
3427
3428
|
children: e
|
|
3428
3429
|
}), fa = (e) => {
|
|
3429
|
-
let t =
|
|
3430
|
+
let t = F(), { blockData: n, parsedBlockData: r, setParsedBlockData: i, pageContext: a, blockContext: o, workspace_id: s } = k(), c = {
|
|
3430
3431
|
page: 1,
|
|
3431
3432
|
...(r?.source?.find((t) => t.field_key === e))?.params?.query
|
|
3432
3433
|
}, [l, u] = V(c), [d, f] = V(!1), [p, m] = V(o?.[e]), h = (e) => {
|
|
@@ -3475,7 +3476,7 @@ var li = (e, t) => e ? e.replace(/\{([\w.-]+)\}/g, (e, n) => {
|
|
|
3475
3476
|
meta: p?.content?.meta
|
|
3476
3477
|
};
|
|
3477
3478
|
}, pa = (e) => {
|
|
3478
|
-
let t =
|
|
3479
|
+
let t = F(), { parsedBlockData: n, blockContext: r, workspace_id: i } = k(), a = n?.source?.find((t) => t.field_key === e), o = {
|
|
3479
3480
|
page: 1,
|
|
3480
3481
|
...a?.params?.query
|
|
3481
3482
|
}, [s, c] = V(o), [l, u] = V(!1), [d, f] = V(r?.[e]), p = (e) => {
|
|
@@ -3515,10 +3516,10 @@ var li = (e, t) => e ? e.replace(/\{([\w.-]+)\}/g, (e, n) => {
|
|
|
3515
3516
|
response: d?.content
|
|
3516
3517
|
};
|
|
3517
3518
|
}, ma = (e) => {
|
|
3518
|
-
let { pageContext: t, pageSource: n } =
|
|
3519
|
+
let { pageContext: t, pageSource: n } = k(), r = n?.find((t) => t.module === e)?.identifier;
|
|
3519
3520
|
return r ? t?.[r] : {};
|
|
3520
3521
|
}, ha = (e) => {
|
|
3521
|
-
let { pageMeta: t, pageSource: n } =
|
|
3522
|
+
let { pageMeta: t, pageSource: n } = k(), r = n?.find((t) => t.module === e)?.identifier;
|
|
3522
3523
|
return r ? t?.[r] : null;
|
|
3523
3524
|
}, ga = {
|
|
3524
3525
|
REGISTER_BLOCK: "REGISTER_BLOCK",
|
|
@@ -3597,14 +3598,14 @@ var li = (e, t) => e ? e.replace(/\{([\w.-]+)\}/g, (e, n) => {
|
|
|
3597
3598
|
getAllBlocks() {
|
|
3598
3599
|
return this.blocks;
|
|
3599
3600
|
}
|
|
3600
|
-
}, va = _a.getInstance(), ya =
|
|
3601
|
-
let i =
|
|
3601
|
+
}, va = _a.getInstance(), ya = I.memo(({ block_key: e, block_version: t, blocks: n, ...r }) => {
|
|
3602
|
+
let i = I.useMemo(() => `${e}:${t}`, [e, t]), a = n[i];
|
|
3602
3603
|
if (!a) return console.warn(`[LevoBlock.tsx] Block Not Found - ${i}`), null;
|
|
3603
3604
|
let { settings: o, source: s, ...c } = r;
|
|
3604
3605
|
return /* @__PURE__ */ U(a, { ...c });
|
|
3605
3606
|
});
|
|
3606
3607
|
ya.displayName = "BlockSelector";
|
|
3607
|
-
var ba =
|
|
3608
|
+
var ba = I.memo(({ html_id: e, renderMode: t = "live", blocks: n, parsedBlockData: r, blockData: i, pageContext: a, pageMeta: o, blockContext: s, workspace_id: c, pageSource: l }) => /* @__PURE__ */ U(O, {
|
|
3608
3609
|
value: {
|
|
3609
3610
|
parsedBlockData: r,
|
|
3610
3611
|
blockData: i,
|
|
@@ -3619,7 +3620,7 @@ var ba = F.memo(({ html_id: e, renderMode: t = "live", blocks: n, parsedBlockDat
|
|
|
3619
3620
|
id: e ?? r.id,
|
|
3620
3621
|
"data-levo-element": "block",
|
|
3621
3622
|
"data-levo-block-id": r.id,
|
|
3622
|
-
children: [t === "live" && /* @__PURE__ */ U(
|
|
3623
|
+
children: [t === "live" && /* @__PURE__ */ U(xe, { id: r.id }), /* @__PURE__ */ U(ya, {
|
|
3623
3624
|
id: r.id,
|
|
3624
3625
|
block_key: r.key,
|
|
3625
3626
|
block_version: r.version,
|
|
@@ -3819,8 +3820,8 @@ var Ca = ({ site: e }) => {
|
|
|
3819
3820
|
siteSlug: e?.slug,
|
|
3820
3821
|
siteName: e?.name
|
|
3821
3822
|
})] });
|
|
3822
|
-
}, wa = { loadingContainer: "_loadingContainer_1d4on_1" }, Ta =
|
|
3823
|
-
"authentication.NOT_LOGGED_IN": ({ logo: e, siteName: t, page: n }) => /* @__PURE__ */ U(
|
|
3823
|
+
}, wa = { loadingContainer: "_loadingContainer_1d4on_1" }, Ta = L(() => import("./LoginCard-CUapIHAo.js")), Ea = L(() => import("./EntryCard-yFsTPjEj.js")), Da = L(() => import("./MessageCard-C2fU_Bo_.js")), Oa = {
|
|
3824
|
+
"authentication.NOT_LOGGED_IN": ({ logo: e, siteName: t, page: n }) => /* @__PURE__ */ U(De, {
|
|
3824
3825
|
fallback: /* @__PURE__ */ U("div", {}),
|
|
3825
3826
|
children: /* @__PURE__ */ U(Ta, {
|
|
3826
3827
|
logo: e,
|
|
@@ -3828,7 +3829,7 @@ var Ca = ({ site: e }) => {
|
|
|
3828
3829
|
page: n
|
|
3829
3830
|
})
|
|
3830
3831
|
}),
|
|
3831
|
-
"gating.ENTRY_NOT_FOUND": ({ logo: e, siteName: t, accessResponse: n, page: r, onSuccess: i }) => /* @__PURE__ */ U(
|
|
3832
|
+
"gating.ENTRY_NOT_FOUND": ({ logo: e, siteName: t, accessResponse: n, page: r, onSuccess: i }) => /* @__PURE__ */ U(De, {
|
|
3832
3833
|
fallback: /* @__PURE__ */ U("div", {}),
|
|
3833
3834
|
children: /* @__PURE__ */ U(Ea, {
|
|
3834
3835
|
logo: e,
|
|
@@ -3838,7 +3839,7 @@ var Ca = ({ site: e }) => {
|
|
|
3838
3839
|
onSuccess: i
|
|
3839
3840
|
})
|
|
3840
3841
|
}),
|
|
3841
|
-
"gating.ENTRY_CONDITION_NOT_FULFILLED": ({ logo: e, siteName: t, accessResponse: n }) => /* @__PURE__ */ U(
|
|
3842
|
+
"gating.ENTRY_CONDITION_NOT_FULFILLED": ({ logo: e, siteName: t, accessResponse: n }) => /* @__PURE__ */ U(De, {
|
|
3842
3843
|
fallback: /* @__PURE__ */ U("div", {}),
|
|
3843
3844
|
children: /* @__PURE__ */ U(Da, {
|
|
3844
3845
|
logo: e,
|
|
@@ -3848,7 +3849,7 @@ var Ca = ({ site: e }) => {
|
|
|
3848
3849
|
})
|
|
3849
3850
|
})
|
|
3850
3851
|
}, ka = ({ page: e, site: t, children: n, authOverride: r }) => {
|
|
3851
|
-
let i =
|
|
3852
|
+
let i = F(), { isLoggedIn: a, account: o, isAuthLoaded: s } = A(), [c, l] = V(!e.access?.length), [u, d] = V(null), [f, p] = V(!!e.access?.length), [m, h] = V(null), g = async () => {
|
|
3852
3853
|
p(!0);
|
|
3853
3854
|
try {
|
|
3854
3855
|
let t = (await i?.fetch?.url(`/v1/studio/page/${e.id}/check-access`)?.post()?.json())?.content?.data;
|
|
@@ -3870,7 +3871,7 @@ var Ca = ({ site: e }) => {
|
|
|
3870
3871
|
]), c || r?.enabled) return /* @__PURE__ */ U(H, { children: n });
|
|
3871
3872
|
if (f) return /* @__PURE__ */ W("div", {
|
|
3872
3873
|
className: wa.loadingContainer,
|
|
3873
|
-
children: [/* @__PURE__ */ U(
|
|
3874
|
+
children: [/* @__PURE__ */ U(Ce, {}), " Checking access"]
|
|
3874
3875
|
});
|
|
3875
3876
|
if (m && m in Oa) {
|
|
3876
3877
|
let n = Oa[m];
|
|
@@ -3884,7 +3885,7 @@ var Ca = ({ site: e }) => {
|
|
|
3884
3885
|
}
|
|
3885
3886
|
return null;
|
|
3886
3887
|
}, Aa = ({ pageData: e, parsedPageData: t, renderMode: n = "live", context: r, blocks: i, site: a, workspace: o, authOverride: s, disableBranding: c }) => {
|
|
3887
|
-
let { isLoggedIn: l } =
|
|
3888
|
+
let { isLoggedIn: l } = A(), u = si(t, a);
|
|
3888
3889
|
return /* @__PURE__ */ W("div", {
|
|
3889
3890
|
"data-levo-element": "page",
|
|
3890
3891
|
"data-levo-page-id": t?.id,
|
|
@@ -3895,30 +3896,37 @@ var Ca = ({ site: e }) => {
|
|
|
3895
3896
|
site: a,
|
|
3896
3897
|
page: t,
|
|
3897
3898
|
authOverride: s,
|
|
3898
|
-
children: [
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3899
|
+
children: [
|
|
3900
|
+
n === "live" && /* @__PURE__ */ U(Se, { id: t?.id }),
|
|
3901
|
+
n === "live" && /* @__PURE__ */ U(f, {
|
|
3902
|
+
siteId: a?.id,
|
|
3903
|
+
pageId: t?.id
|
|
3904
|
+
}),
|
|
3905
|
+
t?.blocks?.map((a, s) => /* @__PURE__ */ U(ba, {
|
|
3906
|
+
renderMode: n,
|
|
3907
|
+
blocks: i,
|
|
3908
|
+
parsedBlockData: a,
|
|
3909
|
+
blockData: e?.blocks?.[s],
|
|
3910
|
+
pageContext: r?.page,
|
|
3911
|
+
pageMeta: r?.meta,
|
|
3912
|
+
blockContext: r?.blocks[a.id],
|
|
3913
|
+
workspace_id: o.id,
|
|
3914
|
+
pageSource: t?.source
|
|
3915
|
+
}, a.id))
|
|
3916
|
+
]
|
|
3909
3917
|
}),
|
|
3910
3918
|
u ? Ft(u) : null,
|
|
3911
3919
|
!c && o?.feature_flag?.branding && /* @__PURE__ */ U(Ca, { site: a })
|
|
3912
3920
|
]
|
|
3913
3921
|
});
|
|
3914
|
-
}, ja = ({ pageData: e, parsedPageData: t, renderMode: n = "live", context: r, blocks: i, site: a, workspace: o, authOverride: s, disableBranding: c }) => /* @__PURE__ */ U(
|
|
3922
|
+
}, ja = ({ pageData: e, parsedPageData: t, renderMode: n = "live", context: r, blocks: i, site: a, workspace: o, authOverride: s, disableBranding: c }) => /* @__PURE__ */ U(De, {
|
|
3915
3923
|
fallback: /* @__PURE__ */ U("center", { className: "flex h-screen w-full items-center justify-center" }),
|
|
3916
3924
|
children: /* @__PURE__ */ U(da, {
|
|
3917
3925
|
strict: !0,
|
|
3918
|
-
children: /* @__PURE__ */ U(
|
|
3926
|
+
children: /* @__PURE__ */ U(j, {
|
|
3919
3927
|
workspace: o,
|
|
3920
3928
|
authOverride: s,
|
|
3921
|
-
children: /* @__PURE__ */ U(
|
|
3929
|
+
children: /* @__PURE__ */ U(N, {
|
|
3922
3930
|
siteName: a?.name,
|
|
3923
3931
|
children: /* @__PURE__ */ U(Aa, {
|
|
3924
3932
|
authOverride: s,
|
|
@@ -4052,7 +4060,7 @@ var La = ({ blocks: e, studioData: t, site: n, workspace_id: r }) => {
|
|
|
4052
4060
|
})
|
|
4053
4061
|
] }) : null;
|
|
4054
4062
|
}, za = ({ blocks: e }) => {
|
|
4055
|
-
let [t, n] = V(null), [r, i] = V({}), [a, o] = V(null), s =
|
|
4063
|
+
let [t, n] = V(null), [r, i] = V({}), [a, o] = V(null), s = Me((e) => {
|
|
4056
4064
|
let { data: t } = e, { type: a, payload: s } = t;
|
|
4057
4065
|
switch (a) {
|
|
4058
4066
|
case J.PREVIEW_TYPE:
|
|
@@ -4131,7 +4139,7 @@ function Va({ className: e, elementKey: t, generatedClassName: n, content: r, co
|
|
|
4131
4139
|
return /* @__PURE__ */ U(An.Root, {
|
|
4132
4140
|
"data-levo_element_key": t,
|
|
4133
4141
|
"data-levo_element_type": "AccordionRoot",
|
|
4134
|
-
className:
|
|
4142
|
+
className: P("AccordionRoot", e, n),
|
|
4135
4143
|
...o
|
|
4136
4144
|
});
|
|
4137
4145
|
}
|
|
@@ -4140,7 +4148,7 @@ function Ha({ className: e, elementKey: t, generatedClassName: n, content: r, co
|
|
|
4140
4148
|
return /* @__PURE__ */ U(An.Item, {
|
|
4141
4149
|
"data-levo_element_key": t,
|
|
4142
4150
|
"data-levo_element_type": "AccordionItem",
|
|
4143
|
-
className:
|
|
4151
|
+
className: P(Ba.accordionItem, e, n),
|
|
4144
4152
|
...o
|
|
4145
4153
|
});
|
|
4146
4154
|
}
|
|
@@ -4151,7 +4159,7 @@ function Ua({ className: e, children: t, elementKey: n, generatedClassName: r, c
|
|
|
4151
4159
|
children: /* @__PURE__ */ W(An.Trigger, {
|
|
4152
4160
|
"data-levo_element_key": n,
|
|
4153
4161
|
"data-levo_element_type": "AccordionTrigger",
|
|
4154
|
-
className:
|
|
4162
|
+
className: P(Ba.accordionTrigger, e, r),
|
|
4155
4163
|
...s,
|
|
4156
4164
|
children: [t, /* @__PURE__ */ U(nn, { className: Ba.accordionChevron })]
|
|
4157
4165
|
})
|
|
@@ -4160,18 +4168,18 @@ function Ua({ className: e, children: t, elementKey: n, generatedClassName: r, c
|
|
|
4160
4168
|
Ua.displayName = "BaseAccordionTrigger";
|
|
4161
4169
|
function Wa({ className: e, children: t, elementKey: n, generatedClassName: r, content: i, config: a, styles: o, ...s }) {
|
|
4162
4170
|
return /* @__PURE__ */ U(An.Content, {
|
|
4163
|
-
className:
|
|
4171
|
+
className: P(Ba.accordionContent, e),
|
|
4164
4172
|
...s,
|
|
4165
4173
|
children: /* @__PURE__ */ U("div", {
|
|
4166
4174
|
"data-levo_element_key": n,
|
|
4167
4175
|
"data-levo_element_type": "AccordionContent",
|
|
4168
|
-
className:
|
|
4176
|
+
className: P(Ba.accordionContentText, r),
|
|
4169
4177
|
children: t
|
|
4170
4178
|
})
|
|
4171
4179
|
});
|
|
4172
4180
|
}
|
|
4173
4181
|
Wa.displayName = "BaseAccordionContent";
|
|
4174
|
-
var Ga =
|
|
4182
|
+
var Ga = v(Va), Ka = v(Ha), qa = v(Ua), Ja = v(Wa), Ya = () => [
|
|
4175
4183
|
cr,
|
|
4176
4184
|
tt,
|
|
4177
4185
|
at,
|
|
@@ -4188,14 +4196,14 @@ var Ga = _(Va), Ka = _(Ha), qa = _(Ua), Ja = _(Wa), Ya = () => [
|
|
|
4188
4196
|
ct,
|
|
4189
4197
|
Ze.configure({ openOnClick: !1 }),
|
|
4190
4198
|
ot,
|
|
4191
|
-
|
|
4199
|
+
i,
|
|
4192
4200
|
st,
|
|
4193
4201
|
it,
|
|
4194
4202
|
rt,
|
|
4195
4203
|
Ge,
|
|
4196
4204
|
Ye.configure({ multicolor: !0 }),
|
|
4197
4205
|
gr,
|
|
4198
|
-
|
|
4206
|
+
r,
|
|
4199
4207
|
lt.configure({ types: [
|
|
4200
4208
|
"table",
|
|
4201
4209
|
"paragraph",
|
|
@@ -4210,7 +4218,7 @@ var Ga = _(Va), Ka = _(Ha), qa = _(Ua), Ja = _(Wa), Ya = () => [
|
|
|
4210
4218
|
bt.configure({ nested: !0 }),
|
|
4211
4219
|
Sr.configure({ table: { cellMinWidth: 120 } }),
|
|
4212
4220
|
mr,
|
|
4213
|
-
|
|
4221
|
+
l,
|
|
4214
4222
|
$n,
|
|
4215
4223
|
tr,
|
|
4216
4224
|
sr,
|
|
@@ -4224,7 +4232,7 @@ var Ga = _(Va), Ka = _(Ha), qa = _(Ua), Ja = _(Wa), Ya = () => [
|
|
|
4224
4232
|
if (e.type === "text") return e.value;
|
|
4225
4233
|
if (e.type === "element") {
|
|
4226
4234
|
let { className: n, ...r } = e.properties || {};
|
|
4227
|
-
return
|
|
4235
|
+
return I.createElement(e.tagName, {
|
|
4228
4236
|
key: t,
|
|
4229
4237
|
...r,
|
|
4230
4238
|
className: Array.isArray(n) ? n.join(" ") : n
|
|
@@ -4247,7 +4255,7 @@ var Ga = _(Va), Ka = _(Ha), qa = _(Ua), Ja = _(Wa), Ya = () => [
|
|
|
4247
4255
|
}
|
|
4248
4256
|
return "";
|
|
4249
4257
|
}, $a = ({ node: e, children: t }) => {
|
|
4250
|
-
let n =
|
|
4258
|
+
let n = je(Xa), r = e?.attrs?.language, i = Qa(e);
|
|
4251
4259
|
if (!i) return /* @__PURE__ */ U("pre", { children: /* @__PURE__ */ U("code", { children: t }) });
|
|
4252
4260
|
let a;
|
|
4253
4261
|
try {
|
|
@@ -4260,19 +4268,19 @@ var Ga = _(Va), Ka = _(Ha), qa = _(Ua), Ja = _(Wa), Ya = () => [
|
|
|
4260
4268
|
children: a.children.map((e, t) => Za(e, `code-${t}`))
|
|
4261
4269
|
}) });
|
|
4262
4270
|
}, eo = (e) => {
|
|
4263
|
-
let t =
|
|
4271
|
+
let t = be(9), n;
|
|
4264
4272
|
t[0] === e.node ? n = t[1] : (n = Qa(e.node), t[0] = e.node, t[1] = n);
|
|
4265
4273
|
let r = n, i;
|
|
4266
4274
|
t[2] === r ? i = t[3] : (i = /* @__PURE__ */ U("pre", { children: /* @__PURE__ */ U("code", { children: r }) }), t[2] = r, t[3] = i);
|
|
4267
4275
|
let a;
|
|
4268
4276
|
t[4] === e ? a = t[5] : (a = /* @__PURE__ */ U($a, { ...e }), t[4] = e, t[5] = a);
|
|
4269
4277
|
let o;
|
|
4270
|
-
return t[6] !== i || t[7] !== a ? (o = /* @__PURE__ */ U(
|
|
4278
|
+
return t[6] !== i || t[7] !== a ? (o = /* @__PURE__ */ U(I.Suspense, {
|
|
4271
4279
|
fallback: i,
|
|
4272
4280
|
children: a
|
|
4273
4281
|
}), t[6] = i, t[7] = a, t[8] = o) : o = t[8], o;
|
|
4274
|
-
}, to =
|
|
4275
|
-
let t =
|
|
4282
|
+
}, to = Oe({ open: !1 }), no = (e) => {
|
|
4283
|
+
let t = be(14), { node: n, children: r } = e, [i, a] = V(n.attrs?.open || !1), o = i && "is-open", s;
|
|
4276
4284
|
t[0] === o ? s = t[1] : (s = Re("details", o), t[0] = o, t[1] = s);
|
|
4277
4285
|
let c;
|
|
4278
4286
|
t[2] === i ? c = t[3] : (c = /* @__PURE__ */ U("button", {
|
|
@@ -4293,10 +4301,10 @@ var Ga = _(Va), Ka = _(Ha), qa = _(Ua), Ja = _(Wa), Ya = () => [
|
|
|
4293
4301
|
children: [c, u]
|
|
4294
4302
|
}), t[9] = i, t[10] = s, t[11] = c, t[12] = u, t[13] = d) : d = t[13], d;
|
|
4295
4303
|
}, ro = (e) => {
|
|
4296
|
-
let t =
|
|
4304
|
+
let t = be(2), { children: n } = e, r;
|
|
4297
4305
|
return t[0] === n ? r = t[1] : (r = /* @__PURE__ */ U("summary", { children: n }), t[0] = n, t[1] = r), r;
|
|
4298
4306
|
}, io = (e) => {
|
|
4299
|
-
let t =
|
|
4307
|
+
let t = be(5), { children: n } = e, { open: r } = Ne(to), i;
|
|
4300
4308
|
t[0] === r ? i = t[1] : (i = r ? {} : { hidden: !0 }, t[0] = r, t[1] = i);
|
|
4301
4309
|
let a;
|
|
4302
4310
|
return t[2] !== n || t[3] !== i ? (a = /* @__PURE__ */ U("div", {
|
|
@@ -4305,13 +4313,13 @@ var Ga = _(Va), Ka = _(Ha), qa = _(Ua), Ja = _(Wa), Ya = () => [
|
|
|
4305
4313
|
children: n
|
|
4306
4314
|
}), t[2] = n, t[3] = i, t[4] = a) : a = t[4], a;
|
|
4307
4315
|
}, ao = "_10kj0ro0", oo = "_10kj0ro1", so = "_10kj0ro3", co = "_10kj0ro4", lo = (e) => {
|
|
4308
|
-
let t =
|
|
4316
|
+
let t = be(3), { node: n, children: r } = e, i;
|
|
4309
4317
|
return t[0] !== r || t[1] !== n ? (i = /* @__PURE__ */ U(uo, {
|
|
4310
4318
|
node: n,
|
|
4311
4319
|
children: r
|
|
4312
4320
|
}), t[0] = r, t[1] = n, t[2] = i) : i = t[2], i;
|
|
4313
4321
|
}, uo = (e) => {
|
|
4314
|
-
let t =
|
|
4322
|
+
let t = be(29), { node: n, children: r, wrapperAs: i, wrapperProps: a, containerRef: o, containerClassName: s, containerStyle: c, containerExtras: l, imageRef: u, imageProps: d, caption: f } = e, p = i === void 0 ? "div" : i, m = n.attrs, { src: h, alt: g, srcset: _, showCaption: v } = m, y = m["data-align"], b = m["data-link-href"], x = n.content.childCount > 0, S = f === void 0 ? r : f, C = (v || x) && S != null;
|
|
4315
4323
|
if (!h) return null;
|
|
4316
4324
|
let w = g || "", T = _ || void 0, E;
|
|
4317
4325
|
t[0] !== d || t[1] !== u || t[2] !== h || t[3] !== w || t[4] !== T ? (E = /* @__PURE__ */ U("img", {
|
|
@@ -4337,13 +4345,13 @@ var Ga = _(Va), Ka = _(Ha), qa = _(Ua), Ja = _(Wa), Ya = () => [
|
|
|
4337
4345
|
rel: "noopener noreferrer",
|
|
4338
4346
|
children: D
|
|
4339
4347
|
}) : D, t[11] = D, t[12] = b, t[13] = j) : j = t[13];
|
|
4340
|
-
let
|
|
4341
|
-
t[14] !== S || t[15] !== C ? (
|
|
4348
|
+
let M;
|
|
4349
|
+
t[14] !== S || t[15] !== C ? (M = C && /* @__PURE__ */ U("div", {
|
|
4342
4350
|
className: Re("figcaption", "_10kj0ro8"),
|
|
4343
4351
|
children: S
|
|
4344
|
-
}), t[14] = S, t[15] = C, t[16] =
|
|
4345
|
-
let
|
|
4346
|
-
t[17] !== l || t[18] !== o || t[19] !== O || t[20] !== A || t[21] !== j || t[22] !==
|
|
4352
|
+
}), t[14] = S, t[15] = C, t[16] = M) : M = t[16];
|
|
4353
|
+
let N;
|
|
4354
|
+
t[17] !== l || t[18] !== o || t[19] !== O || t[20] !== A || t[21] !== j || t[22] !== M ? (N = /* @__PURE__ */ U("div", {
|
|
4347
4355
|
className: so,
|
|
4348
4356
|
children: /* @__PURE__ */ W("div", {
|
|
4349
4357
|
ref: o,
|
|
@@ -4352,20 +4360,20 @@ var Ga = _(Va), Ka = _(Ha), qa = _(Ua), Ja = _(Wa), Ya = () => [
|
|
|
4352
4360
|
children: [
|
|
4353
4361
|
j,
|
|
4354
4362
|
l,
|
|
4355
|
-
|
|
4363
|
+
M
|
|
4356
4364
|
]
|
|
4357
4365
|
})
|
|
4358
|
-
}), t[17] = l, t[18] = o, t[19] = O, t[20] = A, t[21] = j, t[22] =
|
|
4359
|
-
let
|
|
4360
|
-
return t[24] !== p || t[25] !== y || t[26] !==
|
|
4366
|
+
}), t[17] = l, t[18] = o, t[19] = O, t[20] = A, t[21] = j, t[22] = M, t[23] = N) : N = t[23];
|
|
4367
|
+
let ee;
|
|
4368
|
+
return t[24] !== p || t[25] !== y || t[26] !== N || t[27] !== a ? (ee = /* @__PURE__ */ U(p, {
|
|
4361
4369
|
"data-align": y,
|
|
4362
4370
|
className: ao,
|
|
4363
4371
|
...a,
|
|
4364
|
-
children:
|
|
4365
|
-
}), t[24] = p, t[25] = y, t[26] =
|
|
4372
|
+
children: N
|
|
4373
|
+
}), t[24] = p, t[25] = y, t[26] = N, t[27] = a, t[28] = ee) : ee = t[28], ee;
|
|
4366
4374
|
}, fo = Ya(), po = (e) => Be(e, fo), mo = (t) => {
|
|
4367
|
-
let n =
|
|
4368
|
-
n[0] === t ? (r = n[1], i = n[2],
|
|
4375
|
+
let n = be(18), r, i, a, s, c;
|
|
4376
|
+
n[0] === t ? (r = n[1], i = n[2], a = n[3], s = n[4], c = n[5]) : ({content: i, className: r, ref: a, theme: c, ...s} = t, n[0] = t, n[1] = r, n[2] = i, n[3] = a, n[4] = s, n[5] = c);
|
|
4369
4377
|
let l;
|
|
4370
4378
|
n[6] === i ? l = n[7] : (l = Ve({
|
|
4371
4379
|
content: i,
|
|
@@ -4381,18 +4389,18 @@ var Ga = _(Va), Ka = _(Ha), qa = _(Ua), Ja = _(Wa), Ya = () => [
|
|
|
4381
4389
|
let u = l, d;
|
|
4382
4390
|
n[8] === r ? d = n[9] : (d = Le(e, r), n[8] = r, n[9] = d);
|
|
4383
4391
|
let f;
|
|
4384
|
-
n[10] !== u || n[11] !==
|
|
4385
|
-
ref:
|
|
4392
|
+
n[10] !== u || n[11] !== a || n[12] !== s || n[13] !== d ? (f = /* @__PURE__ */ U("div", {
|
|
4393
|
+
ref: a,
|
|
4386
4394
|
className: d,
|
|
4387
4395
|
...s,
|
|
4388
4396
|
children: u
|
|
4389
|
-
}), n[10] = u, n[11] =
|
|
4397
|
+
}), n[10] = u, n[11] = a, n[12] = s, n[13] = d, n[14] = f) : f = n[14];
|
|
4390
4398
|
let p;
|
|
4391
|
-
return n[15] !== f || n[16] !== c ? (p = /* @__PURE__ */ U(
|
|
4399
|
+
return n[15] !== f || n[16] !== c ? (p = /* @__PURE__ */ U(o, {
|
|
4392
4400
|
theme: c,
|
|
4393
4401
|
children: f
|
|
4394
4402
|
}), n[15] = f, n[16] = c, n[17] = p) : p = n[17], p;
|
|
4395
|
-
}, ho = ({ className: e, content: n, config: r, styles:
|
|
4403
|
+
}, ho = ({ className: e, content: n, config: r, styles: i, elementKey: o, generatedClassName: s, ref: c, ...l }) => {
|
|
4396
4404
|
let u = z(() => {
|
|
4397
4405
|
if (n && typeof n == "object") {
|
|
4398
4406
|
if ("json" in n && n.json) return n.json;
|
|
@@ -4403,7 +4411,7 @@ var Ga = _(Va), Ka = _(Ha), qa = _(Ua), Ja = _(Wa), Ya = () => [
|
|
|
4403
4411
|
if (!r?.theme) return;
|
|
4404
4412
|
let { baseSpacing: e, ...n } = r.theme;
|
|
4405
4413
|
return {
|
|
4406
|
-
...
|
|
4414
|
+
...a(n),
|
|
4407
4415
|
...e ? t({ baseSpacing: e }) : void 0
|
|
4408
4416
|
};
|
|
4409
4417
|
}, [r?.theme]);
|
|
@@ -4412,13 +4420,13 @@ var Ga = _(Va), Ka = _(Ha), qa = _(Ua), Ja = _(Wa), Ya = () => [
|
|
|
4412
4420
|
content: u,
|
|
4413
4421
|
"data-levo_element_key": o,
|
|
4414
4422
|
"data-levo_element_type": "BlogContent",
|
|
4415
|
-
className:
|
|
4423
|
+
className: P("mx-0 min-h-6 w-auto max-w-none", e, s),
|
|
4416
4424
|
theme: d ? { style: d } : void 0,
|
|
4417
4425
|
...l
|
|
4418
4426
|
});
|
|
4419
4427
|
};
|
|
4420
4428
|
ho.displayName = "BaseBlogContent";
|
|
4421
|
-
var go =
|
|
4429
|
+
var go = v(ho), _o = ({ backgroundVideo: e }) => e?.media?.location ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("video", {
|
|
4422
4430
|
className: "background_video",
|
|
4423
4431
|
autoPlay: !0,
|
|
4424
4432
|
loop: !0,
|
|
@@ -4441,30 +4449,30 @@ var go = _(ho), _o = ({ backgroundVideo: e }) => e?.media?.location ? /* @__PURE
|
|
|
4441
4449
|
inset: 0,
|
|
4442
4450
|
zIndex: -1
|
|
4443
4451
|
}
|
|
4444
|
-
})] }) : null, vo =
|
|
4452
|
+
})] }) : null, vo = ke(({ children: e, className: t, elementKey: n, generatedClassName: r, content: i, config: a, styles: o, ...s }, c) => /* @__PURE__ */ W("div", {
|
|
4445
4453
|
ref: c,
|
|
4446
4454
|
"data-levo_element_key": n,
|
|
4447
4455
|
"data-levo_element_type": "Box",
|
|
4448
|
-
className:
|
|
4456
|
+
className: P(t, r),
|
|
4449
4457
|
...s,
|
|
4450
4458
|
children: [/* @__PURE__ */ U(_o, { backgroundVideo: a?.backgroundVideo }), e]
|
|
4451
4459
|
}));
|
|
4452
4460
|
vo.displayName = "BaseBox";
|
|
4453
|
-
var yo =
|
|
4461
|
+
var yo = v(vo), bo = I.createContext(null);
|
|
4454
4462
|
function xo() {
|
|
4455
|
-
let e =
|
|
4463
|
+
let e = I.useContext(bo);
|
|
4456
4464
|
if (!e) throw Error("useCarousel must be used within a <Carousel />");
|
|
4457
4465
|
return e;
|
|
4458
4466
|
}
|
|
4459
4467
|
var So = (e) => {
|
|
4460
|
-
let [t, n] =
|
|
4468
|
+
let [t, n] = I.useState(0), [r, i] = I.useState([]), a = I.useCallback((t) => {
|
|
4461
4469
|
e && e.scrollTo(t);
|
|
4462
|
-
}, [e]), o =
|
|
4470
|
+
}, [e]), o = I.useCallback((e) => {
|
|
4463
4471
|
e && i(e.scrollSnapList());
|
|
4464
|
-
}, []), s =
|
|
4472
|
+
}, []), s = I.useCallback((e) => {
|
|
4465
4473
|
e && n(e.selectedScrollSnap());
|
|
4466
4474
|
}, []);
|
|
4467
|
-
return
|
|
4475
|
+
return I.useEffect(() => {
|
|
4468
4476
|
e && (o(e), s(e), e.on("reInit", o).on("reInit", s).on("select", s));
|
|
4469
4477
|
}, [
|
|
4470
4478
|
e,
|
|
@@ -4475,7 +4483,7 @@ var So = (e) => {
|
|
|
4475
4483
|
scrollSnaps: r,
|
|
4476
4484
|
onDotButtonClick: a
|
|
4477
4485
|
};
|
|
4478
|
-
}, Co =
|
|
4486
|
+
}, Co = I.forwardRef(({ orientation: e = "horizontal", opts: t, setApi: n, className: r, children: i, elementKey: a, config: o, styles: s, generatedClassName: c, ...l }, u) => {
|
|
4479
4487
|
let d = [Bn()];
|
|
4480
4488
|
o?.carousel?.autoScroll && d.push(Ln({
|
|
4481
4489
|
speed: o.carousel.speed ?? 2,
|
|
@@ -4495,18 +4503,18 @@ var So = (e) => {
|
|
|
4495
4503
|
loop: o?.carousel?.loop ?? !1,
|
|
4496
4504
|
direction: o?.carousel?.autoScroll ? void 0 : o?.carousel?.direction ?? "ltr",
|
|
4497
4505
|
axis: e === "horizontal" ? "x" : "y"
|
|
4498
|
-
}, d), [m, h] =
|
|
4506
|
+
}, d), [m, h] = I.useState(!1), [g, _] = I.useState(!1), v = I.useCallback((e) => {
|
|
4499
4507
|
e && (h(e.canScrollPrev()), _(e.canScrollNext()));
|
|
4500
|
-
}, []), y =
|
|
4508
|
+
}, []), y = I.useCallback(() => {
|
|
4501
4509
|
p?.scrollPrev();
|
|
4502
|
-
}, [p]), b =
|
|
4510
|
+
}, [p]), b = I.useCallback(() => {
|
|
4503
4511
|
p?.scrollNext();
|
|
4504
|
-
}, [p]), x =
|
|
4512
|
+
}, [p]), x = I.useCallback((e) => {
|
|
4505
4513
|
e.key === "ArrowLeft" ? (e.preventDefault(), y()) : e.key === "ArrowRight" && (e.preventDefault(), b());
|
|
4506
4514
|
}, [y, b]);
|
|
4507
|
-
return
|
|
4515
|
+
return I.useEffect(() => {
|
|
4508
4516
|
!p || !n || n(p);
|
|
4509
|
-
}, [p, n]),
|
|
4517
|
+
}, [p, n]), I.useEffect(() => {
|
|
4510
4518
|
if (p) return v(p), p.on("reInit", v), p.on("select", v), () => {
|
|
4511
4519
|
p?.off("select", v);
|
|
4512
4520
|
};
|
|
@@ -4528,7 +4536,7 @@ var So = (e) => {
|
|
|
4528
4536
|
ref: u,
|
|
4529
4537
|
"data-levo_element_key": a,
|
|
4530
4538
|
onKeyDownCapture: x,
|
|
4531
|
-
className:
|
|
4539
|
+
className: P("relative", c, r),
|
|
4532
4540
|
role: "region",
|
|
4533
4541
|
"aria-roledescription": "carousel",
|
|
4534
4542
|
...l,
|
|
@@ -4537,35 +4545,35 @@ var So = (e) => {
|
|
|
4537
4545
|
});
|
|
4538
4546
|
});
|
|
4539
4547
|
Co.displayName = "BaseCarousel";
|
|
4540
|
-
var wo =
|
|
4548
|
+
var wo = I.forwardRef(({ className: e, ...t }, n) => {
|
|
4541
4549
|
let { carouselRef: r, orientation: i } = xo();
|
|
4542
4550
|
return /* @__PURE__ */ U("div", {
|
|
4543
4551
|
ref: r,
|
|
4544
4552
|
className: "overflow-hidden",
|
|
4545
4553
|
children: /* @__PURE__ */ U("div", {
|
|
4546
4554
|
ref: n,
|
|
4547
|
-
className:
|
|
4555
|
+
className: P("flex", i === "horizontal" ? "-ml-4" : "-mt-4 flex-col", e),
|
|
4548
4556
|
...t
|
|
4549
4557
|
})
|
|
4550
4558
|
});
|
|
4551
4559
|
});
|
|
4552
4560
|
wo.displayName = "CarouselContent";
|
|
4553
|
-
var To =
|
|
4561
|
+
var To = I.forwardRef(({ className: e, ...t }, n) => {
|
|
4554
4562
|
let { orientation: r } = xo();
|
|
4555
4563
|
return /* @__PURE__ */ U("div", {
|
|
4556
4564
|
ref: n,
|
|
4557
4565
|
role: "group",
|
|
4558
4566
|
"aria-roledescription": "slide",
|
|
4559
|
-
className:
|
|
4567
|
+
className: P("carousel-item min-w-0 shrink-0 grow-0", r === "horizontal" ? "pl-4" : "pt-4", e),
|
|
4560
4568
|
...t
|
|
4561
4569
|
});
|
|
4562
4570
|
});
|
|
4563
4571
|
To.displayName = "CarouselItem";
|
|
4564
|
-
var Eo =
|
|
4572
|
+
var Eo = I.forwardRef(({ className: e, ...t }, n) => {
|
|
4565
4573
|
let { orientation: r, scrollPrev: i, canScrollPrev: a } = xo();
|
|
4566
|
-
return /* @__PURE__ */ W(
|
|
4574
|
+
return /* @__PURE__ */ W(E, {
|
|
4567
4575
|
ref: n,
|
|
4568
|
-
className:
|
|
4576
|
+
className: P("absolute h-8 w-8 rounded-full", r === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", e),
|
|
4569
4577
|
disabled: !a,
|
|
4570
4578
|
onClick: i,
|
|
4571
4579
|
...t,
|
|
@@ -4576,11 +4584,11 @@ var Eo = F.forwardRef(({ className: e, ...t }, n) => {
|
|
|
4576
4584
|
});
|
|
4577
4585
|
});
|
|
4578
4586
|
Eo.displayName = "CarouselPrevious";
|
|
4579
|
-
var Do =
|
|
4587
|
+
var Do = I.forwardRef(({ className: e, ...t }, n) => {
|
|
4580
4588
|
let { orientation: r, scrollNext: i, canScrollNext: a } = xo();
|
|
4581
|
-
return /* @__PURE__ */ W(
|
|
4589
|
+
return /* @__PURE__ */ W(E, {
|
|
4582
4590
|
ref: n,
|
|
4583
|
-
className:
|
|
4591
|
+
className: P("absolute h-8 w-8 rounded-full", r === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", e),
|
|
4584
4592
|
disabled: !a,
|
|
4585
4593
|
onClick: i,
|
|
4586
4594
|
...t,
|
|
@@ -4591,41 +4599,41 @@ var Do = F.forwardRef(({ className: e, ...t }, n) => {
|
|
|
4591
4599
|
});
|
|
4592
4600
|
});
|
|
4593
4601
|
Do.displayName = "CarouselNext";
|
|
4594
|
-
var Oo =
|
|
4602
|
+
var Oo = I.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ U("button", {
|
|
4595
4603
|
ref: r,
|
|
4596
4604
|
type: "button",
|
|
4597
|
-
className:
|
|
4605
|
+
className: P("relative inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-full border-0 bg-transparent p-0 transition-all", "after:flex after:h-3.5 after:w-3.5 after:items-center after:justify-center after:rounded-full after:border-2 after:border-gray-200 after:content-['']", "hover:after:border-gray-400", e),
|
|
4598
4606
|
...n,
|
|
4599
4607
|
children: t
|
|
4600
4608
|
}));
|
|
4601
4609
|
Oo.displayName = "CarouselDotButton";
|
|
4602
|
-
var ko =
|
|
4610
|
+
var ko = I.forwardRef(({ className: e, ...t }, n) => {
|
|
4603
4611
|
let { api: r } = xo(), { selectedIndex: i, scrollSnaps: a, onDotButtonClick: o } = So(r);
|
|
4604
4612
|
return /* @__PURE__ */ U("div", {
|
|
4605
4613
|
ref: n,
|
|
4606
|
-
className:
|
|
4614
|
+
className: P("mt-4 flex flex-wrap items-center justify-center gap-0", e),
|
|
4607
4615
|
...t,
|
|
4608
4616
|
children: a.map((e, t) => /* @__PURE__ */ U(Oo, {
|
|
4609
4617
|
onClick: () => o(t),
|
|
4610
|
-
className:
|
|
4618
|
+
className: P(t === i && "after:border-white after:bg-white"),
|
|
4611
4619
|
"aria-label": `Go to slide ${t + 1}`
|
|
4612
4620
|
}, t))
|
|
4613
4621
|
});
|
|
4614
4622
|
});
|
|
4615
4623
|
ko.displayName = "CarouselDots";
|
|
4616
|
-
var Ao =
|
|
4624
|
+
var Ao = v(Co), jo = ke(({ children: e, className: t, elementKey: n, generatedClassName: r, content: i, config: a, styles: o, ...s }, c) => /* @__PURE__ */ W("div", {
|
|
4617
4625
|
ref: c,
|
|
4618
4626
|
"data-levo_element_key": n,
|
|
4619
4627
|
"data-levo_element_type": "Container",
|
|
4620
|
-
className:
|
|
4628
|
+
className: P(t, r),
|
|
4621
4629
|
...s,
|
|
4622
4630
|
children: [/* @__PURE__ */ U(_o, { backgroundVideo: a?.backgroundVideo }), e]
|
|
4623
4631
|
}));
|
|
4624
4632
|
jo.displayName = "BaseContainer";
|
|
4625
|
-
var Mo =
|
|
4633
|
+
var Mo = v(jo), No = L(() => import("./dist-BjFMATnH.js").then((e) => e.t).then((e) => ({ default: e.CollectionForm }))), Po = v(({ elementKey: e, generatedClassName: t, config: n, className: r, initialValues: i, theme: a, onSubmit: o, isLoading: s }) => /* @__PURE__ */ U("div", {
|
|
4626
4634
|
"data-levo_element_key": e,
|
|
4627
|
-
className:
|
|
4628
|
-
children: /* @__PURE__ */ U(
|
|
4635
|
+
className: P(r, t),
|
|
4636
|
+
children: /* @__PURE__ */ U(De, {
|
|
4629
4637
|
fallback: /* @__PURE__ */ U("div", {}),
|
|
4630
4638
|
children: /* @__PURE__ */ U(No, {
|
|
4631
4639
|
uiConfig: {
|
|
@@ -4644,46 +4652,46 @@ var Mo = _(jo), No = I(() => import("./dist-CsX9NP5P.js").then((e) => e.t).then(
|
|
|
4644
4652
|
isLoading: s
|
|
4645
4653
|
})
|
|
4646
4654
|
})
|
|
4647
|
-
})), Fo =
|
|
4648
|
-
let
|
|
4649
|
-
if (!
|
|
4650
|
-
let e =
|
|
4651
|
-
if (!e) return
|
|
4655
|
+
})), Fo = L(() => import("./dist-BjFMATnH.js").then((e) => e.t).then((e) => ({ default: e.CollectionFormRenderer }))), Io = L(() => import("./bookingCard-MDpR8SL_.js").then((e) => ({ default: e.BookingCard }))), Lo = L(() => import("./BillingStep-BNRcxjRl.js").then((e) => ({ default: e.BillingStep }))), Ro = v(({ elementKey: e, generatedClassName: t, config: r, className: i, initialValues: o, theme: s }) => {
|
|
4656
|
+
let c = F(), { workspace: l } = A(), u = z(() => {
|
|
4657
|
+
if (!r?.theme && !s) return;
|
|
4658
|
+
let e = r?.theme;
|
|
4659
|
+
if (!e) return s;
|
|
4652
4660
|
let t = {
|
|
4653
|
-
...
|
|
4661
|
+
...a({ colors: {
|
|
4654
4662
|
text: e.colors?.text,
|
|
4655
4663
|
mutedForeground: e.colors?.mutedForeground,
|
|
4656
4664
|
input: e.colors?.input,
|
|
4657
4665
|
inputForeground: e.colors?.inputForeground,
|
|
4658
4666
|
border: e.colors?.border
|
|
4659
4667
|
} }),
|
|
4660
|
-
...
|
|
4668
|
+
...n({
|
|
4661
4669
|
form: { gap: e.form?.gap },
|
|
4662
4670
|
input: { borderRadius: e.input?.borderRadius }
|
|
4663
4671
|
}),
|
|
4664
|
-
...
|
|
4672
|
+
...s?.style
|
|
4665
4673
|
};
|
|
4666
4674
|
return {
|
|
4667
|
-
...
|
|
4675
|
+
...s,
|
|
4668
4676
|
style: t
|
|
4669
4677
|
};
|
|
4670
|
-
}, [
|
|
4678
|
+
}, [r?.theme, s]), [d, f] = V({
|
|
4671
4679
|
showCard: !1,
|
|
4672
4680
|
summary: null,
|
|
4673
4681
|
isLoading: !1
|
|
4674
|
-
}), [
|
|
4682
|
+
}), [p, m] = V({
|
|
4675
4683
|
active: !1,
|
|
4676
4684
|
pendingContentId: null,
|
|
4677
4685
|
pendingCollectionKey: null,
|
|
4678
4686
|
formData: null
|
|
4679
|
-
}), [
|
|
4680
|
-
let e =
|
|
4681
|
-
if (e) for (let
|
|
4687
|
+
}), [h, g] = V(null), _ = z(() => {
|
|
4688
|
+
let e = r?.form?.schema, t = [], n = (e) => {
|
|
4689
|
+
if (e) for (let r of e) (r.allow_public_submit === !1 || r.allow_public_view === !1) && t.push(r.key), n(r.fields);
|
|
4682
4690
|
};
|
|
4683
|
-
if (e?.sections) for (let t of e.sections)
|
|
4684
|
-
return [...
|
|
4685
|
-
}, [
|
|
4686
|
-
let e =
|
|
4691
|
+
if (e?.sections) for (let t of e.sections) n(t.fields);
|
|
4692
|
+
return [...r?.form?.hidden_fields ?? [], ...t];
|
|
4693
|
+
}, [r?.form?.schema, r?.form?.hidden_fields]), v = z(() => {
|
|
4694
|
+
let e = r?.form?.success, t = r?.form?.redirect_url;
|
|
4687
4695
|
if (e) {
|
|
4688
4696
|
let n = e.action ?? (t ? {
|
|
4689
4697
|
type: "redirect",
|
|
@@ -4699,17 +4707,17 @@ var Mo = _(jo), No = I(() => import("./dist-CsX9NP5P.js").then((e) => e.t).then(
|
|
|
4699
4707
|
type: "redirect",
|
|
4700
4708
|
value: t
|
|
4701
4709
|
} };
|
|
4702
|
-
}, [
|
|
4710
|
+
}, [r?.form?.success, r?.form?.redirect_url]), y = async (e, t) => {
|
|
4703
4711
|
try {
|
|
4704
|
-
|
|
4712
|
+
f((e) => ({
|
|
4705
4713
|
...e,
|
|
4706
4714
|
isLoading: !0
|
|
4707
4715
|
}));
|
|
4708
|
-
let n = await
|
|
4716
|
+
let n = await c?.fetch?.url("/v1/payment/booking/create")?.options({ headers: { Origin: l?.id || "" } })?.post({
|
|
4709
4717
|
content_id: e,
|
|
4710
4718
|
collection_key: t
|
|
4711
4719
|
}).json();
|
|
4712
|
-
if (n?.status && n?.content?.data) return
|
|
4720
|
+
if (n?.status && n?.content?.data) return f({
|
|
4713
4721
|
showCard: !0,
|
|
4714
4722
|
summary: n.content.data,
|
|
4715
4723
|
isLoading: !1
|
|
@@ -4717,57 +4725,57 @@ var Mo = _(jo), No = I(() => import("./dist-CsX9NP5P.js").then((e) => e.t).then(
|
|
|
4717
4725
|
} catch (e) {
|
|
4718
4726
|
console.error("Failed to create booking:", e);
|
|
4719
4727
|
}
|
|
4720
|
-
return
|
|
4728
|
+
return f((e) => ({
|
|
4721
4729
|
...e,
|
|
4722
4730
|
isLoading: !1
|
|
4723
4731
|
})), !1;
|
|
4724
4732
|
};
|
|
4725
|
-
return
|
|
4733
|
+
return d.isLoading ? /* @__PURE__ */ U("div", {
|
|
4726
4734
|
"data-levo_element_key": e,
|
|
4727
|
-
className:
|
|
4735
|
+
className: P(i, t),
|
|
4728
4736
|
children: /* @__PURE__ */ U("div", {
|
|
4729
4737
|
className: "flex items-center justify-center py-8",
|
|
4730
4738
|
children: /* @__PURE__ */ U("div", { className: "size-6 animate-spin rounded-full border-2 border-gray-300 border-t-orange-500" })
|
|
4731
4739
|
})
|
|
4732
|
-
}) :
|
|
4740
|
+
}) : p.active ? /* @__PURE__ */ U("div", {
|
|
4733
4741
|
"data-levo_element_key": e,
|
|
4734
|
-
className:
|
|
4735
|
-
children: /* @__PURE__ */ U(
|
|
4742
|
+
className: P(i, t),
|
|
4743
|
+
children: /* @__PURE__ */ U(De, {
|
|
4736
4744
|
fallback: /* @__PURE__ */ U("div", {}),
|
|
4737
4745
|
children: /* @__PURE__ */ U(Lo, {
|
|
4738
4746
|
onSubmit: async (e) => {
|
|
4739
|
-
|
|
4740
|
-
let { pendingContentId: t, pendingCollectionKey: n } =
|
|
4741
|
-
|
|
4747
|
+
g(e);
|
|
4748
|
+
let { pendingContentId: t, pendingCollectionKey: n } = p;
|
|
4749
|
+
m((e) => ({
|
|
4742
4750
|
...e,
|
|
4743
4751
|
active: !1
|
|
4744
|
-
})), t && n && await
|
|
4752
|
+
})), t && n && await y(t, n);
|
|
4745
4753
|
},
|
|
4746
|
-
prefillName:
|
|
4754
|
+
prefillName: p.formData?.name
|
|
4747
4755
|
})
|
|
4748
4756
|
})
|
|
4749
|
-
}) :
|
|
4757
|
+
}) : d.showCard && d.summary ? /* @__PURE__ */ U("div", {
|
|
4750
4758
|
"data-levo_element_key": e,
|
|
4751
|
-
className:
|
|
4752
|
-
children: /* @__PURE__ */ U(
|
|
4759
|
+
className: P(i, t),
|
|
4760
|
+
children: /* @__PURE__ */ U(De, {
|
|
4753
4761
|
fallback: /* @__PURE__ */ U("div", {}),
|
|
4754
4762
|
children: /* @__PURE__ */ U(Io, {
|
|
4755
|
-
summary:
|
|
4756
|
-
billingDetails:
|
|
4757
|
-
onBillingEdit:
|
|
4763
|
+
summary: d.summary,
|
|
4764
|
+
billingDetails: h,
|
|
4765
|
+
onBillingEdit: g,
|
|
4758
4766
|
onComplete: () => {
|
|
4759
|
-
|
|
4767
|
+
f({
|
|
4760
4768
|
showCard: !1,
|
|
4761
4769
|
summary: null,
|
|
4762
4770
|
isLoading: !1
|
|
4763
|
-
}),
|
|
4771
|
+
}), g(null), r?.form?.redirect_url && (window.location.href = r.form.redirect_url);
|
|
4764
4772
|
}
|
|
4765
4773
|
})
|
|
4766
4774
|
})
|
|
4767
4775
|
}) : /* @__PURE__ */ U("div", {
|
|
4768
4776
|
"data-levo_element_key": e,
|
|
4769
|
-
className:
|
|
4770
|
-
children: /* @__PURE__ */ U(
|
|
4777
|
+
className: P(i, t),
|
|
4778
|
+
children: /* @__PURE__ */ U(De, {
|
|
4771
4779
|
fallback: /* @__PURE__ */ U("div", {}),
|
|
4772
4780
|
children: /* @__PURE__ */ U(Fo, {
|
|
4773
4781
|
uiConfig: {
|
|
@@ -4776,26 +4784,26 @@ var Mo = _(jo), No = I(() => import("./dist-CsX9NP5P.js").then((e) => e.t).then(
|
|
|
4776
4784
|
},
|
|
4777
4785
|
submitButtonConfig: {
|
|
4778
4786
|
show: !0,
|
|
4779
|
-
text:
|
|
4787
|
+
text: r?.form?.submit_button_label ?? "Submit"
|
|
4780
4788
|
},
|
|
4781
|
-
fetchedSchema:
|
|
4782
|
-
hiddenFields:
|
|
4783
|
-
externalInitialValues:
|
|
4784
|
-
theme:
|
|
4785
|
-
formVariant:
|
|
4789
|
+
fetchedSchema: r?.form?.schema,
|
|
4790
|
+
hiddenFields: _,
|
|
4791
|
+
externalInitialValues: o,
|
|
4792
|
+
theme: u,
|
|
4793
|
+
formVariant: r?.form?.form_variant ?? "default",
|
|
4786
4794
|
onSuccess: async ({ response: e, meta: t }) => {
|
|
4787
|
-
let
|
|
4788
|
-
if (
|
|
4789
|
-
|
|
4795
|
+
let n = e?._id, i = r?.form?.schema?.key;
|
|
4796
|
+
if (n && i && t?.booking_config?.enabled) {
|
|
4797
|
+
m({
|
|
4790
4798
|
active: !0,
|
|
4791
|
-
pendingContentId:
|
|
4799
|
+
pendingContentId: n,
|
|
4792
4800
|
pendingCollectionKey: i,
|
|
4793
4801
|
formData: e
|
|
4794
4802
|
});
|
|
4795
4803
|
return;
|
|
4796
4804
|
}
|
|
4797
4805
|
},
|
|
4798
|
-
successConfig:
|
|
4806
|
+
successConfig: v
|
|
4799
4807
|
})
|
|
4800
4808
|
})
|
|
4801
4809
|
});
|
|
@@ -4805,14 +4813,14 @@ var Mo = _(jo), No = I(() => import("./dist-CsX9NP5P.js").then((e) => e.t).then(
|
|
|
4805
4813
|
function Z({ className: e, ...t }) {
|
|
4806
4814
|
return /* @__PURE__ */ U("div", {
|
|
4807
4815
|
"data-slot": "skeleton",
|
|
4808
|
-
className:
|
|
4816
|
+
className: P("animate-pulse rounded-md bg-gray-200", e),
|
|
4809
4817
|
...t
|
|
4810
4818
|
});
|
|
4811
4819
|
}
|
|
4812
4820
|
//#endregion
|
|
4813
4821
|
//#region src/elements/forum/categoryFilter/CategoryFilter.tsx
|
|
4814
4822
|
var zo = ({ forumKey: e, selectedCategories: t, onCategoryToggle: n, className: r }) => {
|
|
4815
|
-
let { fetch: i, logger: a } =
|
|
4823
|
+
let { fetch: i, logger: a } = F(), [o, s] = V([]), [c, l] = V(!1), [u, d] = V(!1), f = B(!1), p = Me(async () => {
|
|
4816
4824
|
if (!(!e || f.current)) {
|
|
4817
4825
|
l(!0), d(!1);
|
|
4818
4826
|
try {
|
|
@@ -4841,15 +4849,15 @@ var zo = ({ forumKey: e, selectedCategories: t, onCategoryToggle: n, className:
|
|
|
4841
4849
|
,
|
|
4842
4850
|
,
|
|
4843
4851
|
,
|
|
4844
|
-
]].map((e, t) => /* @__PURE__ */ U(Z, { className:
|
|
4845
|
-
className:
|
|
4852
|
+
]].map((e, t) => /* @__PURE__ */ U(Z, { className: P("h-8 w-20 rounded-full", r) }, `category-skeleton-${t}`)) }) : u ? /* @__PURE__ */ U("p", {
|
|
4853
|
+
className: P("text-red-500 text-sm", r),
|
|
4846
4854
|
children: "Failed to load categories"
|
|
4847
4855
|
}) : o.length === 0 ? null : /* @__PURE__ */ U(H, { children: o.map((e) => /* @__PURE__ */ U("button", {
|
|
4848
4856
|
onClick: () => n(e._id),
|
|
4849
|
-
className:
|
|
4857
|
+
className: P("rounded-sm border border-[#E5E5E5] px-3 py-1.5 font-medium text-text-1 text-xs uppercase transition-colors", t.includes(e._id) ? "border-brand/25 bg-brand/5" : "bg-white"),
|
|
4850
4858
|
children: e.name
|
|
4851
4859
|
}, e._id)) });
|
|
4852
|
-
}, Bo =
|
|
4860
|
+
}, Bo = Oe(void 0), Vo = ({ children: e, forum: t, isMember: n, isLoadingMembership: r, isInviteOnly: i, canInteractWithPosts: a, canInteractWithComments: o, joinRequest: s = null, isJoinRequestPending: c = !1, allowJoinRequests: l = !1, submitJoinRequest: u = async () => !1, refreshMembershipStatus: d = async () => {} }) => /* @__PURE__ */ U(Bo.Provider, {
|
|
4853
4861
|
value: {
|
|
4854
4862
|
forum: t,
|
|
4855
4863
|
isMember: n,
|
|
@@ -4879,10 +4887,10 @@ var zo = ({ forumKey: e, selectedCategories: t, onCategoryToggle: n, className:
|
|
|
4879
4887
|
submitJoinRequest: async () => !1,
|
|
4880
4888
|
refreshMembershipStatus: async () => {}
|
|
4881
4889
|
} : e;
|
|
4882
|
-
}, Uo = Fn.Provider, Wo = Fn.Root, Go = Fn.Trigger, Ko = Fn.Portal, qo =
|
|
4890
|
+
}, Uo = Fn.Provider, Wo = Fn.Root, Go = Fn.Trigger, Ko = Fn.Portal, qo = Te.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ U(Fn.Content, {
|
|
4883
4891
|
ref: r,
|
|
4884
4892
|
sideOffset: t,
|
|
4885
|
-
className:
|
|
4893
|
+
className: P("fade-in-0 zoom-in-95 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 animate-in overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-popover-foreground text-xs shadow-md data-[state=closed]:animate-out", e),
|
|
4886
4894
|
...n
|
|
4887
4895
|
}));
|
|
4888
4896
|
qo.displayName = Fn.Content.displayName;
|
|
@@ -4898,13 +4906,13 @@ var Jo = ({ children: e, label: t, labelClassName: n, asChild: r = !0, contentPr
|
|
|
4898
4906
|
let u = () => {
|
|
4899
4907
|
o || (i?.(), t(!1));
|
|
4900
4908
|
};
|
|
4901
|
-
return /* @__PURE__ */ U(
|
|
4909
|
+
return /* @__PURE__ */ U(oe, {
|
|
4902
4910
|
open: e,
|
|
4903
4911
|
onOpenChange: (e) => {
|
|
4904
4912
|
!o && !e && u();
|
|
4905
4913
|
},
|
|
4906
|
-
children: /* @__PURE__ */ W(
|
|
4907
|
-
className:
|
|
4914
|
+
children: /* @__PURE__ */ W(ne, {
|
|
4915
|
+
className: P("max-w-md gap-0 space-y-2 overflow-hidden p-0"),
|
|
4908
4916
|
showCloseButton: !1,
|
|
4909
4917
|
children: [/* @__PURE__ */ W("div", {
|
|
4910
4918
|
className: "space-y-2 px-0 py-0",
|
|
@@ -4917,21 +4925,21 @@ var Jo = ({ children: e, label: t, labelClassName: n, asChild: r = !0, contentPr
|
|
|
4917
4925
|
})]
|
|
4918
4926
|
}), /* @__PURE__ */ W("div", {
|
|
4919
4927
|
className: "flex items-center justify-end gap-3 border-[#D1D6E1] border-t pt-2",
|
|
4920
|
-
children: [/* @__PURE__ */ U(
|
|
4928
|
+
children: [/* @__PURE__ */ U(x, {
|
|
4921
4929
|
elementKey: "alert-dialog-cancel",
|
|
4922
4930
|
onClick: u,
|
|
4923
4931
|
disabled: o,
|
|
4924
4932
|
className: "",
|
|
4925
4933
|
config: { selectedVariants: { Button_Variants: "Outline" } },
|
|
4926
4934
|
children: s
|
|
4927
|
-
}), /* @__PURE__ */ U(
|
|
4935
|
+
}), /* @__PURE__ */ U(x, {
|
|
4928
4936
|
elementKey: "alert-dialog-confirm",
|
|
4929
4937
|
onClick: () => {
|
|
4930
4938
|
o || a();
|
|
4931
4939
|
},
|
|
4932
4940
|
disabled: o,
|
|
4933
4941
|
isLoading: o,
|
|
4934
|
-
className:
|
|
4942
|
+
className: P("", l),
|
|
4935
4943
|
children: c
|
|
4936
4944
|
})]
|
|
4937
4945
|
})]
|
|
@@ -4947,15 +4955,15 @@ var Jo = ({ children: e, label: t, labelClassName: n, asChild: r = !0, contentPr
|
|
|
4947
4955
|
slideFromRight: "_slideFromRight_ob3yj_1",
|
|
4948
4956
|
slideFromLeft: "_slideFromLeft_ob3yj_1",
|
|
4949
4957
|
slideFromBottom: "_slideFromBottom_ob3yj_1"
|
|
4950
|
-
}, Zo = Mn.Root, Qo =
|
|
4958
|
+
}, Zo = Mn.Root, Qo = Te.forwardRef(({ className: e, elementKey: t, generatedClassName: n, content: r, config: i, styles: a, ...o }, s) => /* @__PURE__ */ U(Mn.Trigger, {
|
|
4951
4959
|
ref: s,
|
|
4952
4960
|
"data-levo_element_key": t,
|
|
4953
4961
|
"data-levo_element_type": "PopoverTrigger",
|
|
4954
|
-
className:
|
|
4962
|
+
className: P("PopoverTrigger", e, n),
|
|
4955
4963
|
...o
|
|
4956
4964
|
}));
|
|
4957
4965
|
Qo.displayName = "BasePopoverTrigger";
|
|
4958
|
-
var $o =
|
|
4966
|
+
var $o = Te.forwardRef(({ className: e, elementKey: t, generatedClassName: n, content: r, config: i, styles: a, inPortal: o = !0, portalContainer: s, align: c = "center", sideOffset: l = 4, ...u }, d) => /* @__PURE__ */ U(H, { children: o ? /* @__PURE__ */ U(Mn.Portal, {
|
|
4959
4967
|
container: s,
|
|
4960
4968
|
children: /* @__PURE__ */ U(Mn.Content, {
|
|
4961
4969
|
ref: d,
|
|
@@ -4963,7 +4971,7 @@ var $o = Ee.forwardRef(({ className: e, elementKey: t, generatedClassName: n, co
|
|
|
4963
4971
|
sideOffset: l,
|
|
4964
4972
|
"data-levo_element_key": t,
|
|
4965
4973
|
"data-levo_element_type": "PopoverContent",
|
|
4966
|
-
className:
|
|
4974
|
+
className: P(Xo.popoverContent, e, n),
|
|
4967
4975
|
...u
|
|
4968
4976
|
})
|
|
4969
4977
|
}) : /* @__PURE__ */ U(Mn.Content, {
|
|
@@ -4972,42 +4980,42 @@ var $o = Ee.forwardRef(({ className: e, elementKey: t, generatedClassName: n, co
|
|
|
4972
4980
|
sideOffset: l,
|
|
4973
4981
|
"data-levo_element_key": t,
|
|
4974
4982
|
"data-levo_element_type": "PopoverContent",
|
|
4975
|
-
className:
|
|
4983
|
+
className: P(Xo.popoverContent, e, n),
|
|
4976
4984
|
...u
|
|
4977
4985
|
}) }));
|
|
4978
4986
|
$o.displayName = "BasePopoverContent";
|
|
4979
|
-
var es =
|
|
4980
|
-
let [d, f] = V(!1), { account: p, workspace: m } =
|
|
4987
|
+
var es = v(Qo), ts = v($o), ns = ({ children: e, triggerContainerStyles: t, useCustomOpenState: n = !1, isOpen: r, handleCreateForumPostModalOpen: i, isCreateForumPostModalReady: a = !1, forumKey: o, onSuccess: s, onClose: c, mode: l = "create", initialValues: u }) => {
|
|
4988
|
+
let [d, f] = V(!1), { account: p, workspace: m } = A(), { fetch: h, logger: g } = F(), [_] = V("myself"), [v, y] = V(""), [b, S] = V(""), [C, w] = V(!1), [T, E] = V(!1), [D, O] = V(""), [k, j] = V(""), [M, N] = V(!1), [re, ie] = V([]), [se, ce] = V(!1), le = B(!1), [ue, de] = V(l === "create");
|
|
4981
4989
|
R(() => {
|
|
4982
4990
|
if (l === "edit" && u) {
|
|
4983
4991
|
y(u.title || ""), S(u.content || ""), u.kind === "link" && (E(!0), O(u.url || ""));
|
|
4984
4992
|
let e = u.categories?.[0], t = typeof e == "string" ? e : e?._id;
|
|
4985
|
-
t && j(t),
|
|
4993
|
+
t && j(t), de(!0);
|
|
4986
4994
|
}
|
|
4987
4995
|
}, [l, u]);
|
|
4988
|
-
let
|
|
4989
|
-
if (!(!o ||
|
|
4990
|
-
|
|
4996
|
+
let fe = Me(async () => {
|
|
4997
|
+
if (!(!o || le.current || se)) {
|
|
4998
|
+
ce(!0);
|
|
4991
4999
|
try {
|
|
4992
5000
|
let e = await h.url(`/v1/community/${o}/category/list`).post({ limit: -1 }).json();
|
|
4993
|
-
e?.content?.data && (
|
|
5001
|
+
e?.content?.data && (ie(e.content.data), le.current = !0);
|
|
4994
5002
|
} catch (e) {
|
|
4995
5003
|
let t = G(e);
|
|
4996
5004
|
g?.error("Failed to fetch categories", { exception: t });
|
|
4997
5005
|
} finally {
|
|
4998
|
-
|
|
5006
|
+
ce(!1);
|
|
4999
5007
|
}
|
|
5000
5008
|
}
|
|
5001
5009
|
}, [
|
|
5002
5010
|
o,
|
|
5003
5011
|
h,
|
|
5004
5012
|
g,
|
|
5005
|
-
|
|
5013
|
+
se
|
|
5006
5014
|
]);
|
|
5007
5015
|
R(() => {
|
|
5008
|
-
|
|
5009
|
-
}, [
|
|
5010
|
-
let
|
|
5016
|
+
fe();
|
|
5017
|
+
}, [fe]);
|
|
5018
|
+
let pe = z(() => {
|
|
5011
5019
|
if (_ === "workspace" && m?.name) return m.name;
|
|
5012
5020
|
if (p?.username) return p.username;
|
|
5013
5021
|
let e = [p?.first_name, p?.last_name]?.filter(Boolean);
|
|
@@ -5017,24 +5025,24 @@ var es = _(Qo), ts = _($o), ns = ({ children: e, triggerContainerStyles: t, useC
|
|
|
5017
5025
|
p,
|
|
5018
5026
|
m
|
|
5019
5027
|
]);
|
|
5020
|
-
return /* @__PURE__ */ W(
|
|
5028
|
+
return /* @__PURE__ */ W(oe, {
|
|
5021
5029
|
open: n ? r : d,
|
|
5022
5030
|
onOpenChange: n ? i : (e) => {
|
|
5023
5031
|
f(!!e);
|
|
5024
5032
|
},
|
|
5025
|
-
children: [e && /* @__PURE__ */ U(
|
|
5033
|
+
children: [e && /* @__PURE__ */ U(ae, {
|
|
5026
5034
|
asChild: !0,
|
|
5027
5035
|
children: /* @__PURE__ */ U("div", {
|
|
5028
|
-
className:
|
|
5036
|
+
className: P("", t),
|
|
5029
5037
|
children: e
|
|
5030
5038
|
})
|
|
5031
|
-
}), /* @__PURE__ */ W(
|
|
5039
|
+
}), /* @__PURE__ */ W(ne, {
|
|
5032
5040
|
"data-prevent-post-navigation": !0,
|
|
5033
5041
|
className: "!max-w-[638px] flex flex-col gap-y-6",
|
|
5034
5042
|
autoFocus: !1,
|
|
5035
5043
|
showCloseButton: !1,
|
|
5036
5044
|
children: [
|
|
5037
|
-
/* @__PURE__ */ W(
|
|
5045
|
+
/* @__PURE__ */ W(ee, {
|
|
5038
5046
|
className: "!flex-row items-center justify-between",
|
|
5039
5047
|
children: [/* @__PURE__ */ W("div", {
|
|
5040
5048
|
className: "flex items-center gap-3",
|
|
@@ -5059,10 +5067,10 @@ var es = _(Qo), ts = _($o), ns = ({ children: e, triggerContainerStyles: t, useC
|
|
|
5059
5067
|
}), /* @__PURE__ */ W("div", {
|
|
5060
5068
|
className: "flex items-center gap-2",
|
|
5061
5069
|
children: [
|
|
5062
|
-
l === "create" &&
|
|
5063
|
-
l === "create" && !
|
|
5064
|
-
open:
|
|
5065
|
-
onOpenChange:
|
|
5070
|
+
l === "create" && se && /* @__PURE__ */ U("div", { className: "h-8 w-24 animate-pulse rounded-md bg-gray-200" }),
|
|
5071
|
+
l === "create" && !se && re?.length > 0 && /* @__PURE__ */ W(Zo, {
|
|
5072
|
+
open: M,
|
|
5073
|
+
onOpenChange: N,
|
|
5066
5074
|
children: [/* @__PURE__ */ U(es, {
|
|
5067
5075
|
elementKey: "category-trigger",
|
|
5068
5076
|
asChild: !0,
|
|
@@ -5072,37 +5080,37 @@ var es = _(Qo), ts = _($o), ns = ({ children: e, triggerContainerStyles: t, useC
|
|
|
5072
5080
|
className: "flex h-8 cursor-pointer items-center gap-1.5 rounded-md border border-[#D1D6E1] bg-white px-3 py-1.5 font-medium text-sm transition-colors hover:bg-gray-50 disabled:opacity-50",
|
|
5073
5081
|
children: [/* @__PURE__ */ U("span", {
|
|
5074
5082
|
className: "text-text-1",
|
|
5075
|
-
children:
|
|
5083
|
+
children: re.find((e) => e._id === k)?.name || "Category"
|
|
5076
5084
|
}), /* @__PURE__ */ U(nn, { className: "size-4 text-text-2" })]
|
|
5077
5085
|
})
|
|
5078
5086
|
}), /* @__PURE__ */ U(ts, {
|
|
5079
5087
|
elementKey: "category-content",
|
|
5080
5088
|
align: "end",
|
|
5081
5089
|
className: "!w-[unset] !p-1 min-w-36 rounded-lg border border-gray-200 bg-white shadow-lg",
|
|
5082
|
-
children:
|
|
5090
|
+
children: re.map((e) => /* @__PURE__ */ W("button", {
|
|
5083
5091
|
type: "button",
|
|
5084
5092
|
onClick: () => {
|
|
5085
|
-
j(e._id),
|
|
5093
|
+
j(e._id), N(!1);
|
|
5086
5094
|
},
|
|
5087
|
-
className:
|
|
5088
|
-
children: [/* @__PURE__ */ U("span", { children: e.name }),
|
|
5095
|
+
className: P("flex w-full cursor-pointer items-center justify-between rounded-md px-3 py-2 text-left text-sm transition-colors hover:bg-gray-100", k === e._id ? "font-medium text-text-1" : "text-text-2"),
|
|
5096
|
+
children: [/* @__PURE__ */ U("span", { children: e.name }), k === e._id && /* @__PURE__ */ U($t, { className: "size-4 text-brand" })]
|
|
5089
5097
|
}, e._id))
|
|
5090
5098
|
})]
|
|
5091
5099
|
}),
|
|
5092
|
-
/* @__PURE__ */ U(
|
|
5100
|
+
/* @__PURE__ */ U(x, {
|
|
5093
5101
|
elementKey: "add",
|
|
5094
5102
|
onClick: async () => {
|
|
5095
5103
|
if (v.trim()) {
|
|
5096
5104
|
w(!0);
|
|
5097
5105
|
try {
|
|
5098
5106
|
let e;
|
|
5099
|
-
if (l === "edit" && u?._id) e = await h.url(`/v1/community/${o}/post/${u._id}/update-single`).put({ content:
|
|
5107
|
+
if (l === "edit" && u?._id) e = await h.url(`/v1/community/${o}/post/${u._id}/update-single`).put({ content: b.trim() || void 0 }).json();
|
|
5100
5108
|
else {
|
|
5101
5109
|
let t = {
|
|
5102
5110
|
title: v.trim(),
|
|
5103
|
-
content:
|
|
5111
|
+
content: b.trim() || void 0
|
|
5104
5112
|
};
|
|
5105
|
-
T && D.trim() && (t.kind = "link", t.url = D.trim()),
|
|
5113
|
+
T && D.trim() && (t.kind = "link", t.url = D.trim()), k && (t.categories = [k]), e = await h.url(`/v1/community/${o}/post/create-single`).post(t).json();
|
|
5106
5114
|
}
|
|
5107
5115
|
e?.content?.data && (y(""), S(""), E(!1), O(""), j(""), s?.(e.content.data), c?.());
|
|
5108
5116
|
} catch (e) {
|
|
@@ -5113,7 +5121,7 @@ var es = _(Qo), ts = _($o), ns = ({ children: e, triggerContainerStyles: t, useC
|
|
|
5113
5121
|
}
|
|
5114
5122
|
}
|
|
5115
5123
|
},
|
|
5116
|
-
disabled: !
|
|
5124
|
+
disabled: !ue || C || !v.trim(),
|
|
5117
5125
|
className: "!h-8 !border-none flex w-fit flex-nowrap whitespace-nowrap [&_span]:flex [&_span]:items-center [&_span]:gap-2",
|
|
5118
5126
|
isLoading: C,
|
|
5119
5127
|
loadingText: l === "edit" ? "Updating..." : "Creating...",
|
|
@@ -5125,7 +5133,7 @@ var es = _(Qo), ts = _($o), ns = ({ children: e, triggerContainerStyles: t, useC
|
|
|
5125
5133
|
]
|
|
5126
5134
|
})]
|
|
5127
5135
|
}),
|
|
5128
|
-
|
|
5136
|
+
ue ? /* @__PURE__ */ W("div", {
|
|
5129
5137
|
className: "space-y-4",
|
|
5130
5138
|
children: [
|
|
5131
5139
|
/* @__PURE__ */ U(Ds, {
|
|
@@ -5138,12 +5146,12 @@ var es = _(Qo), ts = _($o), ns = ({ children: e, triggerContainerStyles: t, useC
|
|
|
5138
5146
|
value: v,
|
|
5139
5147
|
onChange: (e) => y(e.target.value),
|
|
5140
5148
|
disabled: C || l === "edit",
|
|
5141
|
-
inputStyles:
|
|
5149
|
+
inputStyles: P("h-12 border-[#D1D6E1] bg-white font-medium text-base placeholder:text-[#717C91] focus-visible:ring-1 focus-visible:ring-[#D1D6E1]", l === "edit" && "cursor-not-allowed bg-gray-50")
|
|
5142
5150
|
}),
|
|
5143
5151
|
/* @__PURE__ */ U(nl, {
|
|
5144
5152
|
name: "content",
|
|
5145
5153
|
placeholder: "Body text (optional)",
|
|
5146
|
-
value:
|
|
5154
|
+
value: b,
|
|
5147
5155
|
onChange: (e) => S(e.target.value),
|
|
5148
5156
|
disabled: C,
|
|
5149
5157
|
textAreaStyles: "border-[#D1D6E1] text-sm placeholder:text-[#717C91] bg-white focus-visible:ring-[#D1D6E1] focus-visible:ring-1 resize-none",
|
|
@@ -5165,7 +5173,7 @@ var es = _(Qo), ts = _($o), ns = ({ children: e, triggerContainerStyles: t, useC
|
|
|
5165
5173
|
className: "space-y-4",
|
|
5166
5174
|
children: [/* @__PURE__ */ U("div", { className: "h-12 animate-pulse rounded-md bg-gray-200" }), /* @__PURE__ */ U("div", { className: "h-64 animate-pulse rounded-md bg-gray-200" })]
|
|
5167
5175
|
}),
|
|
5168
|
-
/* @__PURE__ */ W(
|
|
5176
|
+
/* @__PURE__ */ W(te, {
|
|
5169
5177
|
className: "!justify-between flex",
|
|
5170
5178
|
children: [/* @__PURE__ */ U("div", {
|
|
5171
5179
|
className: "flex items-center gap-2",
|
|
@@ -5175,12 +5183,12 @@ var es = _(Qo), ts = _($o), ns = ({ children: e, triggerContainerStyles: t, useC
|
|
|
5175
5183
|
E(!T), T && O("");
|
|
5176
5184
|
},
|
|
5177
5185
|
disabled: C || l === "edit",
|
|
5178
|
-
className:
|
|
5186
|
+
className: P("flex h-8 w-fit cursor-pointer items-center gap-2 rounded-lg border px-2 font-medium text-sm transition-colors", "disabled:cursor-not-allowed disabled:opacity-80", T ? "border-brand bg-brand text-white hover:bg-brand/90" : "border-[#D1D6E1] bg-white text-text-1 hover:bg-gray-50"),
|
|
5179
5187
|
children: /* @__PURE__ */ U(hn, { size: 16 })
|
|
5180
5188
|
})
|
|
5181
5189
|
}), /* @__PURE__ */ W("div", {
|
|
5182
5190
|
className: "flex items-center gap-2 text-sm text-text-2/80",
|
|
5183
|
-
children: [/* @__PURE__ */ W("span", { children: ["Your post will appear as @",
|
|
5191
|
+
children: [/* @__PURE__ */ W("span", { children: ["Your post will appear as @", pe] }), /* @__PURE__ */ U(mn, { className: "size-4 text-text-1" })]
|
|
5184
5192
|
})]
|
|
5185
5193
|
})
|
|
5186
5194
|
]
|
|
@@ -5212,7 +5220,7 @@ var rs = (e) => {
|
|
|
5212
5220
|
return "";
|
|
5213
5221
|
}
|
|
5214
5222
|
}, is = ({ post: e, isRenderedSolo: t, forumKey: n, postListingPageURL: r, onEditClick: i, onPostUpdated: a }) => {
|
|
5215
|
-
let { account: o } =
|
|
5223
|
+
let { account: o } = A(), { fetch: s, logger: c } = F(), [l, u] = V(!1), [d, f] = V(!1), [p, m] = V(!1), [h, g] = V(!1), _ = z(() => !!(e?.organization && e?.organization?.badge_granted_at), [e]), v = z(() => {
|
|
5216
5224
|
let t = e?.organization?.name?.split(" ") || [];
|
|
5217
5225
|
return t?.length > 1 ? t?.map((e) => e?.charAt(0)?.toUpperCase())?.join("") : t?.at(0)?.slice(0, 2)?.toUpperCase();
|
|
5218
5226
|
}, [e?.organization]), y = z(() => {
|
|
@@ -5374,11 +5382,11 @@ var rs = (e) => {
|
|
|
5374
5382
|
className: "max-w-none text-sm text-text-2 leading-relaxed",
|
|
5375
5383
|
children: /* @__PURE__ */ U("div", { dangerouslySetInnerHTML: { __html: e.content || "" } })
|
|
5376
5384
|
}), cs = ({ className: e, children: t, ...n }) => /* @__PURE__ */ U("div", {
|
|
5377
|
-
className:
|
|
5385
|
+
className: P("flex items-center gap-1 rounded-lg border border-[#D1D6E1] bg-[#F0F4FA] px-2 py-1 font-semibold text-sm", e),
|
|
5378
5386
|
...n,
|
|
5379
5387
|
children: t
|
|
5380
5388
|
}), ls = ({ post: e, forumKey: t }) => {
|
|
5381
|
-
let { fetch: n, logger: r } =
|
|
5389
|
+
let { fetch: n, logger: r } = F(), { isLoggedIn: i } = A(), { openModal: a } = M(), { canInteractWithPosts: o } = Ho(), [s, c] = V(!1), [l, u] = V(!!e?.upvoted_at), [d, f] = V(!!e?.downvoted_at), [p, m] = V((e.upvote_count ?? 0) - (e.downvote_count ?? 0)), h = !i || o;
|
|
5382
5390
|
return R(() => {
|
|
5383
5391
|
m((e.upvote_count ?? 0) - (e.downvote_count ?? 0));
|
|
5384
5392
|
}, [e?.upvote_count, e?.downvote_count]), R(() => {
|
|
@@ -5390,7 +5398,7 @@ var rs = (e) => {
|
|
|
5390
5398
|
children: [
|
|
5391
5399
|
/* @__PURE__ */ U("button", {
|
|
5392
5400
|
type: "button",
|
|
5393
|
-
className:
|
|
5401
|
+
className: P("flex cursor-pointer items-center rounded-sm px-0.5 transition-all duration-200", !h && "cursor-not-allowed opacity-50"),
|
|
5394
5402
|
onClick: async (o) => {
|
|
5395
5403
|
if (o.stopPropagation(), o.preventDefault(), !i) {
|
|
5396
5404
|
a("login", {});
|
|
@@ -5419,12 +5427,12 @@ var rs = (e) => {
|
|
|
5419
5427
|
})
|
|
5420
5428
|
}),
|
|
5421
5429
|
/* @__PURE__ */ U("span", {
|
|
5422
|
-
className:
|
|
5430
|
+
className: P("font-semibold text-sm"),
|
|
5423
5431
|
children: p
|
|
5424
5432
|
}),
|
|
5425
5433
|
/* @__PURE__ */ U("button", {
|
|
5426
5434
|
type: "button",
|
|
5427
|
-
className:
|
|
5435
|
+
className: P("flex cursor-pointer items-center rounded-sm px-0.5 transition-all duration-200", !h && "cursor-not-allowed opacity-50"),
|
|
5428
5436
|
onClick: async (o) => {
|
|
5429
5437
|
if (o.stopPropagation(), o.preventDefault(), !i) {
|
|
5430
5438
|
a("login", {});
|
|
@@ -5455,7 +5463,7 @@ var rs = (e) => {
|
|
|
5455
5463
|
]
|
|
5456
5464
|
});
|
|
5457
5465
|
}, us = ({ post: e, postDetailPageURLPattern: t, isRenderedSolo: n = !1, actionsLoadingState: r, forumKey: i }) => /* @__PURE__ */ U("div", {
|
|
5458
|
-
className:
|
|
5466
|
+
className: P("mt-0"),
|
|
5459
5467
|
children: /* @__PURE__ */ U("div", {
|
|
5460
5468
|
className: "flex items-center justify-between",
|
|
5461
5469
|
children: /* @__PURE__ */ W("div", {
|
|
@@ -5466,7 +5474,7 @@ var rs = (e) => {
|
|
|
5466
5474
|
forumKey: i
|
|
5467
5475
|
}),
|
|
5468
5476
|
r?.comments ? /* @__PURE__ */ U(Z, { className: "h-7.5 w-14 rounded-lg" }) : /* @__PURE__ */ W(cs, {
|
|
5469
|
-
className:
|
|
5477
|
+
className: P("cursor-pointer gap-1.5", n && "cursor-default"),
|
|
5470
5478
|
onClick: (r) => {
|
|
5471
5479
|
r.stopPropagation(), r.preventDefault();
|
|
5472
5480
|
let i = t?.replace(/\{[^}]+\}/g, e?.slug);
|
|
@@ -5592,7 +5600,7 @@ var rs = (e) => {
|
|
|
5592
5600
|
})
|
|
5593
5601
|
});
|
|
5594
5602
|
}, ps = ({ option: e, post: t, setPost: n }) => {
|
|
5595
|
-
let { fetch: r, logger: i } =
|
|
5603
|
+
let { fetch: r, logger: i } = F(), a = z(() => {
|
|
5596
5604
|
let e = K(t?.expires_at), n = K();
|
|
5597
5605
|
return e?.isValid() ? !!n?.isAfter(e) : !1;
|
|
5598
5606
|
}, [t?.expires_at]), o = t?.user_voted_option === e?._id, s = !!t?.user_voted_option, c = t?.vote_count, l = z(() => Number.isFinite(c) && Number.isFinite(e?.count) && typeof c == "number" && c > 0 ? (e.count / c * 100)?.toFixed(0) : null, [t, e]), u = async (t, o) => {
|
|
@@ -5627,7 +5635,7 @@ var rs = (e) => {
|
|
|
5627
5635
|
type: "button",
|
|
5628
5636
|
onClick: () => u(t, e._id),
|
|
5629
5637
|
disabled: a,
|
|
5630
|
-
className:
|
|
5638
|
+
className: P("w-full cursor-pointer rounded-lg border-2 p-4 text-left transition-all duration-200", o ? "border-blue-500 bg-blue-50 shadow-sm" : s || a ? "border-gray-200 bg-gray-50" : "border-gray-200 hover:border-blue-300 hover:bg-blue-50/50", a && "cursor-not-allowed"),
|
|
5631
5639
|
children: [
|
|
5632
5640
|
/* @__PURE__ */ W("div", {
|
|
5633
5641
|
className: "mb-2 flex items-center justify-between",
|
|
@@ -5747,7 +5755,7 @@ var rs = (e) => {
|
|
|
5747
5755
|
side: "top",
|
|
5748
5756
|
labelClassName: "bg-[#171717] text-white",
|
|
5749
5757
|
children: /* @__PURE__ */ W("div", {
|
|
5750
|
-
className:
|
|
5758
|
+
className: P("flex cursor-pointer items-center gap-1.5 rounded-md border px-2 py-1 font-medium text-xs", t.className),
|
|
5751
5759
|
children: [t.icon, /* @__PURE__ */ U("span", { children: t.label })]
|
|
5752
5760
|
})
|
|
5753
5761
|
}) }) : null;
|
|
@@ -5786,7 +5794,7 @@ var rs = (e) => {
|
|
|
5786
5794
|
side: "top",
|
|
5787
5795
|
labelClassName: "bg-[#171717] text-white",
|
|
5788
5796
|
children: /* @__PURE__ */ W("div", {
|
|
5789
|
-
className:
|
|
5797
|
+
className: P("flex h-[30px] cursor-pointer items-center gap-1.5 rounded-md border px-2 py-1 font-medium text-xs", t.className),
|
|
5790
5798
|
children: [t.icon, /* @__PURE__ */ U("span", { children: t.label })]
|
|
5791
5799
|
})
|
|
5792
5800
|
}) }) : null;
|
|
@@ -5797,20 +5805,20 @@ function Ss({ className: e, type: t, ...n }) {
|
|
|
5797
5805
|
return /* @__PURE__ */ U("input", {
|
|
5798
5806
|
type: t,
|
|
5799
5807
|
"data-slot": "input",
|
|
5800
|
-
className:
|
|
5808
|
+
className: P("flex h-10 w-full min-w-0 rounded-md border border-border bg-transparent px-3 py-1 text-text-1 text-base shadow-xs outline-none transition-[color,box-shadow] selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm placeholder:text-text-2 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30", "focus-visible:border-border focus-visible:ring-[3px] focus-visible:ring-brand/80", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", e),
|
|
5801
5809
|
...n
|
|
5802
5810
|
});
|
|
5803
5811
|
}
|
|
5804
5812
|
//#endregion
|
|
5805
5813
|
//#region src/components/ui/form/utils/FieldError.tsx
|
|
5806
5814
|
var Cs = ({ children: e }) => /* @__PURE__ */ U("p", {
|
|
5807
|
-
className:
|
|
5815
|
+
className: P("mt-2 font-medium text-red-400 text-xs"),
|
|
5808
5816
|
children: e
|
|
5809
5817
|
}), ws = ({ children: e, styles: t = "" }) => /* @__PURE__ */ U("p", {
|
|
5810
|
-
className:
|
|
5818
|
+
className: P("font-medium text-muted-foreground text-xs", t),
|
|
5811
5819
|
children: e
|
|
5812
5820
|
}), Ts = ({ children: e, isRequired: t, className: n, ...r }) => /* @__PURE__ */ W("label", {
|
|
5813
|
-
className:
|
|
5821
|
+
className: P("mb-1 block flex-1 select-none text-sm leading-normal peer-disabled:cursor-not-allowed peer-disabled:opacity-70", n),
|
|
5814
5822
|
...r,
|
|
5815
5823
|
children: [
|
|
5816
5824
|
e,
|
|
@@ -5821,9 +5829,9 @@ var Cs = ({ children: e }) => /* @__PURE__ */ U("p", {
|
|
|
5821
5829
|
})
|
|
5822
5830
|
]
|
|
5823
5831
|
}), Es = ({ error: e, touched: t = !1, helperText: n, containerStyles: r, helperTextStyles: i, readOnly: a, children: o, label: s, labelStyles: c, isRequired: l, name: u }) => /* @__PURE__ */ U("div", {
|
|
5824
|
-
className:
|
|
5832
|
+
className: P("form-control w-full", a ? "pointer-events-none" : "", r),
|
|
5825
5833
|
children: /* @__PURE__ */ W("div", {
|
|
5826
|
-
className:
|
|
5834
|
+
className: P("w-full shrink-0", "sm:flex-1"),
|
|
5827
5835
|
children: [
|
|
5828
5836
|
s && /* @__PURE__ */ U(Ts, {
|
|
5829
5837
|
htmlFor: u,
|
|
@@ -5834,7 +5842,7 @@ var Cs = ({ children: e }) => /* @__PURE__ */ U("p", {
|
|
|
5834
5842
|
o,
|
|
5835
5843
|
t && e && /* @__PURE__ */ U(Cs, { children: e }),
|
|
5836
5844
|
n && /* @__PURE__ */ U("div", {
|
|
5837
|
-
className:
|
|
5845
|
+
className: P("break-word mt-2 w-full"),
|
|
5838
5846
|
children: /* @__PURE__ */ U(ws, {
|
|
5839
5847
|
styles: i,
|
|
5840
5848
|
children: n
|
|
@@ -5842,7 +5850,7 @@ var Cs = ({ children: e }) => /* @__PURE__ */ U("p", {
|
|
|
5842
5850
|
})
|
|
5843
5851
|
]
|
|
5844
5852
|
})
|
|
5845
|
-
}), Ds =
|
|
5853
|
+
}), Ds = Te.forwardRef(({ label: e, type: t, name: n, isRequired: r, labelStyles: i, leftIcon: a, rightIcon: o, leftIconBoxStyles: s, rightIconBoxStyles: c, containerStyles: l, helperTextStyles: u, inputStyles: d, value: f, disabled: p, inputProps: m, placeholder: h, readOnly: g, id: _, onChange: v, onBlur: y, error: b, helperText: x, touched: S, inputContainerStyles: C, leftIconBoxProps: w, rightIconBoxProps: T }, E) => /* @__PURE__ */ W(Es, {
|
|
5846
5854
|
containerStyles: l,
|
|
5847
5855
|
helperTextStyles: u,
|
|
5848
5856
|
error: b,
|
|
@@ -5852,13 +5860,13 @@ var Cs = ({ children: e }) => /* @__PURE__ */ U("p", {
|
|
|
5852
5860
|
children: [e && /* @__PURE__ */ U(Ts, {
|
|
5853
5861
|
htmlFor: n,
|
|
5854
5862
|
isRequired: r,
|
|
5855
|
-
className:
|
|
5863
|
+
className: P("text-3", i),
|
|
5856
5864
|
children: e
|
|
5857
5865
|
}), /* @__PURE__ */ W("div", {
|
|
5858
|
-
className:
|
|
5866
|
+
className: P("relative w-full", C),
|
|
5859
5867
|
children: [
|
|
5860
5868
|
a ? /* @__PURE__ */ U("div", {
|
|
5861
|
-
className:
|
|
5869
|
+
className: P("absolute top-0 bottom-0 left-0 flex w-9 items-center justify-center overflow-hidden rounded-l-md", "border border-transparent", s),
|
|
5862
5870
|
...w,
|
|
5863
5871
|
children: a
|
|
5864
5872
|
}) : null,
|
|
@@ -5870,14 +5878,14 @@ var Cs = ({ children: e }) => /* @__PURE__ */ U("p", {
|
|
|
5870
5878
|
value: f,
|
|
5871
5879
|
disabled: p,
|
|
5872
5880
|
readOnly: g,
|
|
5873
|
-
className:
|
|
5881
|
+
className: P("bg-brand-foreground text-brand", g ? "focus-visible:ring-0" : "", a ? "pl-11" : "", o ? "pr-11" : "", d),
|
|
5874
5882
|
onChange: v,
|
|
5875
5883
|
onBlur: y,
|
|
5876
5884
|
ref: E,
|
|
5877
5885
|
...m
|
|
5878
5886
|
}),
|
|
5879
5887
|
o ? /* @__PURE__ */ U("div", {
|
|
5880
|
-
className:
|
|
5888
|
+
className: P("absolute top-0 right-0 bottom-0 flex w-9 items-center justify-center overflow-hidden rounded-r-md", "border border-transparent", c),
|
|
5881
5889
|
...T,
|
|
5882
5890
|
children: o
|
|
5883
5891
|
}) : null
|
|
@@ -5888,7 +5896,7 @@ Ds.displayName = "FormInput";
|
|
|
5888
5896
|
//#endregion
|
|
5889
5897
|
//#region src/elements/forum/comments/ReplyBox.tsx
|
|
5890
5898
|
var Os = ({ isParent: e = !0 }) => {
|
|
5891
|
-
let { isLoggedIn: t, account: n } =
|
|
5899
|
+
let { isLoggedIn: t, account: n } = A(), r = z(() => {
|
|
5892
5900
|
let e = [n?.first_name, n?.last_name]?.filter(Boolean);
|
|
5893
5901
|
return e?.length === 1 ? e?.at(0)?.slice(0, 2)?.toUpperCase() : e?.length > 1 ? e?.map((e) => e?.at(0)?.toUpperCase()).join("") : n?.username?.slice(0, 2)?.toUpperCase();
|
|
5894
5902
|
}, [n]), i = z(() => {
|
|
@@ -5902,17 +5910,17 @@ var Os = ({ isParent: e = !0 }) => {
|
|
|
5902
5910
|
return null;
|
|
5903
5911
|
}, [n]);
|
|
5904
5912
|
return t ? /* @__PURE__ */ W(Wc, {
|
|
5905
|
-
className:
|
|
5913
|
+
className: P(e ? "h-10 w-10" : "h-[40px] w-[40px]"),
|
|
5906
5914
|
children: [/* @__PURE__ */ U(Kc, {
|
|
5907
5915
|
src: i?.media?.location,
|
|
5908
5916
|
alt: i?.alt || "User Profile"
|
|
5909
5917
|
}), /* @__PURE__ */ U(Jc, {
|
|
5910
|
-
className:
|
|
5918
|
+
className: P("bg-brand text-brand-foreground", !e && "text-sm"),
|
|
5911
5919
|
children: r
|
|
5912
5920
|
})]
|
|
5913
5921
|
}) : null;
|
|
5914
5922
|
}, ks = ({ post: e, isParent: t = !1, parentCommentId: n = null, onCommentAdded: r, forumKey: i }) => {
|
|
5915
|
-
let { fetch: a, logger: o } =
|
|
5923
|
+
let { fetch: a, logger: o } = F(), { account: s, isLoggedIn: c } = A(), { openModal: l } = M(), { canInteractWithComments: u } = Ho(), [d, f] = V(!1), [p, m] = V("");
|
|
5916
5924
|
if (c && !u) return null;
|
|
5917
5925
|
let h = () => {
|
|
5918
5926
|
c || l("login", {});
|
|
@@ -5938,7 +5946,7 @@ var Os = ({ isParent: e = !0 }) => {
|
|
|
5938
5946
|
}
|
|
5939
5947
|
};
|
|
5940
5948
|
return /* @__PURE__ */ W("div", {
|
|
5941
|
-
className:
|
|
5949
|
+
className: P("flex w-full items-start gap-3", !t && "gap-2.5"),
|
|
5942
5950
|
children: [/* @__PURE__ */ U(Os, { isParent: t }), /* @__PURE__ */ W("div", {
|
|
5943
5951
|
className: "flex w-full items-start justify-between gap-4",
|
|
5944
5952
|
children: [/* @__PURE__ */ U("div", {
|
|
@@ -5950,7 +5958,7 @@ var Os = ({ isParent: e = !0 }) => {
|
|
|
5950
5958
|
onChange: (e) => m(e?.target?.value),
|
|
5951
5959
|
inputStyles: "border-[#D1D6E1] text-sm sm:placeholder:text-sm placeholder:text-[#717C91] bg-white focus-visible:ring-[#D1D6E1] focus-visible:ring-1"
|
|
5952
5960
|
})
|
|
5953
|
-
}), /* @__PURE__ */ W(
|
|
5961
|
+
}), /* @__PURE__ */ W(x, {
|
|
5954
5962
|
elementKey: "add",
|
|
5955
5963
|
onClick: () => {
|
|
5956
5964
|
if (!c) {
|
|
@@ -6012,7 +6020,7 @@ var As = ({ comment: e, avatarStyles: t }) => {
|
|
|
6012
6020
|
return null;
|
|
6013
6021
|
}, [e]);
|
|
6014
6022
|
return /* @__PURE__ */ W(Wc, {
|
|
6015
|
-
className:
|
|
6023
|
+
className: P("h-[28px] w-[28px]", t),
|
|
6016
6024
|
children: [/* @__PURE__ */ U(Kc, {
|
|
6017
6025
|
src: a?.media?.location,
|
|
6018
6026
|
alt: a?.alt || "User Profile"
|
|
@@ -6063,7 +6071,7 @@ var As = ({ comment: e, avatarStyles: t }) => {
|
|
|
6063
6071
|
children: e
|
|
6064
6072
|
})]
|
|
6065
6073
|
}), Ns = ({ comment: e, forumKey: t, userEngagementHashMap: n, setUserEngagementHashMap: r }) => {
|
|
6066
|
-
let { fetch: i, logger: a } =
|
|
6074
|
+
let { fetch: i, logger: a } = F(), { isLoggedIn: o } = A(), { openModal: s } = M(), { canInteractWithComments: c } = Ho(), l = n?.[e?._id], [u, d] = V(!1), [f, p] = V(!!l?.upvoted_at), [m, h] = V(!!l?.downvoted_at), [g, _] = V((e.upvote_count ?? 0) - (e.downvote_count ?? 0)), v = !o || c;
|
|
6067
6075
|
return R(() => {
|
|
6068
6076
|
_((e.upvote_count ?? 0) - (e.downvote_count ?? 0));
|
|
6069
6077
|
}, [e?.upvote_count, e?.downvote_count]), R(() => {
|
|
@@ -6075,7 +6083,7 @@ var As = ({ comment: e, avatarStyles: t }) => {
|
|
|
6075
6083
|
children: [
|
|
6076
6084
|
/* @__PURE__ */ U("button", {
|
|
6077
6085
|
type: "button",
|
|
6078
|
-
className:
|
|
6086
|
+
className: P("flex cursor-pointer items-center rounded-sm px-0.5 transition-all duration-200", !v && "cursor-not-allowed opacity-50"),
|
|
6079
6087
|
onClick: async (n) => {
|
|
6080
6088
|
if (n.stopPropagation(), n.preventDefault(), !o) {
|
|
6081
6089
|
s("login", {});
|
|
@@ -6114,12 +6122,12 @@ var As = ({ comment: e, avatarStyles: t }) => {
|
|
|
6114
6122
|
})
|
|
6115
6123
|
}),
|
|
6116
6124
|
/* @__PURE__ */ U("span", {
|
|
6117
|
-
className:
|
|
6125
|
+
className: P("font-semibold text-sm"),
|
|
6118
6126
|
children: g
|
|
6119
6127
|
}),
|
|
6120
6128
|
/* @__PURE__ */ U("button", {
|
|
6121
6129
|
type: "button",
|
|
6122
|
-
className:
|
|
6130
|
+
className: P("flex cursor-pointer items-center rounded-sm px-0.5 transition-all duration-200", !v && "cursor-not-allowed opacity-50"),
|
|
6123
6131
|
onClick: async (n) => {
|
|
6124
6132
|
if (n.stopPropagation(), n.preventDefault(), !o) {
|
|
6125
6133
|
s("login", {});
|
|
@@ -6162,7 +6170,7 @@ var As = ({ comment: e, avatarStyles: t }) => {
|
|
|
6162
6170
|
}, Ps = ({ forumKey: e, post: t, comment: n, replyCount: r, onReplyAdded: i, onToggleReplies: a, showReplyBox: o, userEngagementHashMap: s, setUserEngagementHashMap: c }) => {
|
|
6163
6171
|
let l = !!n?.parent;
|
|
6164
6172
|
return /* @__PURE__ */ W("div", {
|
|
6165
|
-
className:
|
|
6173
|
+
className: P("w-full space-y-3"),
|
|
6166
6174
|
children: [/* @__PURE__ */ W("div", {
|
|
6167
6175
|
className: "flex items-center justify-between",
|
|
6168
6176
|
children: [/* @__PURE__ */ W("div", {
|
|
@@ -6202,19 +6210,19 @@ var Fs = ({ wrapperStyles: e }) => /* @__PURE__ */ W("div", {
|
|
|
6202
6210
|
}), Is = ({ comment: e, replyCount: t, showReplies: n, isShowMoreActive: r }) => {
|
|
6203
6211
|
let i = t === 0 ? 2 : t + (n ? 2 : 1) + +!!r;
|
|
6204
6212
|
return n ? /* @__PURE__ */ U(H, { children: Array(i).fill(0).map((e, n) => /* @__PURE__ */ W("div", {
|
|
6205
|
-
className:
|
|
6213
|
+
className: P("relative col-start-1 col-end-2", n === i - 1 && "grid h-full grid-cols-2 grid-rows-4"),
|
|
6206
6214
|
style: {
|
|
6207
6215
|
gridRowStart: n + 2,
|
|
6208
6216
|
gridRowEnd: n + 2 + 1
|
|
6209
6217
|
},
|
|
6210
6218
|
children: [
|
|
6211
|
-
n < i - 1 && /* @__PURE__ */ U("div", { className:
|
|
6212
|
-
t === 0 && n === i - 1 && /* @__PURE__ */ U(H, { children: /* @__PURE__ */ U("div", { className:
|
|
6213
|
-
t > 0 && /* @__PURE__ */ U(H, { children: (n === i - 1 || n > 1) && /* @__PURE__ */ U(H, { children: /* @__PURE__ */ U("div", { className:
|
|
6219
|
+
n < i - 1 && /* @__PURE__ */ U("div", { className: P("absolute top-0 bottom-0 left-1/2 -translate-x-1/2 border-gray-200 border-l", n === 0 && "top-2") }),
|
|
6220
|
+
t === 0 && n === i - 1 && /* @__PURE__ */ U(H, { children: /* @__PURE__ */ U("div", { className: P("absolute top-0 right-0 left-[14px] h-[72px] rounded-bl-md border-gray-200 border-b border-l") }) }),
|
|
6221
|
+
t > 0 && /* @__PURE__ */ U(H, { children: (n === i - 1 || n > 1) && /* @__PURE__ */ U(H, { children: /* @__PURE__ */ U("div", { className: P("absolute top-0 right-0 left-[14px] h-[30px] rounded-bl-md border-gray-200 border-b border-l", r && n === i - 1 && "h-[20px]") }) }) })
|
|
6214
6222
|
]
|
|
6215
6223
|
}, n)) }) : null;
|
|
6216
6224
|
}, Ls = ({ forumKey: e, post: t, comment: n, onChildReplyAdded: r, index: i, userEngagementHashMap: a, setUserEngagementHashMap: o }) => {
|
|
6217
|
-
let { fetch: s, logger: c } =
|
|
6225
|
+
let { fetch: s, logger: c } = F(), [l, u] = V(n?.replies || []), [d, f] = V(1), [p, m] = V((n?.replies?.length ?? 0) >= 5), [h, g] = V(!1), [_, v] = V(!1), [y, b] = V(!1), [x, S] = V(typeof n?.reply_count == "number" ? n.reply_count : 0), C = !n?.parent, w = async (t) => {
|
|
6218
6226
|
if (C) try {
|
|
6219
6227
|
g(!0);
|
|
6220
6228
|
let r = await s.url(`/v1/community/${e}/comment/${n._id}/get-replies`).post({
|
|
@@ -6239,7 +6247,7 @@ var Fs = ({ wrapperStyles: e }) => /* @__PURE__ */ W("div", {
|
|
|
6239
6247
|
v((e) => !e), b((e) => !e);
|
|
6240
6248
|
};
|
|
6241
6249
|
return /* @__PURE__ */ W("div", {
|
|
6242
|
-
className:
|
|
6250
|
+
className: P("grid w-full grid-cols-[30px_1fr] gap-x-1.5 gap-y-0", !C && "col-start-2 row-span-1 mt-4"),
|
|
6243
6251
|
style: {
|
|
6244
6252
|
gridTemplateRows: `repeat(${(_ ? l?.length : 0) + 2},minmax(0px,auto))`,
|
|
6245
6253
|
...C ? {} : { gridRowStart: (i ?? 0) + 3 + 1 }
|
|
@@ -6322,7 +6330,7 @@ var Fs = ({ wrapperStyles: e }) => /* @__PURE__ */ W("div", {
|
|
|
6322
6330
|
]
|
|
6323
6331
|
})]
|
|
6324
6332
|
}), zs = ({ forumKey: e, post: t, onCommentCountChange: n }) => {
|
|
6325
|
-
let { fetch: r, logger: i } =
|
|
6333
|
+
let { fetch: r, logger: i } = F(), [a, o] = V(!0), [s, c] = V(!1), [l, u] = V([]), [d, f] = V(1), [p, m] = V(!1), [h, g] = V("desc"), [_, v] = V(!1), y = B(null), [b, x] = V(t?.comments_count ?? 0), [S, C] = V({}), w = async (n = 1, a = h) => {
|
|
6326
6334
|
try {
|
|
6327
6335
|
let i = n === 1;
|
|
6328
6336
|
i ? o(!0) : c(!0);
|
|
@@ -6441,7 +6449,7 @@ var Fs = ({ wrapperStyles: e }) => /* @__PURE__ */ W("div", {
|
|
|
6441
6449
|
]
|
|
6442
6450
|
});
|
|
6443
6451
|
}, Bs = () => {
|
|
6444
|
-
let { isLoggedIn: e, account: t } =
|
|
6452
|
+
let { isLoggedIn: e, account: t } = A(), n = z(() => {
|
|
6445
6453
|
let e = [t?.first_name, t?.last_name]?.filter(Boolean);
|
|
6446
6454
|
return e?.length === 1 ? e?.at(0)?.slice(0, 2)?.toUpperCase() : e?.length > 1 ? e?.map((e) => e?.at(0)?.toUpperCase()).join("") : t?.username?.slice(0, 2)?.toUpperCase();
|
|
6447
6455
|
}, [t]), r = z(() => {
|
|
@@ -6455,17 +6463,17 @@ var Fs = ({ wrapperStyles: e }) => /* @__PURE__ */ W("div", {
|
|
|
6455
6463
|
return null;
|
|
6456
6464
|
}, [t]);
|
|
6457
6465
|
return e ? /* @__PURE__ */ W(Wc, {
|
|
6458
|
-
className:
|
|
6466
|
+
className: P("h-11 w-11"),
|
|
6459
6467
|
children: [/* @__PURE__ */ U(Kc, {
|
|
6460
6468
|
src: r?.media?.location,
|
|
6461
6469
|
alt: r?.alt || "User Profile"
|
|
6462
6470
|
}), /* @__PURE__ */ U(Jc, {
|
|
6463
|
-
className:
|
|
6471
|
+
className: P("bg-brand text-brand-foreground"),
|
|
6464
6472
|
children: n
|
|
6465
6473
|
})]
|
|
6466
6474
|
}) : null;
|
|
6467
6475
|
}, Vs = ({ forumKey: e, onPostCreated: t }) => {
|
|
6468
|
-
let { forum: n, isMember: r, isLoadingMembership: i, isInviteOnly: a } = Ho(), { isAuthLoaded: o, isLoggedIn: s, account: c } =
|
|
6476
|
+
let { forum: n, isMember: r, isLoadingMembership: i, isInviteOnly: a } = Ho(), { isAuthLoaded: o, isLoggedIn: s, account: c } = A(), [l, u] = V(!1), d = (e) => {
|
|
6469
6477
|
t?.(e), u(!1);
|
|
6470
6478
|
}, f = z(() => {
|
|
6471
6479
|
if (!c) return "there";
|
|
@@ -6544,7 +6552,7 @@ var Fs = ({ wrapperStyles: e }) => /* @__PURE__ */ W("div", {
|
|
|
6544
6552
|
post: e,
|
|
6545
6553
|
postDetailPageURLPattern: t ? null : n,
|
|
6546
6554
|
children: /* @__PURE__ */ W("div", {
|
|
6547
|
-
className:
|
|
6555
|
+
className: P("flex flex-col gap-3 rounded-lg border border-[#E5E5E5] bg-white p-3", t && "border-none px-0 py-0", o),
|
|
6548
6556
|
children: [
|
|
6549
6557
|
/* @__PURE__ */ U(is, {
|
|
6550
6558
|
post: e,
|
|
@@ -6586,7 +6594,7 @@ var Fs = ({ wrapperStyles: e }) => /* @__PURE__ */ W("div", {
|
|
|
6586
6594
|
}) : /* @__PURE__ */ U(H, { children: t }), Ks = ({ onSubmit: e, isSubmitting: t, error: n, communityName: r = "this community", className: i }) => {
|
|
6587
6595
|
let [a, o] = V(""), [s, c] = V("idle");
|
|
6588
6596
|
return s === "success" ? /* @__PURE__ */ W("div", {
|
|
6589
|
-
className:
|
|
6597
|
+
className: P("flex flex-col items-center gap-3", i),
|
|
6590
6598
|
children: [
|
|
6591
6599
|
/* @__PURE__ */ U("div", {
|
|
6592
6600
|
className: "flex size-12 items-center justify-center rounded-full bg-green-100",
|
|
@@ -6606,7 +6614,7 @@ var Fs = ({ wrapperStyles: e }) => /* @__PURE__ */ W("div", {
|
|
|
6606
6614
|
})
|
|
6607
6615
|
]
|
|
6608
6616
|
}) : /* @__PURE__ */ W("div", {
|
|
6609
|
-
className:
|
|
6617
|
+
className: P("flex w-full flex-col gap-4", i),
|
|
6610
6618
|
children: [
|
|
6611
6619
|
/* @__PURE__ */ W("div", {
|
|
6612
6620
|
className: "flex flex-col gap-1.5",
|
|
@@ -6651,7 +6659,7 @@ var Fs = ({ wrapperStyles: e }) => /* @__PURE__ */ W("div", {
|
|
|
6651
6659
|
}
|
|
6652
6660
|
},
|
|
6653
6661
|
disabled: t,
|
|
6654
|
-
className:
|
|
6662
|
+
className: P("inline-flex w-full items-center justify-center rounded-md bg-brand px-4 py-2.5 font-medium text-brand-foreground text-sm transition-colors", "hover:bg-brand/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", "cursor-pointer disabled:pointer-events-none disabled:opacity-50"),
|
|
6655
6663
|
children: t ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(gn, { className: "mr-2 size-4 animate-spin" }), "Submitting..."] }) : "Request to Join"
|
|
6656
6664
|
})
|
|
6657
6665
|
]
|
|
@@ -6681,11 +6689,11 @@ var Fs = ({ wrapperStyles: e }) => /* @__PURE__ */ W("div", {
|
|
|
6681
6689
|
]
|
|
6682
6690
|
})]
|
|
6683
6691
|
}), Js = ({ communityName: e = "this community", className: t }) => {
|
|
6684
|
-
let { isLoggedIn: n } =
|
|
6692
|
+
let { isLoggedIn: n } = A(), { openModal: r } = M(), { isJoinRequestPending: i, allowJoinRequests: a, submitJoinRequest: o } = Ho(), [s, c] = V(!1), [l, u] = V(null), d = () => {
|
|
6685
6693
|
r("login", {});
|
|
6686
6694
|
}, f = n && i;
|
|
6687
6695
|
return /* @__PURE__ */ W("div", {
|
|
6688
|
-
className:
|
|
6696
|
+
className: P("relative", t),
|
|
6689
6697
|
children: [/* @__PURE__ */ W("div", {
|
|
6690
6698
|
className: "pointer-events-none flex flex-col gap-y-4 blur-[2px]",
|
|
6691
6699
|
children: [
|
|
@@ -6699,7 +6707,7 @@ var Fs = ({ wrapperStyles: e }) => /* @__PURE__ */ W("div", {
|
|
|
6699
6707
|
className: "flex max-w-sm flex-col items-center gap-3 rounded-xl border border-gray-200 bg-white p-6 text-center shadow-sm",
|
|
6700
6708
|
children: [
|
|
6701
6709
|
/* @__PURE__ */ U("div", {
|
|
6702
|
-
className:
|
|
6710
|
+
className: P("flex size-12 items-center justify-center rounded-full", f ? "bg-amber-100" : "bg-gray-100"),
|
|
6703
6711
|
children: f ? /* @__PURE__ */ U(sn, { className: "size-5 text-amber-600" }) : /* @__PURE__ */ U(_n, { className: "size-5 text-text-2" })
|
|
6704
6712
|
}),
|
|
6705
6713
|
/* @__PURE__ */ U("p", {
|
|
@@ -6741,7 +6749,7 @@ var Fs = ({ wrapperStyles: e }) => /* @__PURE__ */ W("div", {
|
|
|
6741
6749
|
}) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("p", {
|
|
6742
6750
|
className: "text-text-2 text-xs",
|
|
6743
6751
|
children: "Please log in to view and participate in comments."
|
|
6744
|
-
}), /* @__PURE__ */ U(
|
|
6752
|
+
}), /* @__PURE__ */ U(x, {
|
|
6745
6753
|
elementKey: "login-cta",
|
|
6746
6754
|
onClick: d,
|
|
6747
6755
|
className: "mt-2",
|
|
@@ -6752,7 +6760,7 @@ var Fs = ({ wrapperStyles: e }) => /* @__PURE__ */ W("div", {
|
|
|
6752
6760
|
})]
|
|
6753
6761
|
});
|
|
6754
6762
|
}, Ys = ({ communityName: e = "this community", className: t }) => /* @__PURE__ */ W("div", {
|
|
6755
|
-
className:
|
|
6763
|
+
className: P("flex flex-col items-center gap-3", t),
|
|
6756
6764
|
children: [
|
|
6757
6765
|
/* @__PURE__ */ U("div", {
|
|
6758
6766
|
className: "flex size-14 items-center justify-center rounded-full bg-amber-100",
|
|
@@ -6803,7 +6811,7 @@ var Fs = ({ wrapperStyles: e }) => /* @__PURE__ */ W("div", {
|
|
|
6803
6811
|
})
|
|
6804
6812
|
]
|
|
6805
6813
|
}), Zs = ({ isOpen: e, communityName: t = "this community", className: n }) => {
|
|
6806
|
-
let { isLoggedIn: r } =
|
|
6814
|
+
let { isLoggedIn: r } = A(), { openModal: i } = M(), { isJoinRequestPending: a, allowJoinRequests: o, submitJoinRequest: s } = Ho(), [c, l] = V(!1), [u, d] = V(null), f = () => {
|
|
6807
6815
|
i("login", {});
|
|
6808
6816
|
}, p = async (e) => {
|
|
6809
6817
|
l(!0), d(null);
|
|
@@ -6815,32 +6823,32 @@ var Fs = ({ wrapperStyles: e }) => /* @__PURE__ */ W("div", {
|
|
|
6815
6823
|
l(!1);
|
|
6816
6824
|
}
|
|
6817
6825
|
}, m = r && a;
|
|
6818
|
-
return /* @__PURE__ */ U(
|
|
6826
|
+
return /* @__PURE__ */ U(oe, {
|
|
6819
6827
|
open: e,
|
|
6820
|
-
children: /* @__PURE__ */ U(
|
|
6821
|
-
className:
|
|
6828
|
+
children: /* @__PURE__ */ U(ne, {
|
|
6829
|
+
className: P("max-w-md", n),
|
|
6822
6830
|
showCloseButton: !1,
|
|
6823
6831
|
onPointerDownOutside: (e) => e.preventDefault(),
|
|
6824
6832
|
onEscapeKeyDown: (e) => e.preventDefault(),
|
|
6825
|
-
children: /* @__PURE__ */ W(
|
|
6833
|
+
children: /* @__PURE__ */ W(ee, {
|
|
6826
6834
|
className: "items-center gap-4",
|
|
6827
6835
|
children: [
|
|
6828
6836
|
/* @__PURE__ */ U("div", {
|
|
6829
|
-
className:
|
|
6837
|
+
className: P("flex size-14 items-center justify-center rounded-full", m ? "bg-amber-100" : "bg-gray-100"),
|
|
6830
6838
|
children: m ? /* @__PURE__ */ U(sn, { className: "size-6 text-amber-600" }) : /* @__PURE__ */ U(_n, { className: "size-6 text-text-2" })
|
|
6831
6839
|
}),
|
|
6832
|
-
/* @__PURE__ */ U(
|
|
6840
|
+
/* @__PURE__ */ U(re, {
|
|
6833
6841
|
className: "text-center font-semibold text-lg",
|
|
6834
6842
|
children: m ? "Request Pending" : "Members Only Content"
|
|
6835
6843
|
}),
|
|
6836
|
-
r ? a ? /* @__PURE__ */ W(
|
|
6844
|
+
r ? a ? /* @__PURE__ */ W(ie, {
|
|
6837
6845
|
className: "text-center text-sm text-text-2",
|
|
6838
6846
|
children: [
|
|
6839
6847
|
"Your request to join ",
|
|
6840
6848
|
t,
|
|
6841
6849
|
" is pending approval. You'll be notified once the admins review your request."
|
|
6842
6850
|
]
|
|
6843
|
-
}) : o ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(
|
|
6851
|
+
}) : o ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(ie, {
|
|
6844
6852
|
className: "text-center text-sm text-text-2",
|
|
6845
6853
|
children: "This community is invite-only. Submit a request to join and get access to posts."
|
|
6846
6854
|
}), /* @__PURE__ */ U(Ks, {
|
|
@@ -6849,17 +6857,17 @@ var Fs = ({ wrapperStyles: e }) => /* @__PURE__ */ W("div", {
|
|
|
6849
6857
|
error: u,
|
|
6850
6858
|
communityName: t,
|
|
6851
6859
|
className: "mt-2 w-full"
|
|
6852
|
-
})] }) : /* @__PURE__ */ W(
|
|
6860
|
+
})] }) : /* @__PURE__ */ W(ie, {
|
|
6853
6861
|
className: "text-center text-sm text-text-2",
|
|
6854
6862
|
children: [
|
|
6855
6863
|
"You need to be a member of ",
|
|
6856
6864
|
t,
|
|
6857
6865
|
" to view posts. Please contact the community administrators for access."
|
|
6858
6866
|
]
|
|
6859
|
-
}) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(
|
|
6867
|
+
}) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(ie, {
|
|
6860
6868
|
className: "text-center text-sm text-text-2",
|
|
6861
6869
|
children: "Please log in to access this community's content."
|
|
6862
|
-
}), /* @__PURE__ */ U(
|
|
6870
|
+
}), /* @__PURE__ */ U(x, {
|
|
6863
6871
|
elementKey: "login-cta",
|
|
6864
6872
|
onClick: f,
|
|
6865
6873
|
children: "Log in"
|
|
@@ -6869,40 +6877,40 @@ var Fs = ({ wrapperStyles: e }) => /* @__PURE__ */ W("div", {
|
|
|
6869
6877
|
})
|
|
6870
6878
|
});
|
|
6871
6879
|
}, Qs = ({ inputStyles: e, ...t }) => /* @__PURE__ */ U(Ds, {
|
|
6872
|
-
inputStyles:
|
|
6880
|
+
inputStyles: P("border-[#D1D6E1] bg-white text-sm placeholder:text-[#717C91] focus-visible:ring-1 focus-visible:ring-[#D1D6E1] sm:placeholder:text-sm", e),
|
|
6873
6881
|
leftIcon: /* @__PURE__ */ U(xn, { size: 16 }),
|
|
6874
6882
|
...t
|
|
6875
|
-
}), $s =
|
|
6883
|
+
}), $s = ke(({ children: e, className: t, config: n, content: r, styles: i, elementKey: a, generatedClassName: o, ...s }, c) => {
|
|
6876
6884
|
let l = e ?? r;
|
|
6877
6885
|
return typeof l == "string" ? /* @__PURE__ */ U(`h${n?.heading?.level ?? 2}`, {
|
|
6878
6886
|
ref: c,
|
|
6879
6887
|
"data-levo_element_key": a,
|
|
6880
6888
|
"data-levo_element_type": "Heading",
|
|
6881
|
-
className:
|
|
6889
|
+
className: P(t, o),
|
|
6882
6890
|
...s,
|
|
6883
6891
|
children: l ? Ft(l) : ""
|
|
6884
6892
|
}) : null;
|
|
6885
6893
|
});
|
|
6886
6894
|
$s.displayName = "BaseHeading";
|
|
6887
|
-
var ec =
|
|
6888
|
-
let { isStudio: s } =
|
|
6895
|
+
var ec = v($s), tc = ke(({ className: e, elementKey: t, generatedClassName: n, content: r, styles: i, ...a }, o) => {
|
|
6896
|
+
let { isStudio: s } = k();
|
|
6889
6897
|
return /* @__PURE__ */ U("div", {
|
|
6890
6898
|
ref: o,
|
|
6891
6899
|
"data-levo_element_key": t,
|
|
6892
6900
|
"data-levo_element_type": "Iframe",
|
|
6893
|
-
className:
|
|
6901
|
+
className: P(e, n, s && "[&>*]:pointer-events-none"),
|
|
6894
6902
|
...a,
|
|
6895
6903
|
children: typeof r == "string" ? Ft(r) : ""
|
|
6896
6904
|
});
|
|
6897
6905
|
});
|
|
6898
6906
|
tc.displayName = "BaseIframe";
|
|
6899
|
-
var nc =
|
|
6907
|
+
var nc = v(tc), rc = ke(({ className: e, image: t, alt: n, width: r, height: i, config: a, content: o, styles: s, elementKey: c, generatedClassName: l, ...u }, d) => {
|
|
6900
6908
|
let f = t ?? o;
|
|
6901
6909
|
return f?.location ? /* @__PURE__ */ U("img", {
|
|
6902
6910
|
ref: d,
|
|
6903
6911
|
"data-levo_element_key": c,
|
|
6904
6912
|
"data-levo_element_type": "Image",
|
|
6905
|
-
className:
|
|
6913
|
+
className: P(e, l),
|
|
6906
6914
|
src: f?.location,
|
|
6907
6915
|
srcSet: f?.srcset?.path,
|
|
6908
6916
|
alt: a?.image?.alt ?? n,
|
|
@@ -6918,26 +6926,26 @@ var nc = _(tc), rc = Ae(({ className: e, image: t, alt: n, width: r, height: i,
|
|
|
6918
6926
|
});
|
|
6919
6927
|
});
|
|
6920
6928
|
rc.displayName = "BaseImage";
|
|
6921
|
-
var ic =
|
|
6929
|
+
var ic = v(rc), ac = ke(({ children: e, className: t, config: n, content: r, styles: i, elementKey: a, generatedClassName: o, ...s }, c) => {
|
|
6922
6930
|
let l = n?.action?.type === "external_link" ? n?.action?.value : n?.action?.type === "email" ? `mailto:${n?.action?.value}` : n?.action?.type === "phone" ? `tel:${n?.action?.value}` : "#";
|
|
6923
6931
|
return /* @__PURE__ */ U("a", {
|
|
6924
6932
|
ref: c,
|
|
6925
6933
|
"data-levo_element_key": a,
|
|
6926
6934
|
"data-levo_element_type": "Link",
|
|
6927
|
-
className:
|
|
6935
|
+
className: P(t, o),
|
|
6928
6936
|
href: l,
|
|
6929
6937
|
...s,
|
|
6930
6938
|
children: e
|
|
6931
6939
|
});
|
|
6932
6940
|
});
|
|
6933
6941
|
ac.displayName = "BaseLink";
|
|
6934
|
-
var oc =
|
|
6942
|
+
var oc = v(ac), sc = ke(({ className: e, media: t, alt: n, width: r, height: i, content: a, config: o, styles: s, elementKey: c, generatedClassName: l, isVideo: u, ...d }, f) => {
|
|
6935
6943
|
let p = t ?? a;
|
|
6936
6944
|
return p?.location ? u || p.type === "video" || p.location.match(/\.(mp4|webm|ogg|mov)$/i) ? /* @__PURE__ */ W("video", {
|
|
6937
6945
|
ref: f,
|
|
6938
6946
|
"data-levo_element_key": c,
|
|
6939
6947
|
"data-levo_element_type": "Media",
|
|
6940
|
-
className:
|
|
6948
|
+
className: P(e, l),
|
|
6941
6949
|
width: o?.media?.width ?? r,
|
|
6942
6950
|
height: o?.media?.height ?? i,
|
|
6943
6951
|
"aria-label": o?.media?.alt ?? n,
|
|
@@ -6960,7 +6968,7 @@ var oc = _(ac), sc = Ae(({ className: e, media: t, alt: n, width: r, height: i,
|
|
|
6960
6968
|
ref: f,
|
|
6961
6969
|
"data-levo_element_key": c,
|
|
6962
6970
|
"data-levo_element_type": "Media",
|
|
6963
|
-
className:
|
|
6971
|
+
className: P(e, l),
|
|
6964
6972
|
src: p.location,
|
|
6965
6973
|
srcSet: p.srcset?.path,
|
|
6966
6974
|
alt: o?.image?.alt ?? n,
|
|
@@ -6976,7 +6984,7 @@ var oc = _(ac), sc = Ae(({ className: e, media: t, alt: n, width: r, height: i,
|
|
|
6976
6984
|
});
|
|
6977
6985
|
});
|
|
6978
6986
|
sc.displayName = "BaseMedia";
|
|
6979
|
-
var cc =
|
|
6987
|
+
var cc = v(sc), lc = [
|
|
6980
6988
|
{
|
|
6981
6989
|
id: "subtle-grid",
|
|
6982
6990
|
name: "Subtle Grid",
|
|
@@ -7159,9 +7167,9 @@ var mc = (e) => dc[e] || null, hc = (e) => {
|
|
|
7159
7167
|
break;
|
|
7160
7168
|
}
|
|
7161
7169
|
return t;
|
|
7162
|
-
}, yc =
|
|
7170
|
+
}, yc = L(() => import("./Beams-DEybrmUZ.js").then((e) => ({ default: e.BackgroundBeams }))), bc = L(() => import("./Dots-CMyy77GM.js").then((e) => ({ default: e.BackgroundDots }))), xc = L(() => import("./Grid-kGCr-6by.js").then((e) => ({ default: e.BackgroundGrid }))), Sc = L(() => import("./Gradient-DBn_zXzI.js").then((e) => ({ default: e.BackgroundGradient }))), Cc = L(() => import("./Waves-DjLcbiBu.js").then((e) => ({ default: e.BackgroundWaves }))), wc = Ae(() => /* @__PURE__ */ U("div", { className: "absolute inset-0 z-[-1] bg-transparent" }));
|
|
7163
7171
|
wc.displayName = "EffectFallback";
|
|
7164
|
-
var Tc =
|
|
7172
|
+
var Tc = Ae(({ config: e }) => {
|
|
7165
7173
|
let { type: t, colors: n, settings: r } = e, i = z(() => {
|
|
7166
7174
|
switch (t) {
|
|
7167
7175
|
case "beams": return {
|
|
@@ -7212,7 +7220,7 @@ var Tc = je(({ config: e }) => {
|
|
|
7212
7220
|
}
|
|
7213
7221
|
});
|
|
7214
7222
|
Tc.displayName = "EffectRenderer";
|
|
7215
|
-
var Ec =
|
|
7223
|
+
var Ec = Ae(({ config: e, presetId: t }) => {
|
|
7216
7224
|
let n = z(() => {
|
|
7217
7225
|
if (t) {
|
|
7218
7226
|
let n = gc(t);
|
|
@@ -7224,7 +7232,7 @@ var Ec = je(({ config: e, presetId: t }) => {
|
|
|
7224
7232
|
}
|
|
7225
7233
|
return e || null;
|
|
7226
7234
|
}, [e, t]);
|
|
7227
|
-
return n ? /* @__PURE__ */ U(
|
|
7235
|
+
return n ? /* @__PURE__ */ U(De, {
|
|
7228
7236
|
fallback: /* @__PURE__ */ U(wc, {}),
|
|
7229
7237
|
children: /* @__PURE__ */ U(Tc, { config: n })
|
|
7230
7238
|
}) : null;
|
|
@@ -7232,11 +7240,11 @@ var Ec = je(({ config: e, presetId: t }) => {
|
|
|
7232
7240
|
Ec.displayName = "BackgroundEffects";
|
|
7233
7241
|
//#endregion
|
|
7234
7242
|
//#region src/elements/Section.tsx
|
|
7235
|
-
var Dc =
|
|
7243
|
+
var Dc = ke(({ children: e, className: t, elementKey: n, generatedClassName: r, content: i, config: a, styles: o, ...s }, c) => /* @__PURE__ */ W("section", {
|
|
7236
7244
|
ref: c,
|
|
7237
7245
|
"data-levo_element_key": n,
|
|
7238
7246
|
"data-levo_element_type": "Section",
|
|
7239
|
-
className:
|
|
7247
|
+
className: P(t, r),
|
|
7240
7248
|
...s,
|
|
7241
7249
|
children: [
|
|
7242
7250
|
/* @__PURE__ */ U(_o, { backgroundVideo: a?.backgroundVideo }),
|
|
@@ -7245,13 +7253,13 @@ var Dc = Ae(({ children: e, className: t, elementKey: n, generatedClassName: r,
|
|
|
7245
7253
|
]
|
|
7246
7254
|
}));
|
|
7247
7255
|
Dc.displayName = "BaseSection";
|
|
7248
|
-
var Oc =
|
|
7256
|
+
var Oc = v(Dc), kc = Pn.Root;
|
|
7249
7257
|
function Ac({ className: e, elementKey: t, generatedClassName: n, content: r, config: i, styles: a, ref: o, ...s }) {
|
|
7250
7258
|
return /* @__PURE__ */ U(Pn.List, {
|
|
7251
7259
|
ref: o,
|
|
7252
7260
|
"data-levo_element_key": t,
|
|
7253
7261
|
"data-levo_element_type": "TabsList",
|
|
7254
|
-
className:
|
|
7262
|
+
className: P("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", e, n),
|
|
7255
7263
|
...s
|
|
7256
7264
|
});
|
|
7257
7265
|
}
|
|
@@ -7261,7 +7269,7 @@ function jc({ className: e, elementKey: t, generatedClassName: n, content: r, co
|
|
|
7261
7269
|
ref: o,
|
|
7262
7270
|
"data-levo_element_key": t,
|
|
7263
7271
|
"data-levo_element_type": "TabsTrigger",
|
|
7264
|
-
className:
|
|
7272
|
+
className: P("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 font-medium text-sm ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm", e, n),
|
|
7265
7273
|
...s,
|
|
7266
7274
|
children: r
|
|
7267
7275
|
});
|
|
@@ -7272,24 +7280,24 @@ function Mc({ className: e, elementKey: t, generatedClassName: n, content: r, co
|
|
|
7272
7280
|
ref: o,
|
|
7273
7281
|
"data-levo_element_key": t,
|
|
7274
7282
|
"data-levo_element_type": "TabsContent",
|
|
7275
|
-
className:
|
|
7283
|
+
className: P("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", e, n),
|
|
7276
7284
|
...s
|
|
7277
7285
|
});
|
|
7278
7286
|
}
|
|
7279
7287
|
Mc.displayName = "BaseTabsContent";
|
|
7280
|
-
var Nc =
|
|
7288
|
+
var Nc = v(Ac), Pc = v(jc), Fc = v(Mc), Ic = { TypographyBaseStyles: "_TypographyBaseStyles_wqur5_1" }, Lc = ke(({ children: e, className: t, content: n, config: r, styles: i, elementKey: a, generatedClassName: o, ...s }, c) => {
|
|
7281
7289
|
let l = Un.sanitize(e || n);
|
|
7282
7290
|
return /* @__PURE__ */ U("div", {
|
|
7283
7291
|
ref: c,
|
|
7284
7292
|
"data-levo_element_key": a,
|
|
7285
7293
|
"data-levo_element_type": "Typography",
|
|
7286
|
-
className:
|
|
7294
|
+
className: P(Ic.TypographyBaseStyles, t, o, !l && "text-muted-foreground"),
|
|
7287
7295
|
...s,
|
|
7288
7296
|
children: l ? Ft(l) : ""
|
|
7289
7297
|
});
|
|
7290
7298
|
});
|
|
7291
7299
|
Lc.displayName = "BaseTypography";
|
|
7292
|
-
var Rc =
|
|
7300
|
+
var Rc = v(Lc), Q = {
|
|
7293
7301
|
userMenu: "_userMenu_366z5_1",
|
|
7294
7302
|
userAvatar: "_userAvatar_366z5_5",
|
|
7295
7303
|
avatarCircle: "_avatarCircle_366z5_14",
|
|
@@ -7306,7 +7314,7 @@ var Rc = _(Lc), Q = {
|
|
|
7306
7314
|
spinner: "_spinner_366z5_124",
|
|
7307
7315
|
spin: "_spin_366z5_124"
|
|
7308
7316
|
}, zc = ({ elementKey: e, className: t, config: n }) => {
|
|
7309
|
-
let { isLoggedIn: r, account: i, isSignOutLoading: a } =
|
|
7317
|
+
let { isLoggedIn: r, account: i, isSignOutLoading: a } = A(), { openModal: o } = M(), { signOut: s } = se();
|
|
7310
7318
|
if (!n?.enabled) return null;
|
|
7311
7319
|
let c = () => {
|
|
7312
7320
|
o("login");
|
|
@@ -7320,7 +7328,7 @@ var Rc = _(Lc), Q = {
|
|
|
7320
7328
|
return e && t ? `${e[0]}${t[0]}`.toUpperCase() : e ? e[0]?.toUpperCase() : n ? n[0]?.toUpperCase() : r ? r[0]?.toUpperCase() : "U";
|
|
7321
7329
|
};
|
|
7322
7330
|
return /* @__PURE__ */ U("div", {
|
|
7323
|
-
className:
|
|
7331
|
+
className: P(Q.userMenu, t),
|
|
7324
7332
|
"data-levo_element_key": e,
|
|
7325
7333
|
"data-levo_element_type": "UserMenu",
|
|
7326
7334
|
children: r ? /* @__PURE__ */ W(Zo, { children: [/* @__PURE__ */ U(es, {
|
|
@@ -7361,19 +7369,19 @@ var Rc = _(Lc), Q = {
|
|
|
7361
7369
|
onClick: l,
|
|
7362
7370
|
children: [/* @__PURE__ */ U(Dn, { size: 16 }), /* @__PURE__ */ U("span", { children: "Profile" })]
|
|
7363
7371
|
}), /* @__PURE__ */ W("button", {
|
|
7364
|
-
className:
|
|
7372
|
+
className: P(Q.userMenuItem, Q.logoutItem),
|
|
7365
7373
|
onClick: u,
|
|
7366
7374
|
disabled: a,
|
|
7367
7375
|
children: [a ? /* @__PURE__ */ U("div", { className: Q.spinner }) : /* @__PURE__ */ U(vn, { size: 16 }), /* @__PURE__ */ U("span", { children: a ? "Logging out..." : "Logout" })]
|
|
7368
7376
|
})]
|
|
7369
7377
|
})]
|
|
7370
|
-
})] }) : /* @__PURE__ */ U(
|
|
7378
|
+
})] }) : /* @__PURE__ */ U(x, {
|
|
7371
7379
|
elementKey: `${e}_loginButton`,
|
|
7372
7380
|
onClick: c,
|
|
7373
7381
|
children: "Login"
|
|
7374
7382
|
})
|
|
7375
7383
|
});
|
|
7376
|
-
}, Bc =
|
|
7384
|
+
}, Bc = v(zc), Vc = ({ booking: e, summary: t, onClose: n }) => {
|
|
7377
7385
|
let r = (e, t) => {
|
|
7378
7386
|
let n = e / 100;
|
|
7379
7387
|
return new Intl.NumberFormat("en-IN", {
|
|
@@ -7457,7 +7465,7 @@ var Rc = _(Lc), Q = {
|
|
|
7457
7465
|
] })
|
|
7458
7466
|
]
|
|
7459
7467
|
}),
|
|
7460
|
-
/* @__PURE__ */ U(
|
|
7468
|
+
/* @__PURE__ */ U(E, {
|
|
7461
7469
|
elementKey: "booking-close-btn",
|
|
7462
7470
|
onClick: n,
|
|
7463
7471
|
className: "w-full rounded-lg px-4 py-3 font-semibold",
|
|
@@ -7528,7 +7536,7 @@ var Rc = _(Lc), Q = {
|
|
|
7528
7536
|
})
|
|
7529
7537
|
]
|
|
7530
7538
|
}),
|
|
7531
|
-
/* @__PURE__ */ U(
|
|
7539
|
+
/* @__PURE__ */ U(E, {
|
|
7532
7540
|
elementKey: "booking-pay-btn",
|
|
7533
7541
|
onClick: t,
|
|
7534
7542
|
disabled: n,
|
|
@@ -7538,7 +7546,7 @@ var Rc = _(Lc), Q = {
|
|
|
7538
7546
|
]
|
|
7539
7547
|
});
|
|
7540
7548
|
}, Uc = ({ isOpen: e, onClose: t, contentId: n, collectionKey: r }) => {
|
|
7541
|
-
let i =
|
|
7549
|
+
let i = F(), { workspace: a } = A(), { Razorpay: o } = Wn(), { stripePromise: s, config: c, isOpen: l, openStripeCheckout: u, closeStripeCheckout: d, setOnComplete: f } = ce(), [p, m] = V("loading"), [h, g] = V(null), [_, v] = V(null), [y, b] = V(!1), [x, S] = V(null), C = B(null), w = Me(async (e) => {
|
|
7542
7550
|
try {
|
|
7543
7551
|
let t = await i?.fetch?.url(`/v1/payment/booking/${e}/summary`)?.options({ headers: { Origin: a?.id || "" } })?.get().json();
|
|
7544
7552
|
t?.status && t?.content?.data && v(t.content.data);
|
|
@@ -7551,7 +7559,7 @@ var Rc = _(Lc), Q = {
|
|
|
7551
7559
|
i?.fetch?.url(`/v1/payment/booking/${h._id}/confirm`)?.options({ headers: { Origin: a?.id || "" } })?.post({ session_id: e })?.json().then(async (e) => {
|
|
7552
7560
|
e?.content?.data && (g(e.content.data), await w(e.content.data._id)), d(), C.current = null, m("confirmation");
|
|
7553
7561
|
}).catch((e) => {
|
|
7554
|
-
console.error("Failed to confirm booking after Stripe payment:", e),
|
|
7562
|
+
console.error("Failed to confirm booking after Stripe payment:", e), we(e), d(), C.current = null, m("confirmation");
|
|
7555
7563
|
});
|
|
7556
7564
|
}, E = async () => {
|
|
7557
7565
|
if (h) {
|
|
@@ -7570,7 +7578,7 @@ var Rc = _(Lc), Q = {
|
|
|
7570
7578
|
})) : D(t);
|
|
7571
7579
|
} else S("Failed to initiate payment");
|
|
7572
7580
|
} catch (e) {
|
|
7573
|
-
console.error("Initiate payment error:", e),
|
|
7581
|
+
console.error("Initiate payment error:", e), we(e), S("Failed to initiate payment. Please try again.");
|
|
7574
7582
|
}
|
|
7575
7583
|
b(!1);
|
|
7576
7584
|
}
|
|
@@ -7606,7 +7614,7 @@ var Rc = _(Lc), Q = {
|
|
|
7606
7614
|
let t = await i?.fetch?.url(`/v1/payment/booking/${h._id}/confirm`)?.options({ headers: { Origin: a?.id || "" } })?.post(e).json();
|
|
7607
7615
|
t?.status && t?.content?.data ? (g(t.content.data), await w(t.content.data._id), m("confirmation")) : S("Failed to confirm payment");
|
|
7608
7616
|
} catch (e) {
|
|
7609
|
-
console.error("Confirm payment error:", e),
|
|
7617
|
+
console.error("Confirm payment error:", e), we(e), S("Failed to confirm payment. Please contact support.");
|
|
7610
7618
|
}
|
|
7611
7619
|
b(!1);
|
|
7612
7620
|
}
|
|
@@ -7624,7 +7632,7 @@ var Rc = _(Lc), Q = {
|
|
|
7624
7632
|
g(t), await w(t._id), t.unit_amount === 0 || t.status === "confirmed" ? m("confirmation") : m("summary");
|
|
7625
7633
|
} else S("Failed to create booking");
|
|
7626
7634
|
} catch (e) {
|
|
7627
|
-
console.error("Create booking error:", e),
|
|
7635
|
+
console.error("Create booking error:", e), we(e), S("Failed to create booking. Please try again.");
|
|
7628
7636
|
}
|
|
7629
7637
|
})();
|
|
7630
7638
|
}, [
|
|
@@ -7635,13 +7643,13 @@ var Rc = _(Lc), Q = {
|
|
|
7635
7643
|
a?.id,
|
|
7636
7644
|
w
|
|
7637
7645
|
]);
|
|
7638
|
-
let
|
|
7646
|
+
let k = () => {
|
|
7639
7647
|
g(null), v(null), m("loading"), S(null), t();
|
|
7640
7648
|
};
|
|
7641
7649
|
return e ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(Nn.Root, { children: /* @__PURE__ */ U("div", {
|
|
7642
7650
|
className: "fixed inset-0 z-100 flex justify-center bg-black/50 pt-24",
|
|
7643
7651
|
children: /* @__PURE__ */ W("div", {
|
|
7644
|
-
className:
|
|
7652
|
+
className: P("flex h-fit w-[90%] max-w-[500px] flex-col rounded-lg bg-white p-6"),
|
|
7645
7653
|
children: [/* @__PURE__ */ W("div", {
|
|
7646
7654
|
className: "mb-4 flex w-full items-start justify-between",
|
|
7647
7655
|
children: [/* @__PURE__ */ W("h2", {
|
|
@@ -7653,7 +7661,7 @@ var Rc = _(Lc), Q = {
|
|
|
7653
7661
|
]
|
|
7654
7662
|
}), /* @__PURE__ */ U("button", {
|
|
7655
7663
|
type: "button",
|
|
7656
|
-
onClick:
|
|
7664
|
+
onClick: k,
|
|
7657
7665
|
className: "rounded-md p-2 hover:bg-gray-100 focus:outline-none",
|
|
7658
7666
|
children: /* @__PURE__ */ U(kn, { className: "size-4" })
|
|
7659
7667
|
})]
|
|
@@ -7677,11 +7685,11 @@ var Rc = _(Lc), Q = {
|
|
|
7677
7685
|
p === "confirmation" && h && /* @__PURE__ */ U(Vc, {
|
|
7678
7686
|
booking: h,
|
|
7679
7687
|
summary: _,
|
|
7680
|
-
onClose:
|
|
7688
|
+
onClose: k
|
|
7681
7689
|
})
|
|
7682
7690
|
] })]
|
|
7683
7691
|
})
|
|
7684
|
-
}) }), l && c && /* @__PURE__ */ U(
|
|
7692
|
+
}) }), l && c && /* @__PURE__ */ U(le, {
|
|
7685
7693
|
isOpen: l,
|
|
7686
7694
|
onClose: d,
|
|
7687
7695
|
stripePromise: s,
|
|
@@ -7694,7 +7702,7 @@ var Rc = _(Lc), Q = {
|
|
|
7694
7702
|
function Wc({ className: e, ...t }) {
|
|
7695
7703
|
return /* @__PURE__ */ U(jn.Root, {
|
|
7696
7704
|
"data-slot": "avatar",
|
|
7697
|
-
className:
|
|
7705
|
+
className: P("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", e),
|
|
7698
7706
|
...t
|
|
7699
7707
|
});
|
|
7700
7708
|
}
|
|
@@ -7703,7 +7711,7 @@ function Gc({ className: e, isActive: t, ...n }) {
|
|
|
7703
7711
|
className: "relative inline-block h-full w-full overflow-hidden",
|
|
7704
7712
|
children: [/* @__PURE__ */ U(jn.Image, {
|
|
7705
7713
|
"data-slot": "avatar-image",
|
|
7706
|
-
className:
|
|
7714
|
+
className: P("aspect-square size-full", e),
|
|
7707
7715
|
...n
|
|
7708
7716
|
}), t && /* @__PURE__ */ U("span", { className: "absolute right-0 bottom-0 h-2.5 w-2.5 rounded-full border-2 border-white bg-green-500" })]
|
|
7709
7717
|
});
|
|
@@ -7711,7 +7719,7 @@ function Gc({ className: e, isActive: t, ...n }) {
|
|
|
7711
7719
|
function Kc({ className: e, ...t }) {
|
|
7712
7720
|
return /* @__PURE__ */ U(jn.Image, {
|
|
7713
7721
|
"data-slot": "avatar-image",
|
|
7714
|
-
className:
|
|
7722
|
+
className: P("aspect-square size-full", e),
|
|
7715
7723
|
...t
|
|
7716
7724
|
});
|
|
7717
7725
|
}
|
|
@@ -7720,7 +7728,7 @@ function qc({ className: e, isActive: t, ...n }) {
|
|
|
7720
7728
|
className: "relative inline-block h-full w-full overflow-hidden",
|
|
7721
7729
|
children: [/* @__PURE__ */ U(jn.Fallback, {
|
|
7722
7730
|
"data-slot": "avatar-fallback",
|
|
7723
|
-
className:
|
|
7731
|
+
className: P("flex size-full items-center justify-center rounded-full bg-muted", e),
|
|
7724
7732
|
...n
|
|
7725
7733
|
}), t && /* @__PURE__ */ U("span", { className: "absolute right-0 bottom-0 h-2.5 w-2.5 rounded-full border-2 border-white bg-green-500" })]
|
|
7726
7734
|
});
|
|
@@ -7728,28 +7736,28 @@ function qc({ className: e, isActive: t, ...n }) {
|
|
|
7728
7736
|
function Jc({ className: e, ...t }) {
|
|
7729
7737
|
return /* @__PURE__ */ U(jn.Fallback, {
|
|
7730
7738
|
"data-slot": "avatar-fallback",
|
|
7731
|
-
className:
|
|
7739
|
+
className: P("flex size-full items-center justify-center rounded-full bg-muted", e),
|
|
7732
7740
|
...t
|
|
7733
7741
|
});
|
|
7734
7742
|
}
|
|
7735
7743
|
function Yc({ className: e, ...t }) {
|
|
7736
7744
|
return /* @__PURE__ */ U("span", {
|
|
7737
7745
|
"data-slot": "avatar-badge",
|
|
7738
|
-
className:
|
|
7746
|
+
className: P("absolute right-0 bottom-0 z-10 inline-flex select-none items-center justify-center rounded-full bg-primary text-primary-foreground ring-2 ring-background", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", e),
|
|
7739
7747
|
...t
|
|
7740
7748
|
});
|
|
7741
7749
|
}
|
|
7742
7750
|
function Xc({ className: e, ...t }) {
|
|
7743
7751
|
return /* @__PURE__ */ U("div", {
|
|
7744
7752
|
"data-slot": "avatar-group",
|
|
7745
|
-
className:
|
|
7753
|
+
className: P("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background", e),
|
|
7746
7754
|
...t
|
|
7747
7755
|
});
|
|
7748
7756
|
}
|
|
7749
7757
|
function Zc({ className: e, ...t }) {
|
|
7750
7758
|
return /* @__PURE__ */ U("div", {
|
|
7751
7759
|
"data-slot": "avatar-group-count",
|
|
7752
|
-
className:
|
|
7760
|
+
className: P("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground text-sm ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3", e),
|
|
7753
7761
|
...t
|
|
7754
7762
|
});
|
|
7755
7763
|
}
|
|
@@ -7758,14 +7766,14 @@ function Zc({ className: e, ...t }) {
|
|
|
7758
7766
|
function Qc({ className: e, ...t }) {
|
|
7759
7767
|
return /* @__PURE__ */ U("kbd", {
|
|
7760
7768
|
"data-slot": "kbd",
|
|
7761
|
-
className:
|
|
7769
|
+
className: P("pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-sm bg-muted in-data-[slot=tooltip-content]:bg-background/20 px-1 font-medium font-sans in-data-[slot=tooltip-content]:text-background text-muted-foreground text-xs dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3", e),
|
|
7762
7770
|
...t
|
|
7763
7771
|
});
|
|
7764
7772
|
}
|
|
7765
7773
|
function $c({ className: e, ...t }) {
|
|
7766
7774
|
return /* @__PURE__ */ U("kbd", {
|
|
7767
7775
|
"data-slot": "kbd-group",
|
|
7768
|
-
className:
|
|
7776
|
+
className: P("inline-flex items-center gap-1", e),
|
|
7769
7777
|
...t
|
|
7770
7778
|
});
|
|
7771
7779
|
}
|
|
@@ -7773,7 +7781,7 @@ function $c({ className: e, ...t }) {
|
|
|
7773
7781
|
//#region src/components/ui/Calendar.tsx
|
|
7774
7782
|
var el = ({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: r = "label", formatters: i, components: a, ...o }) => /* @__PURE__ */ U(Gn, {
|
|
7775
7783
|
showOutsideDays: n,
|
|
7776
|
-
className:
|
|
7784
|
+
className: P("group/calendar bg-background p-0 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, e),
|
|
7777
7785
|
captionLayout: r,
|
|
7778
7786
|
formatters: {
|
|
7779
7787
|
formatMonthDropdown: (e) => e.toLocaleString("default", { month: "short" }),
|
|
@@ -7790,7 +7798,7 @@ var el = ({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout:
|
|
|
7790
7798
|
dropdowns: "w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",
|
|
7791
7799
|
dropdown_root: "relative focus:border-ring border border-input shadow-xs focus:ring-ring/50 focus:ring-[3px] rounded-md",
|
|
7792
7800
|
dropdown: "absolute bg-popover inset-0 opacity-0",
|
|
7793
|
-
caption_label:
|
|
7801
|
+
caption_label: P("select-none font-medium", r === "label" ? "text-sm" : "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground"),
|
|
7794
7802
|
month_grid: "w-full border-collapse",
|
|
7795
7803
|
weekdays: "flex",
|
|
7796
7804
|
weekday: "text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",
|
|
@@ -7816,7 +7824,7 @@ var el = ({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout:
|
|
|
7816
7824
|
...n
|
|
7817
7825
|
}),
|
|
7818
7826
|
Chevron: ({ className: e, orientation: t, ...n }) => U(t === "left" ? an : t === "right" ? on : rn, {
|
|
7819
|
-
className:
|
|
7827
|
+
className: P("size-4", e),
|
|
7820
7828
|
...n
|
|
7821
7829
|
}),
|
|
7822
7830
|
WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ U("td", {
|
|
@@ -7835,13 +7843,13 @@ var el = ({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout:
|
|
|
7835
7843
|
function tl({ className: e, ...t }) {
|
|
7836
7844
|
return /* @__PURE__ */ U("textarea", {
|
|
7837
7845
|
"data-slot": "textarea",
|
|
7838
|
-
className:
|
|
7846
|
+
className: P("field-sizing-content flex min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs outline-none transition-[color,box-shadow] placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40", e),
|
|
7839
7847
|
...t
|
|
7840
7848
|
});
|
|
7841
7849
|
}
|
|
7842
7850
|
//#endregion
|
|
7843
7851
|
//#region src/components/ui/form/FormTextarea.tsx
|
|
7844
|
-
var nl =
|
|
7852
|
+
var nl = Te.forwardRef(({ name: e, label: t, isRequired: n, labelStyles: r, containerStyles: i, disabled: a, placeholder: o, readOnly: s, textAreaProps: c, textAreaStyles: l, value: u, id: d, onBlur: f, onChange: p, error: m, helperText: h, touched: g }, _) => /* @__PURE__ */ W(Es, {
|
|
7845
7853
|
containerStyles: i,
|
|
7846
7854
|
error: m,
|
|
7847
7855
|
helperText: h,
|
|
@@ -7855,7 +7863,7 @@ var nl = Ee.forwardRef(({ name: e, label: t, isRequired: n, labelStyles: r, cont
|
|
|
7855
7863
|
}), /* @__PURE__ */ U(tl, {
|
|
7856
7864
|
id: d || e,
|
|
7857
7865
|
name: e,
|
|
7858
|
-
className:
|
|
7866
|
+
className: P(s && "focus-visible:ring-0", l),
|
|
7859
7867
|
ref: _,
|
|
7860
7868
|
onChange: p,
|
|
7861
7869
|
onBlur: f,
|
|
@@ -7967,7 +7975,7 @@ var rl = {
|
|
|
7967
7975
|
})]
|
|
7968
7976
|
})
|
|
7969
7977
|
}), sl = ({ isOpen: e, handleGlobalSearchDialogOpen: t }) => {
|
|
7970
|
-
let n =
|
|
7978
|
+
let n = F(), [r, i] = V(""), [a, o] = V([]), [s, c] = V(!1), [l, u] = V(null), [d, f] = V(!1), p = Kn(Me(async (e) => {
|
|
7971
7979
|
try {
|
|
7972
7980
|
let t = await n.fetch.url("/v1/builder/search").query({
|
|
7973
7981
|
q: e,
|
|
@@ -7980,17 +7988,17 @@ var rl = {
|
|
|
7980
7988
|
} finally {
|
|
7981
7989
|
c(!1);
|
|
7982
7990
|
}
|
|
7983
|
-
}, [n]), 600), m =
|
|
7991
|
+
}, [n]), 600), m = Me((e) => {
|
|
7984
7992
|
if (i(e), e.length < 2) {
|
|
7985
7993
|
p.cancel(), o([]), c(!1), u(null), e.length === 0 && f(!1);
|
|
7986
7994
|
return;
|
|
7987
7995
|
}
|
|
7988
7996
|
c(!0), u(null), p(e);
|
|
7989
7997
|
}, [p]);
|
|
7990
|
-
return /* @__PURE__ */ U(
|
|
7998
|
+
return /* @__PURE__ */ U(oe, {
|
|
7991
7999
|
open: e,
|
|
7992
8000
|
onOpenChange: t,
|
|
7993
|
-
children: /* @__PURE__ */ W(
|
|
8001
|
+
children: /* @__PURE__ */ W(ne, {
|
|
7994
8002
|
className: "flex max-w-[22rem]! animate-none! flex-col sm:max-w-2xl!",
|
|
7995
8003
|
showCloseButton: !1,
|
|
7996
8004
|
style: {
|
|
@@ -8067,7 +8075,7 @@ var rl = {
|
|
|
8067
8075
|
};
|
|
8068
8076
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
8069
8077
|
}, []);
|
|
8070
|
-
let i =
|
|
8078
|
+
let i = Me((e) => {
|
|
8071
8079
|
r(e);
|
|
8072
8080
|
}, []);
|
|
8073
8081
|
return /* @__PURE__ */ W(H, { children: [
|
|
@@ -8140,8 +8148,8 @@ var rl = {
|
|
|
8140
8148
|
...i,
|
|
8141
8149
|
unstyled: !0,
|
|
8142
8150
|
classNames: {
|
|
8143
|
-
container: () =>
|
|
8144
|
-
control: ({ isFocused: e, isMulti: t, isDisabled: n }) =>
|
|
8151
|
+
container: () => P("h-auto min-h-none w-full min-w-none"),
|
|
8152
|
+
control: ({ isFocused: e, isMulti: t, isDisabled: n }) => P("w-full pl-3", t ? "h-auto min-h-9!" : "!min-h-none h-9", "rounded-md border border-input bg-brand-foreground text-brand text-sm shadow-xs transition-[color,box-shadow] hover:cursor-pointer", "flex", e && "border-ring outline-none ring-[3px] ring-ring/50", o && "ring-0", n && "opacity-50", y),
|
|
8145
8153
|
input: () => "",
|
|
8146
8154
|
valueContainer: () => "gap-[4px] py-1",
|
|
8147
8155
|
singleValue: () => "",
|
|
@@ -8156,9 +8164,9 @@ var rl = {
|
|
|
8156
8164
|
menuPortal: () => "z-9999!",
|
|
8157
8165
|
groupHeading: () => "ml-3 mt-2 mb-1 text-gray-500 text-sm",
|
|
8158
8166
|
placeholder: () => "text-gray-500 pl-1 py-0.5",
|
|
8159
|
-
option: ({ isSelected: e, isFocused: t }) =>
|
|
8167
|
+
option: ({ isSelected: e, isFocused: t }) => P("rounded px-3 py-2 font-medium text-sm hover:cursor-pointer", t && "bg-brand-foreground text-brand", e && "bg-brand-foreground text-brand"),
|
|
8160
8168
|
noOptionsMessage: () => "text-gray-500 p-2 bg-gray-50 border border-dashed border-gray-200 rounded-sm",
|
|
8161
|
-
menuList: () =>
|
|
8169
|
+
menuList: () => P("space-y-1", b)
|
|
8162
8170
|
}
|
|
8163
8171
|
}),
|
|
8164
8172
|
x
|
|
@@ -8246,7 +8254,7 @@ var rl = {
|
|
|
8246
8254
|
let a = z(() => {
|
|
8247
8255
|
let t = e?.sections?.flatMap((e) => e?.fields)?.filter((e) => ml.includes(e?.field_interface))?.filter((e) => i?.includes(e?.key));
|
|
8248
8256
|
return r ? [hl, ...t] : t;
|
|
8249
|
-
}, [e?.sections, r]), o = z(() =>
|
|
8257
|
+
}, [e?.sections, r]), o = z(() => ue({
|
|
8250
8258
|
...e,
|
|
8251
8259
|
sections: e?.sections?.map((e) => ({
|
|
8252
8260
|
...e,
|
|
@@ -8425,14 +8433,14 @@ var rl = {
|
|
|
8425
8433
|
] }),
|
|
8426
8434
|
/* @__PURE__ */ W("div", {
|
|
8427
8435
|
className: "flex flex-col-reverse justify-end gap-4 md:flex-row",
|
|
8428
|
-
children: [/* @__PURE__ */ U(
|
|
8436
|
+
children: [/* @__PURE__ */ U(E, {
|
|
8429
8437
|
elementKey: "",
|
|
8430
8438
|
className: "rounded-lg bg-gray-100 px-6 py-2 font-semibold text-black hover:bg-gray-200",
|
|
8431
8439
|
type: "button",
|
|
8432
8440
|
onClick: a,
|
|
8433
8441
|
disabled: i,
|
|
8434
8442
|
children: "Back"
|
|
8435
|
-
}), /* @__PURE__ */ U(
|
|
8443
|
+
}), /* @__PURE__ */ U(E, {
|
|
8436
8444
|
elementKey: "",
|
|
8437
8445
|
className: "rounded-lg px-6 py-2 font-semibold",
|
|
8438
8446
|
type: "submit",
|
|
@@ -8492,7 +8500,7 @@ var rl = {
|
|
|
8492
8500
|
className: "mt-1 text-red-400 text-xs",
|
|
8493
8501
|
children: n
|
|
8494
8502
|
})]
|
|
8495
|
-
}), /* @__PURE__ */ U(
|
|
8503
|
+
}), /* @__PURE__ */ U(E, {
|
|
8496
8504
|
elementKey: "",
|
|
8497
8505
|
"aria-label": "Apply Coupon",
|
|
8498
8506
|
onClick: () => i(),
|
|
@@ -8753,7 +8761,7 @@ var rl = {
|
|
|
8753
8761
|
children: [/* @__PURE__ */ U("div", {
|
|
8754
8762
|
className: "flex w-full flex-col gap-3 md:w-[55%]",
|
|
8755
8763
|
children: e.map((e) => /* @__PURE__ */ U("div", {
|
|
8756
|
-
className:
|
|
8764
|
+
className: P("flex cursor-pointer items-center justify-between rounded-md border border-gray-300 px-3 py-2 transition duration-300 hover:bg-gray-50", e._id === t?._id ? "border-brand border-l-2 bg-brand/10 hover:bg-brand/20" : ""),
|
|
8757
8765
|
onClick: () => n(e),
|
|
8758
8766
|
children: /* @__PURE__ */ W("div", {
|
|
8759
8767
|
className: `${e._id === t?._id ? "-ml-[2px]" : "ml-0"}`,
|
|
@@ -9032,7 +9040,7 @@ var rl = {
|
|
|
9032
9040
|
})]
|
|
9033
9041
|
})
|
|
9034
9042
|
}) : /* @__PURE__ */ W("div", {
|
|
9035
|
-
className:
|
|
9043
|
+
className: P("flex cursor-pointer items-center justify-between border-b border-b-gray-300 pr-1 pl-4 transition-all duration-200 hover:bg-gray-50", t ? "h-[50px] py-3" : "py-3"),
|
|
9036
9044
|
onClick: () => t ? o() : null,
|
|
9037
9045
|
children: [/* @__PURE__ */ W("span", {
|
|
9038
9046
|
className: "flex items-center gap-2",
|
|
@@ -9045,7 +9053,7 @@ var rl = {
|
|
|
9045
9053
|
})]
|
|
9046
9054
|
}), /* @__PURE__ */ U("div", {
|
|
9047
9055
|
className: "mt-3 flex justify-start",
|
|
9048
|
-
children: /* @__PURE__ */ U(
|
|
9056
|
+
children: /* @__PURE__ */ U(E, {
|
|
9049
9057
|
elementKey: "",
|
|
9050
9058
|
onClick: c,
|
|
9051
9059
|
className: "rounded-lg px-6 py-2 font-semibold",
|
|
@@ -9090,18 +9098,18 @@ var Dl = async (e, t, n) => {
|
|
|
9090
9098
|
console.log(e);
|
|
9091
9099
|
}
|
|
9092
9100
|
}, Ol = ({ eventID: e, title: t, external: n, buttonText: r = "Register Now" }) => {
|
|
9093
|
-
let i =
|
|
9094
|
-
x(null), _(void 0),
|
|
9095
|
-
}, { Razorpay:
|
|
9096
|
-
let e =
|
|
9097
|
-
e && i?.fetch?.url(`/v1/event/booking/${e.bookingId}/confirm-booking`)?.options({ headers: { Origin:
|
|
9098
|
-
e?.content?.data && _(e?.content?.data),
|
|
9101
|
+
let i = F(), [a, o] = V([]), [s, c] = V(!0), { isOpen: l, onOpen: u, onClose: d } = El(), [f, p] = V(!1), [m, h] = V(null), [g, _] = V(void 0), [v, y] = V(""), [b, x] = V(null), [S, C] = V(!1), [w, T] = V(null), [D, O] = V(!1), [k, j] = V(1), [M, N] = V(null), [ee, te] = V([]), { workspace: ne } = A(), re = B(null), ie = () => {
|
|
9102
|
+
x(null), _(void 0), T(null), C(!1), y(""), N(null), d(), j(1), I();
|
|
9103
|
+
}, { Razorpay: ae } = Wn(), { stripePromise: oe, config: se, isOpen: ue, openStripeCheckout: de, closeStripeCheckout: fe, setOnComplete: pe } = ce(), me = () => {
|
|
9104
|
+
let e = re.current;
|
|
9105
|
+
e && i?.fetch?.url(`/v1/event/booking/${e.bookingId}/confirm-booking`)?.options({ headers: { Origin: ne?.id || "" } })?.post({ session_id: e.sessionId })?.json().then((e) => {
|
|
9106
|
+
e?.content?.data && _(e?.content?.data), fe(), re.current = null;
|
|
9099
9107
|
}).catch((e) => {
|
|
9100
|
-
console.error("Failed to confirm booking after Stripe payment:", e),
|
|
9108
|
+
console.error("Failed to confirm booking after Stripe payment:", e), we(e), fe(), re.current = null;
|
|
9101
9109
|
});
|
|
9102
|
-
},
|
|
9103
|
-
p(!0),
|
|
9104
|
-
let { name: t, email: n, is_business_purchase: r, billing_details: a, ...o } = { ...
|
|
9110
|
+
}, he = async () => {
|
|
9111
|
+
p(!0), N(null);
|
|
9112
|
+
let { name: t, email: n, is_business_purchase: r, billing_details: a, ...o } = { ...Se };
|
|
9105
9113
|
try {
|
|
9106
9114
|
let s = {
|
|
9107
9115
|
event: e,
|
|
@@ -9114,24 +9122,24 @@ var Dl = async (e, t, n) => {
|
|
|
9114
9122
|
}]
|
|
9115
9123
|
};
|
|
9116
9124
|
r && (s.is_business_purchase = !0, s.billing_details = a);
|
|
9117
|
-
let c = await i?.fetch?.url(`/v1/event/event/${e}/booking/create-new-booking`)?.options({ headers: { Origin:
|
|
9118
|
-
if (!c.status)
|
|
9125
|
+
let c = await i?.fetch?.url(`/v1/event/event/${e}/booking/create-new-booking`)?.options({ headers: { Origin: ne?.id || "" } })?.post(s).json();
|
|
9126
|
+
if (!c.status) N("Booking failed. Please try again.");
|
|
9119
9127
|
else {
|
|
9120
|
-
|
|
9128
|
+
ie();
|
|
9121
9129
|
let e = c?.content?.meta;
|
|
9122
9130
|
if (e?.key) {
|
|
9123
9131
|
let t = c?.content.data?._id;
|
|
9124
|
-
e.provider === "stripe" && e.client_secret ? (
|
|
9132
|
+
e.provider === "stripe" && e.client_secret ? (re.current = t && e.session_id ? {
|
|
9125
9133
|
bookingId: t,
|
|
9126
9134
|
sessionId: e.session_id
|
|
9127
|
-
} : null, me
|
|
9135
|
+
} : null, pe(me), await de({
|
|
9128
9136
|
key: e.key,
|
|
9129
9137
|
client_secret: e.client_secret,
|
|
9130
9138
|
amount: c?.content.data?.unit_amount || 0,
|
|
9131
9139
|
currency: e.currency || "USD",
|
|
9132
9140
|
provider: "stripe",
|
|
9133
9141
|
reference_id: e.reference_id || ""
|
|
9134
|
-
})) :
|
|
9142
|
+
})) : ge({
|
|
9135
9143
|
key: e.key,
|
|
9136
9144
|
amount: c?.content.data?.unit_amount,
|
|
9137
9145
|
currency: e.currency || "INR",
|
|
@@ -9141,19 +9149,19 @@ var Dl = async (e, t, n) => {
|
|
|
9141
9149
|
} else _(c?.content.data);
|
|
9142
9150
|
}
|
|
9143
9151
|
} catch (e) {
|
|
9144
|
-
|
|
9152
|
+
N(G(e).message || "Something went wrong. Please try again.");
|
|
9145
9153
|
}
|
|
9146
9154
|
p(!1);
|
|
9147
|
-
},
|
|
9148
|
-
let t = new
|
|
9155
|
+
}, ge = async (e) => {
|
|
9156
|
+
let t = new ae({
|
|
9149
9157
|
key: e.key,
|
|
9150
9158
|
amount: e.amount,
|
|
9151
9159
|
currency: e.currency,
|
|
9152
9160
|
order_id: e.order_id,
|
|
9153
|
-
name:
|
|
9161
|
+
name: ne?.name ?? "",
|
|
9154
9162
|
description: "Event Registration",
|
|
9155
9163
|
handler: (t) => {
|
|
9156
|
-
i?.fetch?.url(`/v1/event/booking/${e.booking_id}/confirm-booking`)?.options({ headers: { Origin:
|
|
9164
|
+
i?.fetch?.url(`/v1/event/booking/${e.booking_id}/confirm-booking`)?.options({ headers: { Origin: ne?.id || "" } })?.post({
|
|
9157
9165
|
order_id: t.razorpay_order_id,
|
|
9158
9166
|
payment_id: t.razorpay_payment_id,
|
|
9159
9167
|
signature: t.razorpay_signature
|
|
@@ -9171,18 +9179,18 @@ var Dl = async (e, t, n) => {
|
|
|
9171
9179
|
t.on("payment.failed", (e) => {
|
|
9172
9180
|
console.log(e.error.code, e.error.description, e.error.source, e.error.step, e.error.reason, e.error.metadata.order_id, e.error.metadata.payment_id);
|
|
9173
9181
|
}), t.open();
|
|
9174
|
-
},
|
|
9182
|
+
}, _e = async () => {
|
|
9175
9183
|
try {
|
|
9176
|
-
let t = await i?.fetch?.url(`/v1/event/event/${e}/coupon/list-public-coupons`)?.options({ headers: { Origin:
|
|
9177
|
-
t?.status && t?.content?.data &&
|
|
9184
|
+
let t = await i?.fetch?.url(`/v1/event/event/${e}/coupon/list-public-coupons`)?.options({ headers: { Origin: ne?.id || "" } })?.get().json();
|
|
9185
|
+
t?.status && t?.content?.data && te(t.content.data);
|
|
9178
9186
|
} catch (e) {
|
|
9179
9187
|
i?.logger?.error("Failed to fetch public coupons", { exception: G(e) });
|
|
9180
9188
|
}
|
|
9181
|
-
},
|
|
9189
|
+
}, ve = async (t) => {
|
|
9182
9190
|
let n = t ?? v;
|
|
9183
|
-
C(!0),
|
|
9191
|
+
C(!0), T(null);
|
|
9184
9192
|
try {
|
|
9185
|
-
let t = await i?.fetch?.url(`/v1/event/event/${e}/coupon/validate-coupon-code`)?.options({ headers: { Origin:
|
|
9193
|
+
let t = await i?.fetch?.url(`/v1/event/event/${e}/coupon/validate-coupon-code`)?.options({ headers: { Origin: ne?.id || "" } })?.post({
|
|
9186
9194
|
coupon: n,
|
|
9187
9195
|
event: e,
|
|
9188
9196
|
attendees: [{
|
|
@@ -9193,29 +9201,29 @@ var Dl = async (e, t, n) => {
|
|
|
9193
9201
|
}).json();
|
|
9194
9202
|
t.status && (x(t.content.data), y(n)), O(!1), C(!1);
|
|
9195
9203
|
} catch (e) {
|
|
9196
|
-
|
|
9204
|
+
T(G(e).message), C(!1);
|
|
9197
9205
|
}
|
|
9198
|
-
},
|
|
9199
|
-
y(""), x(null),
|
|
9206
|
+
}, ye = (e) => {
|
|
9207
|
+
y(""), x(null), T(null), C(!1), N(null), h(e);
|
|
9208
|
+
}, be = () => {
|
|
9209
|
+
x(null), T(null), y("");
|
|
9200
9210
|
}, xe = () => {
|
|
9201
|
-
|
|
9202
|
-
}, Se = () => {
|
|
9203
|
-
E(null), C(!1), y(""), O(!1);
|
|
9211
|
+
T(null), C(!1), y(""), O(!1);
|
|
9204
9212
|
};
|
|
9205
9213
|
R(() => {
|
|
9206
9214
|
if (n) {
|
|
9207
9215
|
c(!1);
|
|
9208
9216
|
return;
|
|
9209
9217
|
}
|
|
9210
|
-
e && (c(!0), Dl(i, e,
|
|
9218
|
+
e && (c(!0), Dl(i, e, ne?.id ?? "")?.then((e) => {
|
|
9211
9219
|
o(e), e && e.length > 0 && h(e[0] || null), c(!1);
|
|
9212
9220
|
}));
|
|
9213
9221
|
}, [e, n]), R(() => {
|
|
9214
9222
|
m?.unit_amount === 0 && a?.length === 1 && j(2);
|
|
9215
9223
|
}, [m, l]), R(() => {
|
|
9216
|
-
l && e &&
|
|
9224
|
+
l && e && _e();
|
|
9217
9225
|
}, [l, e]);
|
|
9218
|
-
let { values:
|
|
9226
|
+
let { values: Se, handleBlur: Ce, handleSubmit: Te, resetForm: I, setFieldValue: Ee } = Jn({
|
|
9219
9227
|
initialValues: {
|
|
9220
9228
|
name: "",
|
|
9221
9229
|
email: "",
|
|
@@ -9234,16 +9242,16 @@ var Dl = async (e, t, n) => {
|
|
|
9234
9242
|
}
|
|
9235
9243
|
},
|
|
9236
9244
|
onSubmit: () => {
|
|
9237
|
-
|
|
9245
|
+
he();
|
|
9238
9246
|
},
|
|
9239
9247
|
enableReinitialize: !0
|
|
9240
|
-
}),
|
|
9248
|
+
}), De = (e) => {
|
|
9241
9249
|
let { name: t, value: n, type: r, checked: i } = e.target;
|
|
9242
|
-
r === "checkbox" ?
|
|
9250
|
+
r === "checkbox" ? Ee(t, i) : Ee(t, n);
|
|
9243
9251
|
};
|
|
9244
9252
|
if (n) return /* @__PURE__ */ U("div", {
|
|
9245
9253
|
className: "my-2",
|
|
9246
|
-
children: /* @__PURE__ */ U(
|
|
9254
|
+
children: /* @__PURE__ */ U(E, {
|
|
9247
9255
|
elementKey: "",
|
|
9248
9256
|
className: "rounded-lg px-4 py-3 font-semibold",
|
|
9249
9257
|
onClick: () => window.open(n, "_blank", "noopener,noreferrer"),
|
|
@@ -9252,17 +9260,17 @@ var Dl = async (e, t, n) => {
|
|
|
9252
9260
|
});
|
|
9253
9261
|
if (s) return /* @__PURE__ */ U("div", {
|
|
9254
9262
|
className: "my-2",
|
|
9255
|
-
children: /* @__PURE__ */ U(
|
|
9263
|
+
children: /* @__PURE__ */ U(E, {
|
|
9256
9264
|
elementKey: "",
|
|
9257
9265
|
className: "rounded-lg px-4 py-2 font-bold",
|
|
9258
9266
|
children: "Loading..."
|
|
9259
9267
|
})
|
|
9260
9268
|
});
|
|
9261
|
-
let
|
|
9269
|
+
let Oe = b?.sale_amount === 0 || m?.unit_amount === 0 ? "Complete Registration" : "Pay";
|
|
9262
9270
|
return /* @__PURE__ */ W(H, { children: [
|
|
9263
9271
|
/* @__PURE__ */ U("div", {
|
|
9264
9272
|
className: "my-2",
|
|
9265
|
-
children: a?.length ? /* @__PURE__ */ U(
|
|
9273
|
+
children: a?.length ? /* @__PURE__ */ U(E, {
|
|
9266
9274
|
elementKey: "",
|
|
9267
9275
|
onClick: u,
|
|
9268
9276
|
className: "rounded-lg px-4 py-3 font-semibold",
|
|
@@ -9275,7 +9283,7 @@ var Dl = async (e, t, n) => {
|
|
|
9275
9283
|
/* @__PURE__ */ U(Nn.Root, { children: l && /* @__PURE__ */ U("div", {
|
|
9276
9284
|
className: "fixed inset-0 z-100 flex justify-center bg-black/50 pt-24",
|
|
9277
9285
|
children: /* @__PURE__ */ W("div", {
|
|
9278
|
-
className:
|
|
9286
|
+
className: P("flex h-fit max-w-[90%] flex-col rounded-lg bg-white p-4 md:w-[40%]", D ? "md:max-w-[30%]" : "md:max-w-[40%]"),
|
|
9279
9287
|
children: [/* @__PURE__ */ W("div", {
|
|
9280
9288
|
className: `mb-4 flex w-full items-start justify-between ${D ? "" : "pb-[6px]"} `,
|
|
9281
9289
|
children: [/* @__PURE__ */ W("h2", {
|
|
@@ -9287,40 +9295,40 @@ var Dl = async (e, t, n) => {
|
|
|
9287
9295
|
]
|
|
9288
9296
|
}), /* @__PURE__ */ U("button", {
|
|
9289
9297
|
type: "button",
|
|
9290
|
-
onClick:
|
|
9298
|
+
onClick: ie,
|
|
9291
9299
|
className: "rounded-md p-2 hover:bg-gray-100 focus:outline-none",
|
|
9292
9300
|
children: /* @__PURE__ */ U(kn, { className: "size-4" })
|
|
9293
9301
|
})]
|
|
9294
|
-
}), /* @__PURE__ */ W("div", { children: [
|
|
9302
|
+
}), /* @__PURE__ */ W("div", { children: [M && /* @__PURE__ */ U("div", {
|
|
9295
9303
|
className: "mb-4 rounded-md bg-red-50 p-3 text-red-600 text-sm",
|
|
9296
|
-
children:
|
|
9297
|
-
}),
|
|
9304
|
+
children: M
|
|
9305
|
+
}), k === 1 ? /* @__PURE__ */ U("div", { children: D ? /* @__PURE__ */ U(Cl, {
|
|
9298
9306
|
couponCode: v,
|
|
9299
9307
|
onCouponCodeChange: y,
|
|
9300
9308
|
couponError: w,
|
|
9301
9309
|
couponLoading: S,
|
|
9302
|
-
onValidateCoupon:
|
|
9303
|
-
publicCoupons:
|
|
9304
|
-
onBack:
|
|
9310
|
+
onValidateCoupon: ve,
|
|
9311
|
+
publicCoupons: ee,
|
|
9312
|
+
onBack: xe,
|
|
9305
9313
|
selectedTicket: m
|
|
9306
9314
|
}) : /* @__PURE__ */ U(Tl, {
|
|
9307
9315
|
tickets: a,
|
|
9308
9316
|
selectedTicket: m,
|
|
9309
|
-
onSelectTicket:
|
|
9317
|
+
onSelectTicket: ye,
|
|
9310
9318
|
discount: b,
|
|
9311
9319
|
couponCode: v,
|
|
9312
|
-
publicCouponsCount:
|
|
9320
|
+
publicCouponsCount: ee.length,
|
|
9313
9321
|
onApplyCouponClick: () => O(!0),
|
|
9314
|
-
onRemoveCoupon:
|
|
9322
|
+
onRemoveCoupon: be,
|
|
9315
9323
|
onNext: () => j(2)
|
|
9316
9324
|
}) }) : /* @__PURE__ */ U(_l, {
|
|
9317
|
-
values:
|
|
9318
|
-
handleChange:
|
|
9319
|
-
handleBlur:
|
|
9320
|
-
handleSubmit:
|
|
9325
|
+
values: Se,
|
|
9326
|
+
handleChange: De,
|
|
9327
|
+
handleBlur: Ce,
|
|
9328
|
+
handleSubmit: Te,
|
|
9321
9329
|
registerLoading: f,
|
|
9322
9330
|
onBack: () => j(1),
|
|
9323
|
-
submitLabel:
|
|
9331
|
+
submitLabel: Oe
|
|
9324
9332
|
})] })]
|
|
9325
9333
|
})
|
|
9326
9334
|
}) }),
|
|
@@ -9329,12 +9337,12 @@ var Dl = async (e, t, n) => {
|
|
|
9329
9337
|
ticketData: a,
|
|
9330
9338
|
type: "confirm"
|
|
9331
9339
|
}),
|
|
9332
|
-
|
|
9333
|
-
isOpen:
|
|
9334
|
-
onClose:
|
|
9335
|
-
stripePromise:
|
|
9336
|
-
clientSecret:
|
|
9337
|
-
onComplete:
|
|
9340
|
+
ue && se && /* @__PURE__ */ U(le, {
|
|
9341
|
+
isOpen: ue,
|
|
9342
|
+
onClose: fe,
|
|
9343
|
+
stripePromise: oe,
|
|
9344
|
+
clientSecret: se.clientSecret,
|
|
9345
|
+
onComplete: me
|
|
9338
9346
|
})
|
|
9339
9347
|
] });
|
|
9340
9348
|
}, kl = ({ blockInstance: e, blocks: t, theme: n }) => {
|
|
@@ -9367,7 +9375,7 @@ var Dl = async (e, t, n) => {
|
|
|
9367
9375
|
let e = JSON.stringify(t, null, 2);
|
|
9368
9376
|
e !== c.current && (c.current = e, i(e), o(null));
|
|
9369
9377
|
}, [t]);
|
|
9370
|
-
let l =
|
|
9378
|
+
let l = Me((e) => {
|
|
9371
9379
|
let t = e.target.value;
|
|
9372
9380
|
i(t), s.current && clearTimeout(s.current), s.current = setTimeout(() => {
|
|
9373
9381
|
try {
|
|
@@ -9486,12 +9494,12 @@ var Dl = async (e, t, n) => {
|
|
|
9486
9494
|
e.key,
|
|
9487
9495
|
e.version,
|
|
9488
9496
|
t
|
|
9489
|
-
]), y =
|
|
9497
|
+
]), y = Me((t) => {
|
|
9490
9498
|
let n = Number(t.target.value);
|
|
9491
9499
|
a(n);
|
|
9492
9500
|
let r = Ml(e, n);
|
|
9493
9501
|
f(r.content), m(r.styles), g(r.config);
|
|
9494
|
-
}, [e]), b =
|
|
9502
|
+
}, [e]), b = Me(() => {
|
|
9495
9503
|
let t = Ml(e, i);
|
|
9496
9504
|
f(t.content), m(t.styles), g(t.config);
|
|
9497
9505
|
}, [e, i]);
|
|
@@ -9777,4 +9785,4 @@ var Dl = async (e, t, n) => {
|
|
|
9777
9785
|
"password"
|
|
9778
9786
|
];
|
|
9779
9787
|
//#endregion
|
|
9780
|
-
export {
|
|
9788
|
+
export { ye as ALTERNATE_METHOD_VALUES, he as ALTERNATIVE_AUTH_METHODS, Ja as AccordionContent, Ka as AccordionItem, Ga as AccordionRoot, qa as AccordionTrigger, j as AuthProvider, _e as AuthenticationOptions, Wc as Avatar, Yc as AvatarBadge, qc as AvatarFallback, Jc as AvatarFallbackV2, Xc as AvatarGroup, Zc as AvatarGroupCount, Gc as AvatarImage, Kc as AvatarImageV2, lc as BUILT_IN_PRESETS, Ec as BackgroundEffects, ho as BaseBlogContent, E as BaseButton, jo as BaseContainer, $s as BaseHeading, Dc as BaseSection, Lc as BaseTypography, zc as BaseUserMenu, O as BlockProvider, Zl as BlockSourceModuleList, _a as BlocksRegistry, go as BlogContent, Vc as BookingConfirmation, Uc as BookingModal, Hc as BookingSummary, yo as Box, x as Button, el as Calendar, Ao as Carousel, wo as CarouselContent, Oo as CarouselDotButton, ko as CarouselDots, To as CarouselItem, Do as CarouselNext, Eo as CarouselPrevious, zo as CategoryFilter, xs as CommentStatusBadge, zs as Comments, Js as CommentsRestrictionOverlay, Mo as Container, Vs as CreateForumPost, q as DATA_ATTRIBUTES, b as DEFAULT_FROM_STATE, zi as DEFAULT_THEME, _ as DEFAULT_TRANSITION, g as DEFAULT_VIEWPORT, u as DEFAULT_VISIBLE_STATE, d as DEMO_SCHEMA, Pl as DevTools, kl as DevToolsPreview, Po as EditForm, Ro as Form, Ds as FormInput, nl as FormTextarea, Ws as ForumPost, Vo as ForumProvider, cl as GlobalSearch, ec as Heading, Ql as IMembershipAuthenticationMethods, w as Icon, nc as Iframe, ic as Image, Ss as Input, gl as IntegrationFilters, Ks as JoinRequestForm, jl as JsonEditor, Qc as Kbd, $c as KbdGroup, Jl as KindList, da as LazyMotionProvider, ba as LevoBlock, ja as LevoPage, oc as Link, J as MESSAGE_TYPES, Ca as MadeWithLevo, cc as Media, pe as PENDING_APPROVAL_ERROR_CODE, uc as PRESET_CATEGORIES, dc as PRESET_MAP, de as PRIMARY_AUTH_METHODS, ge as PRIMARY_METHOD_VALUES, Ys as PendingRequestState, ts as PopoverContent, Zo as PopoverRoot, es as PopoverTrigger, f as PopupLoader, us as PostActions, as as PostCategory, ss as PostContent, fs as PostGallery, is as PostHeader, ds as PostLink, Gs as PostLinkWrapper, _s as PostPoll, ys as PostStatusBadge, os as PostTitle, Zs as PostsRestrictionOverlay, oi as PreviewHighlighter, Ol as RegisterModal, qs as SampleCommentSkeleton, Xs as SamplePostSkeleton, Qs as SearchInput, Oc as Section, Jo as SimpleTooltipWrapper, Z as Skeleton, cs as StatContainer, za as StudioPreview, Yl as StudioWidgetList, Xl as StudioWidgetMap, Fc as TabsContent, Nc as TabsList, kc as TabsRoot, Pc as TabsTrigger, Wo as Tooltip, qo as TooltipContent, Ko as TooltipPortal, Uo as TooltipProvider, Go as TooltipTrigger, Rc as Typography, Bc as UserMenu, va as blocksRegistry, xi as colorOptions, po as convertHtmlToJSON, kr as convertKeysToPascalCase, Di as cssOptionsMap, ta as fetchCollectionSchema, ea as fetchSource, C as findFieldSchema, yi as generateAccentColor, si as generateBodyContent, Mr as generateDefaultContent, wr as generateSchemaFromJSX, Ki as generateThemeStyles, Ui as generateThemeVariables, S as generateVariantClasses, pc as getAvailableCategories, gc as getEffectConfigFromPresetId, la as getInitialPageContent, T as getNestedValue, ua as getPageData, oa as getPageSource, fc as getPresetsByCategory, vi as getWcagContrast, mi as hexToOKLCH, ve as isAlternateMethod, p as isConfigWithVariants, fe as isPendingApprovalError, me as isPrimaryMethod, pi as isValidOKLCH, Vi as normalizeColorName, Hi as normalizeFontName, fi as oklchStringToRGBA, _i as oklchToHex, gi as oklchToRGBA, Y as oklchToString, y as parseGroupContext, hi as parseOKLCHString, sa as parseVariablesFromResolvedSource, Bi as processFonts, qi as processTheme, aa as resolveStyles, ia as resolveVariables, ui as rgbaToOKLCH, di as rgbaToOKLCHString, vc as sanitizeBackgroundEffectConfig, D as sanitizeElementKey, Ml as schemaToBlockInstance, A as useAuth, k as useBlockContext, m as useCommonProps, fa as useContentEngine, pa as useContextEngine, So as useDotButton, Ho as useForumContext, h as useGeneratedClassName, se as useLogin, ma as usePageContext, ha as usePageMeta, ce as useStripePayment };
|