@levo-so/site-runtime 0.3.7 → 0.3.9
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/CollectionField-C-6a1ud4.js +270 -0
- package/{CollectionInput-B1qV4QEH.js → CollectionInput-BJ__qcbk.js} +40 -40
- package/DateTimeWidget-LfaosVVW.js +255 -0
- package/{Dialog-DVB4WpBS.js → Dialog-dT7y641z.js} +43 -43
- package/{KBChatWidget-Cnq0DCOQ.js → KBChatWidget-CuAtGhHT.js} +240 -239
- package/{LevoProvider-nmIbMlsk.js → LevoProvider-Bsjkcwc8.js} +8 -8
- package/PhoneWidget-D-CcDuie.js +99 -0
- package/{Popover-C7zZHBIc.js → Popover-BTdlOQP_.js} +20 -20
- package/{PopupBody-DZVwDLkg-yrot8Uqb.js → PopupBody-BI-MJqmd-C0qNyN7V.js} +299 -182
- package/PopupRenderer-D66Gx63H-C6RnOnl2.js +388 -0
- package/{RichTextWidget-BOrVIR2j.js → RichTextWidget-BFWVevY7.js} +140 -140
- package/ThemeProvider-DutrjSTF.js +116 -0
- package/{Tooltip-BIgrpetu.js → Tooltip-CQB0LyxK.js} +20 -20
- package/{VerifyButton-CA1GtEZJ.js → VerifyButton-BUT70lgz.js} +65 -65
- package/{dist-Cb6sb7nO.js → dist-Rjs__H25.js} +14 -14
- package/dist-orLT2eNz.js +3663 -0
- package/index.d.ts +1071 -3
- package/index.js +1365 -733
- package/inlineBaseTheme-BB9e6h5f.js +9 -0
- package/{inlineCollectionTheme-DYYMrmcE.js → inlineCollectionTheme-CWcMCUti.js} +1 -1
- package/{kbChat-DIb4AS7E.js → kbChat-L55effMi.js} +28 -28
- package/{nodeAlignment-D70kOcui.js → nodeAlignment-COvc-rIj.js} +1 -1
- package/package.json +37 -27
- package/popups.js +1 -1
- package/{react-6kO0cqgr.js → react-B9yvlbH0.js} +1 -1
- package/routes-CyKmkoRM.js +316 -0
- package/start.d.ts +38 -0
- package/start.js +19 -0
- package/styles.css +1 -1
- package/{generateRadiusScale-54mE9ikx.js → themeVars.cssm-ByhhC2Jm.js} +17 -17
- package/usePopupRedirect-CAAdcpaW-D9XoiVhG.js +82 -0
- package/CollectionField-C59pmeQw.js +0 -270
- package/DateTimeWidget-Cctsvcrs.js +0 -255
- package/PhoneWidget-J3VTMWJH.js +0 -99
- package/PopupRenderer-BjW1jg70-Biwj2bIc.js +0 -387
- package/ThemeProvider-BQmIB5tr.js +0 -116
- package/dist-C8gLeklT.js +0 -3559
- package/inlineBaseTheme-B6E9zzyp.js +0 -9
- package/usePopupRedirect-BThP_YPW-DoixMAB9.js +0 -80
- /package/{createThemeExtension-DhGk81nV.js → createThemeExtension-4AUn51iJ.js} +0 -0
- /package/{es-CztjLuNy.js → es-Bj3CsMJz.js} +0 -0
- /package/{pillChrome-BAu5AfCT.js → pillChrome-uieiq_SK.js} +0 -0
- /package/{popupState-JmpeKzgM-qhNTV79U.js → popupState-JmpeKzgM-D_77LiAa.js} +0 -0
- /package/{rteTheme.cssm-xg0gJ28J.js → rteTheme.cssm-CaRzrwtu.js} +0 -0
- /package/{theme.cssm-mkQwezuj.js → theme.cssm-DUzmx76l.js} +0 -0
package/index.js
CHANGED
|
@@ -1,127 +1,128 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { n as r } from "./
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import { Fragment as
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
2
|
+
import { n as e, r as t } from "./dist-orLT2eNz.js";
|
|
3
|
+
import { i as n, n as r, r as i } from "./LevoProvider-Bsjkcwc8.js";
|
|
4
|
+
import { t as a } from "./inlineCollectionTheme-CWcMCUti.js";
|
|
5
|
+
import { t as o } from "./inlineBaseTheme-BB9e6h5f.js";
|
|
6
|
+
import { a as s, c, d as l, f as u, i as d, l as f, n as p, o as m, r as h, s as g, t as _, u as v } from "./routes-CyKmkoRM.js";
|
|
7
|
+
import { createLevoClient as y, getLevoError as b } from "@levo-so/core";
|
|
8
|
+
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
9
|
+
import * as w from "react";
|
|
10
|
+
import { Suspense as T, createContext as E, lazy as D, useCallback as O, useContext as ee, useEffect as k, useLayoutEffect as A, useMemo as j, useRef as M, useState as N } from "react";
|
|
11
|
+
import { Dialog as P } from "@base-ui/react/dialog";
|
|
12
|
+
import { useMutation as F, useQuery as I, useQueryClient as L } from "@tanstack/react-query";
|
|
13
|
+
import { ScriptOnce as te, redirect as R, useRouterState as z } from "@tanstack/react-router";
|
|
14
|
+
import { createLevoInsights as ne } from "@levo-so/insights";
|
|
15
|
+
import { CheckIcon as re, ChevronLeftIcon as ie, ChevronRightIcon as ae, LoaderCircle as B, Tag as V, X as oe, XIcon as se } from "lucide-react";
|
|
16
|
+
import { useRazorpay as ce } from "react-razorpay";
|
|
17
|
+
import { EmbeddedCheckout as H, EmbeddedCheckoutProvider as le } from "@stripe/react-stripe-js";
|
|
18
|
+
//#region src/access/types.ts
|
|
19
|
+
var U = [
|
|
20
|
+
"otp",
|
|
21
|
+
"magiclink",
|
|
22
|
+
"whatsapp"
|
|
23
|
+
], W = [
|
|
24
|
+
"google",
|
|
25
|
+
"microsoft",
|
|
26
|
+
"linkedin"
|
|
27
|
+
], ue = [...U, ...W], de = "otp", G = (e) => typeof e == "object" && !!e && !Array.isArray(e), K = (e) => U.includes(e), fe = (e) => W.includes(e), pe = (e) => Array.isArray(e) ? e.filter((e) => typeof e == "string") : [], me = (e) => e, he = (e) => {
|
|
28
|
+
if (!G(e)) return null;
|
|
29
|
+
let t = e.enabled === void 0 ? !0 : e.enabled === !0, n = G(e.options) ? e.options : {};
|
|
30
|
+
switch (e.kind) {
|
|
31
|
+
case "authentication": return {
|
|
32
|
+
kind: "authentication",
|
|
33
|
+
enabled: t,
|
|
34
|
+
options: {
|
|
35
|
+
methods: pe(n.methods).filter((e) => K(e) || fe(e)),
|
|
36
|
+
...K(n.primary_method) ? { primary_method: n.primary_method } : {}
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
case "gating": return typeof n.collection != "string" || !n.collection.trim() ? null : {
|
|
40
|
+
kind: "gating",
|
|
41
|
+
enabled: t,
|
|
42
|
+
options: {
|
|
43
|
+
collection: n.collection.trim(),
|
|
44
|
+
...G(n.condition) ? { condition: me(n.condition) } : {},
|
|
45
|
+
hidden: pe(n.hidden)
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
case "profile": return {
|
|
49
|
+
kind: "profile",
|
|
50
|
+
enabled: t,
|
|
51
|
+
options: {
|
|
52
|
+
...G(n.condition) ? { condition: me(n.condition) } : {},
|
|
53
|
+
hidden: pe(n.hidden)
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
default: return null;
|
|
57
|
+
}
|
|
58
|
+
}, ge = (e) => {
|
|
59
|
+
if (!Array.isArray(e) || e.length === 0) return {
|
|
60
|
+
rules: [],
|
|
61
|
+
invalid: !1
|
|
62
|
+
};
|
|
63
|
+
let t = e.map(he).filter((e) => e !== null);
|
|
64
|
+
return {
|
|
65
|
+
rules: t.filter((e) => e.enabled !== !1),
|
|
66
|
+
invalid: t.length === 0
|
|
67
|
+
};
|
|
68
|
+
}, _e = (e) => {
|
|
69
|
+
let t = e.find((e) => e.kind === "authentication"), n = t?.kind === "authentication" ? t.options?.methods ?? [] : [];
|
|
70
|
+
return {
|
|
71
|
+
primary: (t?.kind === "authentication" ? t.options?.primary_method : void 0) ?? n.find(K) ?? de,
|
|
72
|
+
oauth: n.filter(fe)
|
|
73
|
+
};
|
|
74
|
+
}, ve = (e = null) => ({
|
|
75
|
+
state: "granted",
|
|
76
|
+
code: e,
|
|
77
|
+
message: null,
|
|
78
|
+
rule: null
|
|
79
|
+
}), ye = () => ({
|
|
80
|
+
state: "checking",
|
|
81
|
+
code: null,
|
|
82
|
+
message: null,
|
|
83
|
+
rule: null
|
|
84
|
+
}), q = (e, t, n = null) => ({
|
|
85
|
+
state: "blocked",
|
|
86
|
+
code: e,
|
|
87
|
+
message: t,
|
|
88
|
+
rule: n
|
|
89
|
+
}), be = (e, t) => {
|
|
90
|
+
let n = t?.split(".")[0];
|
|
91
|
+
return e.find((e) => e.kind === n) ?? null;
|
|
92
|
+
}, xe = ({ rules: e, invalid: t, pageId: n, hasClient: r, isReady: i, isLoggedIn: a, check: o }) => e.length === 0 && !t ? ve() : t ? q("access.CONFIG_INVALID", "This page's access rules could not be read.") : i ? r ? a ? n ? o.isError ? q("access.CHECK_FAILED", "We could not verify your access.") : o.isSuccess ? o.data ? o.data.has_access ? ve(o.data.code ?? null) : q(o.data.code ?? "access.CHECK_FAILED", o.data.message ?? null, be(e, o.data.code)) : q("access.CHECK_FAILED", "We could not verify your access.") : ye() : q("access.PAGE_NOT_IDENTIFIED", "This page is not linked to its access rules yet.") : q("authentication.NOT_LOGGED_IN", "You need to be signed in to view this page.", e.find((e) => e.kind === "authentication") ?? e[0] ?? null) : q("access.UNWIRED", "This site is not connected to an account system.") : ye(), Se = (e) => {
|
|
39
93
|
let t = (e?.apiUrl || "").replace(/\/$/, "");
|
|
40
|
-
return t ?
|
|
94
|
+
return t ? y({
|
|
41
95
|
apiUrl: t,
|
|
42
96
|
workspace: e?.workspace ? e.workspace : null,
|
|
43
97
|
appName: "studio-site",
|
|
44
98
|
NODE_ENV: "",
|
|
45
99
|
APP_MODE: e?.appMode || "production"
|
|
46
100
|
}) : null;
|
|
47
|
-
},
|
|
101
|
+
}, Ce = (e) => ({
|
|
48
102
|
apiUrl: e.levo?.api_url || "",
|
|
49
103
|
workspace: e.workspace_id || "",
|
|
50
104
|
siteId: e.id || "",
|
|
51
105
|
insightsUrl: e.levo?.insights_url || null,
|
|
52
106
|
appMode: e.levo?.app_mode || "production"
|
|
53
|
-
}),
|
|
54
|
-
try {
|
|
55
|
-
let t = localStorage.getItem(e);
|
|
56
|
-
return t === "light" || t === "dark" || t === "system" ? t : null;
|
|
57
|
-
} catch {
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
}, oe = (e, t) => {
|
|
61
|
-
try {
|
|
62
|
-
localStorage.setItem(e, t);
|
|
63
|
-
} catch {}
|
|
64
|
-
};
|
|
65
|
-
function se(e, t) {
|
|
66
|
-
return `(function(){try{var t=localStorage.getItem(${JSON.stringify(e)});if(t!=='light'&&t!=='dark'&&t!=='system'){t=${JSON.stringify(t)}}var d=matchMedia('${L}').matches;var r=t==='system'?(d?'dark':'light'):t;var e=document.documentElement;e.classList.remove('light','dark');e.classList.add(r);e.style.colorScheme=r}catch(e){}})();`;
|
|
67
|
-
}
|
|
68
|
-
var R = c(void 0), z = (e) => e === "system" ? window.matchMedia(L).matches ? "dark" : "light" : e;
|
|
69
|
-
function B(e) {
|
|
70
|
-
let t = document.documentElement;
|
|
71
|
-
t.classList.remove("light", "dark"), t.classList.add(e), t.style.colorScheme = e;
|
|
72
|
-
}
|
|
73
|
-
var ce = ({ children: e, defaultMode: t = "system", storageKey: n = "color-mode" }) => {
|
|
74
|
-
let [r, i] = g(t), [a, o] = g(t === "dark" ? "dark" : "light"), s = N();
|
|
75
|
-
return f(() => {
|
|
76
|
-
i(ae(n) ?? t);
|
|
77
|
-
}, [t, n]), f(() => {
|
|
78
|
-
if (!s) return;
|
|
79
|
-
let e = z(r);
|
|
80
|
-
B(e), o(e);
|
|
81
|
-
}, [r, s]), f(() => {
|
|
82
|
-
if (!s || r !== "system") return;
|
|
83
|
-
let e = window.matchMedia(L), t = () => {
|
|
84
|
-
let t = e.matches ? "dark" : "light";
|
|
85
|
-
B(t), o(t);
|
|
86
|
-
};
|
|
87
|
-
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
88
|
-
}, [r, s]), /* @__PURE__ */ y(R.Provider, {
|
|
89
|
-
value: {
|
|
90
|
-
mode: r,
|
|
91
|
-
resolvedMode: a,
|
|
92
|
-
setMode: (e) => {
|
|
93
|
-
oe(n, e), i(e);
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
children: [/* @__PURE__ */ v(S, { children: se(n, t) }), e]
|
|
97
|
-
});
|
|
98
|
-
};
|
|
99
|
-
function V() {
|
|
100
|
-
let e = d(R);
|
|
101
|
-
if (e === void 0) throw Error("useColorMode must be used within a ColorModeProvider");
|
|
102
|
-
return e;
|
|
103
|
-
}
|
|
104
|
-
//#endregion
|
|
105
|
-
//#region src/data/index.ts
|
|
106
|
-
var H = (e) => [
|
|
107
|
+
}), we = (e) => [
|
|
107
108
|
"levo-source",
|
|
108
109
|
"list",
|
|
109
110
|
e.module,
|
|
110
111
|
e.identifier,
|
|
111
112
|
e.query ?? null,
|
|
112
113
|
e.options ?? null
|
|
113
|
-
],
|
|
114
|
+
], Te = (e, t) => [
|
|
114
115
|
"levo-source",
|
|
115
116
|
"record",
|
|
116
117
|
e.module,
|
|
117
118
|
e.identifier,
|
|
118
119
|
t ?? null
|
|
119
|
-
],
|
|
120
|
+
], Ee = (e) => [
|
|
120
121
|
"levo-source",
|
|
121
122
|
"form",
|
|
122
123
|
e.module,
|
|
123
124
|
e.identifier
|
|
124
|
-
],
|
|
125
|
+
], De = async (e, t) => {
|
|
125
126
|
let n = t.module === "collection" ? await e.collection.getCollectionContentList({
|
|
126
127
|
collection_key: t.identifier,
|
|
127
128
|
...t.query ?? {}
|
|
@@ -130,76 +131,76 @@ var H = (e) => [
|
|
|
130
131
|
data: n.content.data ?? [],
|
|
131
132
|
meta: n.content.meta ?? null
|
|
132
133
|
};
|
|
133
|
-
},
|
|
134
|
+
}, Oe = async (e, t, n) => (t.module === "collection" ? await e.collection.getCollectionContent({
|
|
134
135
|
collection_key: t.identifier,
|
|
135
136
|
slug: n
|
|
136
|
-
}) : t.module === "blog" ? await e.blog.getSingleBlog(t.identifier, n) : await e.event.getSingleEvent(n)).content.data ?? null,
|
|
137
|
-
let t =
|
|
138
|
-
queryKey:
|
|
139
|
-
queryFn: () =>
|
|
137
|
+
}) : t.module === "blog" ? await e.blog.getSingleBlog(t.identifier, n) : await e.event.getSingleEvent(n)).content.data ?? null, ke = async (e, t) => (await e.collection.getCollectionByIDExpanded(t.identifier)).content.data ?? null, Ae = (e) => {
|
|
138
|
+
let t = i(), n = I({
|
|
139
|
+
queryKey: we(e),
|
|
140
|
+
queryFn: () => De(t, e),
|
|
140
141
|
enabled: !!t
|
|
141
142
|
});
|
|
142
143
|
return {
|
|
143
|
-
data:
|
|
144
|
-
meta:
|
|
145
|
-
isLoading:
|
|
146
|
-
error:
|
|
144
|
+
data: n.data?.data ?? null,
|
|
145
|
+
meta: n.data?.meta ?? null,
|
|
146
|
+
isLoading: n.isLoading,
|
|
147
|
+
error: n.error ? b(n.error).message : null,
|
|
147
148
|
bind: { "data-levo-source": JSON.stringify({
|
|
148
149
|
mode: "list",
|
|
149
150
|
...e
|
|
150
151
|
}) }
|
|
151
152
|
};
|
|
152
|
-
},
|
|
153
|
-
let
|
|
154
|
-
queryKey:
|
|
155
|
-
queryFn: () =>
|
|
156
|
-
enabled: !!
|
|
153
|
+
}, je = (e, t) => {
|
|
154
|
+
let n = i(), r = I({
|
|
155
|
+
queryKey: Te(e, t),
|
|
156
|
+
queryFn: () => Oe(n, e, t),
|
|
157
|
+
enabled: !!n && !!t
|
|
157
158
|
});
|
|
158
159
|
return {
|
|
159
|
-
data:
|
|
160
|
-
isLoading:
|
|
161
|
-
error:
|
|
160
|
+
data: r.data ?? null,
|
|
161
|
+
isLoading: r.isLoading,
|
|
162
|
+
error: r.error ? b(r.error).message : null,
|
|
162
163
|
bind: { "data-levo-source": JSON.stringify({
|
|
163
164
|
mode: "record",
|
|
164
165
|
...e
|
|
165
166
|
}) }
|
|
166
167
|
};
|
|
167
|
-
},
|
|
168
|
-
let t =
|
|
169
|
-
queryKey:
|
|
170
|
-
queryFn: () =>
|
|
168
|
+
}, Me = (e) => {
|
|
169
|
+
let t = i(), n = I({
|
|
170
|
+
queryKey: Ee(e),
|
|
171
|
+
queryFn: () => ke(t, e),
|
|
171
172
|
enabled: !!t
|
|
172
173
|
});
|
|
173
174
|
return {
|
|
174
|
-
schema:
|
|
175
|
-
isLoading:
|
|
176
|
-
error:
|
|
175
|
+
schema: n.data ?? null,
|
|
176
|
+
isLoading: n.isLoading,
|
|
177
|
+
error: n.error ? b(n.error).message : null,
|
|
177
178
|
bind: { "data-levo-source": JSON.stringify({
|
|
178
179
|
mode: "form",
|
|
179
180
|
...e
|
|
180
181
|
}) }
|
|
181
182
|
};
|
|
182
|
-
},
|
|
183
|
-
let i =
|
|
183
|
+
}, Ne = async ({ queryClient: e, config: t, sources: n, params: r }) => {
|
|
184
|
+
let i = Se(t);
|
|
184
185
|
if (!i || !n) return {};
|
|
185
186
|
let a = await Promise.all(Object.entries(n).map(async ([t, n]) => {
|
|
186
187
|
if (n.mode === "record") {
|
|
187
188
|
let a = r?.slug;
|
|
188
189
|
return a ? [t, await e.ensureQueryData({
|
|
189
|
-
queryKey:
|
|
190
|
-
queryFn: () =>
|
|
190
|
+
queryKey: Te(n, a),
|
|
191
|
+
queryFn: () => Oe(i, n, a)
|
|
191
192
|
}).catch(() => null)] : [t, null];
|
|
192
193
|
}
|
|
193
194
|
return n.mode === "form" ? [t, await e.ensureQueryData({
|
|
194
|
-
queryKey:
|
|
195
|
-
queryFn: () =>
|
|
195
|
+
queryKey: Ee(n),
|
|
196
|
+
queryFn: () => ke(i, n)
|
|
196
197
|
}).catch(() => null)] : [t, await e.ensureQueryData({
|
|
197
|
-
queryKey:
|
|
198
|
-
queryFn: () =>
|
|
198
|
+
queryKey: we(n),
|
|
199
|
+
queryFn: () => De(i, n)
|
|
199
200
|
}).catch(() => null)];
|
|
200
201
|
}));
|
|
201
202
|
return Object.fromEntries(a);
|
|
202
|
-
},
|
|
203
|
+
}, Pe = {
|
|
203
204
|
background: "var(--color-page)",
|
|
204
205
|
foreground: "var(--color-ink)",
|
|
205
206
|
text: "var(--color-ink)",
|
|
@@ -221,63 +222,550 @@ var H = (e) => [
|
|
|
221
222
|
input: "var(--color-background1)",
|
|
222
223
|
inputForeground: "var(--color-ink)",
|
|
223
224
|
ring: "var(--color-brand)"
|
|
224
|
-
},
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
225
|
+
}, Fe = (e) => j(() => ({
|
|
226
|
+
...o({
|
|
227
|
+
colors: {
|
|
228
|
+
...Pe,
|
|
229
|
+
...e?.colors
|
|
230
|
+
},
|
|
231
|
+
radius: e?.radius ?? "var(--radius-token)",
|
|
232
|
+
fonts: {
|
|
233
|
+
body: "var(--font-body)",
|
|
234
|
+
heading: "var(--font-heading)"
|
|
235
|
+
}
|
|
236
|
+
}),
|
|
237
|
+
...e?.gap ? a({ form: { gap: e.gap } }) : {}
|
|
238
|
+
}), [e]);
|
|
239
|
+
//#endregion
|
|
240
|
+
//#region src/hooks/useMounted.ts
|
|
241
|
+
function J() {
|
|
242
|
+
let [e, t] = N(!1);
|
|
243
|
+
return k(() => t(!0), []), e;
|
|
244
|
+
}
|
|
245
|
+
//#endregion
|
|
246
|
+
//#region src/access/useLevoAuth.ts
|
|
247
|
+
var Y = ["levo-auth", "session"], Ie = () => {
|
|
248
|
+
let e = i(), t = L(), n = J(), r = I({
|
|
249
|
+
queryKey: Y,
|
|
250
|
+
queryFn: async () => {
|
|
251
|
+
try {
|
|
252
|
+
return await e?.membership?.getMe() ?? null;
|
|
253
|
+
} catch (t) {
|
|
254
|
+
return e?.logger?.debug?.("Session check returned no account", { exception: b(t) }), null;
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
enabled: n && !!e,
|
|
258
|
+
staleTime: 3e4,
|
|
259
|
+
retry: !1
|
|
260
|
+
}), a = F({
|
|
261
|
+
mutationFn: async () => {
|
|
262
|
+
await e?.membership?.signOut();
|
|
263
|
+
},
|
|
264
|
+
onSettled: () => t.invalidateQueries({ queryKey: Y }),
|
|
265
|
+
onError: (t) => {
|
|
266
|
+
e?.logger?.error("Sign out failed", { exception: b(t) });
|
|
267
|
+
}
|
|
268
|
+
}), o = O(async () => {
|
|
269
|
+
await t.invalidateQueries({ queryKey: Y });
|
|
270
|
+
}, [t]), s = O(async () => {
|
|
271
|
+
await a.mutateAsync().catch(() => void 0);
|
|
272
|
+
}, [a]), c = r.data ?? null;
|
|
273
|
+
return {
|
|
274
|
+
account: c,
|
|
275
|
+
isLoggedIn: !!c,
|
|
276
|
+
isLoaded: n && (!e || r.isSuccess),
|
|
277
|
+
isLoading: r.isFetching,
|
|
278
|
+
refresh: o,
|
|
279
|
+
signOut: s,
|
|
280
|
+
isSigningOut: a.isPending
|
|
281
|
+
};
|
|
282
|
+
}, Le = ({ collection: t, hidden: n, submitLabel: r = "Submit", onSuccess: a, theme: o, className: s }) => {
|
|
283
|
+
let c = i(), { account: l } = Ie(), { schema: u, isLoading: d } = Me({
|
|
284
|
+
module: "collection",
|
|
285
|
+
identifier: t
|
|
286
|
+
}), f = Fe(o);
|
|
287
|
+
return c ? /* @__PURE__ */ S("div", {
|
|
288
|
+
className: s,
|
|
289
|
+
children: /* @__PURE__ */ S(e, {
|
|
290
|
+
fetchedSchema: u,
|
|
291
|
+
isLoading: d,
|
|
292
|
+
submitButtonConfig: {
|
|
293
|
+
show: !0,
|
|
294
|
+
text: r
|
|
295
|
+
},
|
|
296
|
+
uiConfig: {
|
|
297
|
+
hideFormHeading: !0,
|
|
298
|
+
hideSectionHeadings: !0
|
|
230
299
|
},
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
300
|
+
theme: { style: f },
|
|
301
|
+
hiddenFields: n,
|
|
302
|
+
isLoggedIn: !!l,
|
|
303
|
+
account: {
|
|
304
|
+
email: l?.email,
|
|
305
|
+
mobile: l?.mobile
|
|
306
|
+
},
|
|
307
|
+
onSuccess: () => a?.()
|
|
308
|
+
})
|
|
309
|
+
}) : null;
|
|
310
|
+
}, Re = "so_levo_membership_account", ze = [
|
|
311
|
+
"profile_picture",
|
|
312
|
+
"first_name",
|
|
313
|
+
"last_name",
|
|
314
|
+
"email",
|
|
315
|
+
"username",
|
|
316
|
+
"socials"
|
|
317
|
+
], Be = ["email", "username"], Ve = (e) => ze.includes(e.key) || e.editable === !0, He = ({ hidden: e, submitLabel: n = "Save and continue", onSuccess: r, errorClassName: a = "text-sm text-[var(--color-danger)]", theme: o, className: s }) => {
|
|
318
|
+
let c = i(), l = J(), { account: u } = Ie(), d = Fe(o), [f, p] = N(""), m = I({
|
|
319
|
+
queryKey: ["levo-access", "profile-schema"],
|
|
320
|
+
queryFn: async () => (await c?.collection?.getCollectionByIDExpanded(Re))?.content?.data ?? null,
|
|
321
|
+
enabled: l && !!c,
|
|
322
|
+
staleTime: 5 * 6e4,
|
|
323
|
+
retry: 1
|
|
324
|
+
}), h = e?.join("|") ?? "", g = j(() => {
|
|
325
|
+
let t = m.data;
|
|
326
|
+
return t ? {
|
|
327
|
+
...t,
|
|
328
|
+
sections: t.sections?.map((t) => ({
|
|
329
|
+
...t,
|
|
330
|
+
fields: t.fields?.map((t) => ({
|
|
331
|
+
...t,
|
|
332
|
+
hidden: !Ve(t) || !!e?.includes(t.key),
|
|
333
|
+
readonly: t.readonly || Be.includes(t.key)
|
|
334
|
+
}))
|
|
335
|
+
}))
|
|
336
|
+
} : null;
|
|
337
|
+
}, [m.data, h]), _ = F({
|
|
338
|
+
mutationFn: async (t) => {
|
|
339
|
+
let n = g?.sections?.flatMap((e) => e?.fields ?? [])?.filter((t) => Ve(t) && !Be.includes(t.key) && !e?.includes(t.key))?.map((e) => e?.key) ?? [];
|
|
340
|
+
await c?.membership?.updateMe(Object.fromEntries(Object.entries(t).filter(([e]) => n.includes(e))));
|
|
341
|
+
},
|
|
342
|
+
onMutate: () => p(""),
|
|
343
|
+
onSuccess: () => r?.(),
|
|
344
|
+
onError: (e) => {
|
|
345
|
+
let t = b(e);
|
|
346
|
+
c?.logger?.error("Failed to update profile", { exception: t }), p(t?.message || "Something went wrong. Please try again.");
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
return c ? /* @__PURE__ */ C("div", {
|
|
350
|
+
className: s,
|
|
351
|
+
children: [f ? /* @__PURE__ */ S("p", {
|
|
352
|
+
className: a,
|
|
353
|
+
children: f
|
|
354
|
+
}) : null, g ? /* @__PURE__ */ S(t, {
|
|
355
|
+
schema: g,
|
|
356
|
+
initialValues: u ?? {},
|
|
357
|
+
uiConfig: {
|
|
358
|
+
hideFormHeading: !0,
|
|
359
|
+
hideSectionHeadings: !0
|
|
360
|
+
},
|
|
361
|
+
submitButtonConfig: {
|
|
362
|
+
show: !0,
|
|
363
|
+
text: n
|
|
364
|
+
},
|
|
365
|
+
theme: { style: d },
|
|
366
|
+
isLoading: _.isPending,
|
|
367
|
+
onSubmit: (e) => _.mutate(e)
|
|
368
|
+
}) : null]
|
|
369
|
+
}) : null;
|
|
370
|
+
}, Ue = (e) => {
|
|
371
|
+
let t = i(), n = L(), r = J(), { isLoggedIn: a, isLoaded: o } = Ie(), s = e.id?.trim() || "", { rules: c, invalid: l } = j(() => ge(e.access), [e.access]), u = j(() => _e(c), [c]), d = r && !!t && c.length > 0 && !l && !!s && a, f = I({
|
|
372
|
+
queryKey: ["levo-access", s],
|
|
373
|
+
queryFn: async () => (await t?.fetch.url(`/v1/builder/page/${s}/check-access`).post().json())?.content?.data ?? null,
|
|
374
|
+
enabled: d,
|
|
375
|
+
staleTime: 0,
|
|
376
|
+
retry: 1
|
|
377
|
+
});
|
|
378
|
+
k(() => {
|
|
379
|
+
f.isError && t?.logger?.error("Page access check failed", { exception: b(f.error) });
|
|
380
|
+
}, [
|
|
381
|
+
f.isError,
|
|
382
|
+
f.error,
|
|
383
|
+
t
|
|
384
|
+
]);
|
|
385
|
+
let p = O(() => {
|
|
386
|
+
n.invalidateQueries({ queryKey: Y }), n.invalidateQueries({ queryKey: ["levo-access", s] });
|
|
387
|
+
}, [n, s]);
|
|
388
|
+
return {
|
|
389
|
+
...xe({
|
|
390
|
+
rules: c,
|
|
391
|
+
invalid: l,
|
|
392
|
+
pageId: s,
|
|
393
|
+
hasClient: !!t,
|
|
394
|
+
isReady: r && o,
|
|
395
|
+
isLoggedIn: a,
|
|
396
|
+
check: {
|
|
397
|
+
isError: f.isError,
|
|
398
|
+
isSuccess: f.isSuccess,
|
|
399
|
+
data: f.data ?? null
|
|
235
400
|
}
|
|
236
401
|
}),
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
402
|
+
authMethods: u,
|
|
403
|
+
recheck: p,
|
|
404
|
+
isChecking: f.isFetching
|
|
405
|
+
};
|
|
406
|
+
}, We = "membership.account.ACCOUNT_PENDING_APPROVAL", Ge = (e) => e ? e === "membership.account.ACCOUNT_PENDING_APPROVAL" || e.includes("ACCOUNT_PENDING_APPROVAL") : !1, Ke = (e) => {
|
|
407
|
+
let t = b(e);
|
|
408
|
+
return {
|
|
409
|
+
code: t?.code || "SOMETHING_WENT_WRONG",
|
|
410
|
+
title: t?.title || "Something went wrong",
|
|
411
|
+
message: t?.message || "Something went wrong. Please try again.",
|
|
412
|
+
fieldErrors: Object.fromEntries((t?.fieldErrors ?? []).map((e) => [e.param, e.message])),
|
|
413
|
+
isPendingApproval: Ge(t?.code)
|
|
414
|
+
};
|
|
415
|
+
}, qe = {
|
|
416
|
+
code: "site.NOT_CONNECTED",
|
|
417
|
+
title: "Sign-in unavailable",
|
|
418
|
+
message: "This site is not connected to an account system yet.",
|
|
419
|
+
fieldErrors: {},
|
|
420
|
+
isPendingApproval: !1
|
|
421
|
+
}, Je = () => {
|
|
422
|
+
let e = i(), t = L(), n = O(async (t, n) => {
|
|
423
|
+
if (!e?.membership) return {
|
|
424
|
+
ok: !1,
|
|
425
|
+
error: qe
|
|
426
|
+
};
|
|
427
|
+
try {
|
|
428
|
+
return {
|
|
429
|
+
ok: !0,
|
|
430
|
+
data: await n()
|
|
431
|
+
};
|
|
432
|
+
} catch (n) {
|
|
433
|
+
let r = b(n);
|
|
434
|
+
return e.logger?.error(t, { exception: r }), {
|
|
435
|
+
ok: !1,
|
|
436
|
+
error: Ke(r)
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
}, [e]), r = O(async ({ identifier: t, medium: n }) => {
|
|
440
|
+
await e?.membership?.requestOtp({
|
|
441
|
+
content: t,
|
|
442
|
+
...n === "whatsapp" ? { medium: "whatsapp" } : {}
|
|
443
|
+
});
|
|
444
|
+
}, [e]), a = F({ mutationFn: (e) => n("Failed to send verification code", () => r(e)) }), o = F({ mutationFn: (e) => n("Failed to resend verification code", () => r(e)) }), s = F({ mutationFn: ({ identifier: r, code: i }) => n("Verification failed", async () => {
|
|
445
|
+
let n = await e?.membership?.signInWithOtp({
|
|
446
|
+
content: r,
|
|
447
|
+
code: i
|
|
448
|
+
}) ?? null;
|
|
449
|
+
return t.setQueryData(Y, n), t.invalidateQueries({ queryKey: Y }), n;
|
|
450
|
+
}) }), c = F({ mutationFn: (t) => n("Failed to send magic link", async () => {
|
|
451
|
+
await e?.membership?.requestMagicLink({ content: t });
|
|
452
|
+
}) });
|
|
453
|
+
return {
|
|
454
|
+
sendCode: (e) => a.mutateAsync(e),
|
|
455
|
+
resendCode: (e) => o.mutateAsync(e),
|
|
456
|
+
verifyCode: (e) => s.mutateAsync(e),
|
|
457
|
+
sendMagicLink: (e) => c.mutateAsync(e),
|
|
458
|
+
isSendingCode: a.isPending,
|
|
459
|
+
isResendingCode: o.isPending,
|
|
460
|
+
isVerifying: s.isPending,
|
|
461
|
+
isSendingMagicLink: c.isPending
|
|
462
|
+
};
|
|
463
|
+
}, Ye = 700, Xe = 500, Ze = 700, Qe = (e, t) => {
|
|
464
|
+
let n = window.screenX + (window.outerWidth - Xe) / 2, r = window.screenY + (window.outerHeight - Ze) / 2.5;
|
|
465
|
+
return window.open(e, t, `width=${Xe},height=${Ze},left=${n},top=${r}`);
|
|
466
|
+
}, $e = ({ methods: e, title: t = "Sign in", onSuccess: n, onError: r }) => {
|
|
467
|
+
let a = i(), o = L(), s = J(), [c, l] = N(null), [u, d] = N(null), f = M(null), p = M(void 0), m = M({
|
|
468
|
+
onSuccess: n,
|
|
469
|
+
onError: r
|
|
470
|
+
});
|
|
471
|
+
m.current = {
|
|
472
|
+
onSuccess: n,
|
|
473
|
+
onError: r
|
|
474
|
+
};
|
|
475
|
+
let h = I({
|
|
476
|
+
queryKey: ["levo-auth", "oauth-urls"],
|
|
477
|
+
queryFn: async () => await a?.membership?.getOAuthURL() ?? null,
|
|
478
|
+
enabled: s && !!a && e.length > 0,
|
|
479
|
+
staleTime: 5 * 6e4,
|
|
480
|
+
retry: !1
|
|
481
|
+
});
|
|
482
|
+
k(() => {
|
|
483
|
+
if (!h.error) return;
|
|
484
|
+
let e = b(h.error);
|
|
485
|
+
a?.logger?.error("Failed to load OAuth URLs", { exception: e }), d({
|
|
486
|
+
code: e?.code || "SOMETHING_WENT_WRONG",
|
|
487
|
+
title: e?.title || "Sign-in unavailable",
|
|
488
|
+
message: e?.message || "We could not connect to the sign-in service.",
|
|
489
|
+
fieldErrors: {},
|
|
490
|
+
isPendingApproval: !1
|
|
491
|
+
});
|
|
492
|
+
}, [h.error, a]);
|
|
493
|
+
let g = O(() => {
|
|
494
|
+
window.clearInterval(p.current), p.current = void 0, f.current?.close(), f.current = null, l(null);
|
|
495
|
+
}, []);
|
|
496
|
+
k(() => () => {
|
|
497
|
+
window.clearInterval(p.current), f.current?.close();
|
|
498
|
+
}, []);
|
|
499
|
+
let _ = O(() => {
|
|
500
|
+
window.clearInterval(p.current), p.current = window.setInterval(() => {
|
|
501
|
+
let e = f.current;
|
|
502
|
+
if (!e || e.closed) {
|
|
503
|
+
g();
|
|
504
|
+
return;
|
|
505
|
+
}
|
|
506
|
+
let t;
|
|
507
|
+
try {
|
|
508
|
+
t = new URL(e.location.href).searchParams;
|
|
509
|
+
} catch {
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
512
|
+
let n = t.get("code");
|
|
513
|
+
if (!n) return;
|
|
514
|
+
if (g(), n.toLowerCase() === "success") {
|
|
515
|
+
d(null), o.invalidateQueries({ queryKey: Y }), m.current.onSuccess?.();
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
let r = {
|
|
519
|
+
code: t.get("code") || "SOMETHING_WENT_WRONG",
|
|
520
|
+
title: t.get("title") || "Sign-in failed",
|
|
521
|
+
message: t.get("message") || "We could not sign you in. Please try again.",
|
|
522
|
+
fieldErrors: {},
|
|
523
|
+
isPendingApproval: Ge(t.get("code"))
|
|
524
|
+
};
|
|
525
|
+
r.isPendingApproval || d(r), m.current.onError?.(r);
|
|
526
|
+
}, Ye);
|
|
527
|
+
}, [o, g]), v = j(() => {
|
|
528
|
+
let e = h.data;
|
|
529
|
+
if (!e || typeof window > "u") return {};
|
|
530
|
+
let t = window.location.href, n = a?.pageContext;
|
|
531
|
+
return Object.fromEntries(Object.entries(e).flatMap(([e, r]) => {
|
|
532
|
+
if (typeof r != "string" || !r) return [];
|
|
533
|
+
try {
|
|
534
|
+
let i = new URL(r);
|
|
535
|
+
return i.searchParams.set("redirect_uri", t), n && i.searchParams.set("page_context", JSON.stringify(n)), [[e, i.toString()]];
|
|
536
|
+
} catch {
|
|
537
|
+
return [];
|
|
538
|
+
}
|
|
539
|
+
}));
|
|
540
|
+
}, [h.data, a]);
|
|
541
|
+
return {
|
|
542
|
+
providers: j(() => e.filter((e) => !!v[e]).map((e) => ({
|
|
543
|
+
provider: e,
|
|
544
|
+
signIn: () => {
|
|
545
|
+
let n = v[e];
|
|
546
|
+
if (n) {
|
|
547
|
+
if (d(null), f.current?.close(), f.current = Qe(n, t), !f.current) {
|
|
548
|
+
d({
|
|
549
|
+
code: "POPUP_BLOCKED",
|
|
550
|
+
title: "Popup blocked",
|
|
551
|
+
message: "Allow popups for this site, then try again.",
|
|
552
|
+
fieldErrors: {},
|
|
553
|
+
isPendingApproval: !1
|
|
554
|
+
});
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
l(e), _();
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
})), [
|
|
561
|
+
e,
|
|
562
|
+
v,
|
|
563
|
+
t,
|
|
564
|
+
_
|
|
565
|
+
]),
|
|
566
|
+
isLoading: h.isFetching,
|
|
567
|
+
pendingProvider: c,
|
|
568
|
+
error: u,
|
|
569
|
+
clearError: O(() => d(null), [])
|
|
570
|
+
};
|
|
571
|
+
}, et = 4, tt = (e) => /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(e.trim()), nt = (e) => RegExp("^\\d{4}$").test(e.trim()), rt = (e) => {
|
|
572
|
+
let t = e.replace(/\D/g, "").replace(/^0+/, "");
|
|
573
|
+
return t ? `+${t}` : "";
|
|
574
|
+
}, it = (e) => /^\+[1-9]\d{7,14}$/.test(rt(e)), at = ({ value: e, onChange: t, length: n = 4, onComplete: r, autoFocus: i, disabled: a }) => {
|
|
575
|
+
let o = M([]), [s, c] = N(null), l = M(r);
|
|
576
|
+
l.current = r;
|
|
577
|
+
let u = Array.from({ length: n }, (t, n) => e[n] ?? ""), d = O((e) => {
|
|
578
|
+
let t = Math.max(0, Math.min(n - 1, e)), r = o.current[t];
|
|
579
|
+
r?.focus(), r?.select();
|
|
580
|
+
}, [n]);
|
|
581
|
+
k(() => {
|
|
582
|
+
i && !a && d(0);
|
|
583
|
+
}, [
|
|
584
|
+
i,
|
|
585
|
+
a,
|
|
586
|
+
d
|
|
587
|
+
]);
|
|
588
|
+
let f = O((e, r) => {
|
|
589
|
+
let i = e.slice(0, n);
|
|
590
|
+
t(i), d(r), i.length === n && l.current?.(i);
|
|
591
|
+
}, [
|
|
592
|
+
n,
|
|
593
|
+
t,
|
|
594
|
+
d
|
|
595
|
+
]), p = (t, r) => {
|
|
596
|
+
let i = r.replace(/\D/g, "");
|
|
597
|
+
if (!i) return;
|
|
598
|
+
if (i.length > 1) {
|
|
599
|
+
let r = (e.slice(0, t) + i).slice(0, n);
|
|
600
|
+
f(r, r.length);
|
|
601
|
+
return;
|
|
602
|
+
}
|
|
603
|
+
let a = [...u];
|
|
604
|
+
a[t] = i, f(a.join("").slice(0, Math.max(t + 1, e.length)), t + 1);
|
|
605
|
+
}, m = (t, n) => {
|
|
606
|
+
if (n.key === "Backspace") {
|
|
607
|
+
n.preventDefault();
|
|
608
|
+
let r = u[t] ? t : t - 1;
|
|
609
|
+
if (r < 0) return;
|
|
610
|
+
f(e.slice(0, r), r);
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
if (n.key === "ArrowLeft") {
|
|
614
|
+
n.preventDefault(), d(t - 1);
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
n.key === "ArrowRight" && (n.preventDefault(), d(Math.min(t + 1, e.length)));
|
|
618
|
+
}, h = (e) => {
|
|
619
|
+
e.preventDefault();
|
|
620
|
+
let t = e.clipboardData.getData("text").replace(/\D/g, "");
|
|
621
|
+
if (!t) return;
|
|
622
|
+
let r = t.slice(0, n);
|
|
623
|
+
f(r, r.length);
|
|
624
|
+
};
|
|
625
|
+
return {
|
|
626
|
+
slots: u.map((t, r) => ({
|
|
627
|
+
char: t,
|
|
628
|
+
isActive: s === r,
|
|
629
|
+
inputProps: {
|
|
630
|
+
ref: (e) => {
|
|
631
|
+
o.current[r] = e;
|
|
632
|
+
},
|
|
633
|
+
value: t,
|
|
634
|
+
inputMode: "numeric",
|
|
635
|
+
autoComplete: r === 0 ? "one-time-code" : "off",
|
|
636
|
+
type: "text",
|
|
637
|
+
"aria-label": `Digit ${r + 1} of ${n}`,
|
|
638
|
+
onChange: (e) => p(r, e.target.value),
|
|
639
|
+
onKeyDown: (e) => m(r, e),
|
|
640
|
+
onPaste: h,
|
|
641
|
+
onFocus: () => {
|
|
642
|
+
if (r > e.length) {
|
|
643
|
+
d(e.length);
|
|
644
|
+
return;
|
|
645
|
+
}
|
|
646
|
+
c(r);
|
|
647
|
+
},
|
|
648
|
+
onBlur: () => c((e) => e === r ? null : e),
|
|
649
|
+
disabled: a
|
|
650
|
+
}
|
|
651
|
+
})),
|
|
652
|
+
containerProps: {
|
|
653
|
+
role: "group",
|
|
654
|
+
"aria-label": `${n}-digit verification code`
|
|
655
|
+
},
|
|
656
|
+
clear: O(() => f("", 0), [f])
|
|
657
|
+
};
|
|
658
|
+
}, ot = D(() => import("./kbChat-L55effMi.js")), st = ({ site: e, path: t }) => {
|
|
659
|
+
let n = J(), r = e.workspace_id || void 0;
|
|
660
|
+
return !n || !r ? null : /* @__PURE__ */ S(T, {
|
|
661
|
+
fallback: null,
|
|
662
|
+
children: /* @__PURE__ */ S(ot, {
|
|
663
|
+
workspaceId: r,
|
|
664
|
+
siteName: e.name || void 0,
|
|
665
|
+
siteLogo: void 0,
|
|
666
|
+
siteIcon: e.icon?.location,
|
|
667
|
+
siteSlug: e.slug || void 0,
|
|
668
|
+
showBranding: !!e.feature_flag?.branding,
|
|
669
|
+
path: t
|
|
670
|
+
})
|
|
671
|
+
});
|
|
672
|
+
}, ct = "(prefers-color-scheme: dark)", lt = (e) => {
|
|
673
|
+
try {
|
|
674
|
+
let t = localStorage.getItem(e);
|
|
675
|
+
return t === "light" || t === "dark" || t === "system" ? t : null;
|
|
676
|
+
} catch {
|
|
677
|
+
return null;
|
|
678
|
+
}
|
|
679
|
+
}, ut = (e, t) => {
|
|
680
|
+
try {
|
|
681
|
+
localStorage.setItem(e, t);
|
|
682
|
+
} catch {}
|
|
683
|
+
};
|
|
684
|
+
function dt(e, t) {
|
|
685
|
+
return `(function(){try{var t=localStorage.getItem(${JSON.stringify(e)});if(t!=='light'&&t!=='dark'&&t!=='system'){t=${JSON.stringify(t)}}var d=matchMedia('${ct}').matches;var r=t==='system'?(d?'dark':'light'):t;var e=document.documentElement;e.classList.remove('light','dark');e.classList.add(r);e.style.colorScheme=r}catch(e){}})();`;
|
|
686
|
+
}
|
|
687
|
+
var ft = E(void 0), pt = (e) => e === "system" ? window.matchMedia(ct).matches ? "dark" : "light" : e;
|
|
688
|
+
function mt(e) {
|
|
689
|
+
let t = document.documentElement;
|
|
690
|
+
t.classList.remove("light", "dark"), t.classList.add(e), t.style.colorScheme = e;
|
|
691
|
+
}
|
|
692
|
+
var ht = ({ children: e, defaultMode: t = "system", storageKey: n = "color-mode" }) => {
|
|
693
|
+
let [r, i] = N(t), [a, o] = N(t === "dark" ? "dark" : "light"), s = J();
|
|
694
|
+
return k(() => {
|
|
695
|
+
i(lt(n) ?? t);
|
|
696
|
+
}, [t, n]), k(() => {
|
|
697
|
+
if (!s) return;
|
|
698
|
+
let e = pt(r);
|
|
699
|
+
mt(e), o(e);
|
|
700
|
+
}, [r, s]), k(() => {
|
|
701
|
+
if (!s || r !== "system") return;
|
|
702
|
+
let e = window.matchMedia(ct), t = () => {
|
|
703
|
+
let t = e.matches ? "dark" : "light";
|
|
704
|
+
mt(t), o(t);
|
|
705
|
+
};
|
|
706
|
+
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
707
|
+
}, [r, s]), /* @__PURE__ */ C(ft.Provider, {
|
|
708
|
+
value: {
|
|
709
|
+
mode: r,
|
|
710
|
+
resolvedMode: a,
|
|
711
|
+
setMode: (e) => {
|
|
712
|
+
ut(n, e), i(e);
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
children: [/* @__PURE__ */ S(te, { children: dt(n, t) }), e]
|
|
716
|
+
});
|
|
717
|
+
};
|
|
718
|
+
function gt() {
|
|
719
|
+
let e = ee(ft);
|
|
720
|
+
if (e === void 0) throw Error("useColorMode must be used within a ColorModeProvider");
|
|
721
|
+
return e;
|
|
722
|
+
}
|
|
723
|
+
//#endregion
|
|
724
|
+
//#region src/form/LevoForm.tsx
|
|
725
|
+
var _t = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant: a = "default", successConfig: o, theme: s, className: c }) => {
|
|
726
|
+
let l = i(), { schema: u, isLoading: d, bind: f } = Me(t), p = Fe(s);
|
|
727
|
+
return l ? /* @__PURE__ */ S("div", {
|
|
728
|
+
...f,
|
|
729
|
+
className: c,
|
|
730
|
+
children: /* @__PURE__ */ S(e, {
|
|
731
|
+
fetchedSchema: u,
|
|
732
|
+
isLoading: d,
|
|
245
733
|
submitButtonConfig: {
|
|
246
734
|
show: !0,
|
|
247
|
-
text:
|
|
735
|
+
text: n
|
|
248
736
|
},
|
|
249
737
|
uiConfig: {
|
|
250
738
|
hideFormHeading: !0,
|
|
251
739
|
hideSectionHeadings: !0
|
|
252
740
|
},
|
|
253
|
-
theme: { style:
|
|
254
|
-
hiddenFields:
|
|
255
|
-
formVariant:
|
|
256
|
-
successConfig:
|
|
741
|
+
theme: { style: p },
|
|
742
|
+
hiddenFields: r,
|
|
743
|
+
formVariant: a,
|
|
744
|
+
successConfig: o
|
|
257
745
|
})
|
|
258
746
|
}) : null;
|
|
259
|
-
},
|
|
747
|
+
}, vt = 1400, yt = 12 * 1024 * 1024, bt = new Set(["transparent", "rgba(0, 0, 0, 0)"]), xt = {
|
|
260
748
|
imagePlaceholder: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",
|
|
261
749
|
onImageErrorHandler: () => void 0
|
|
262
|
-
},
|
|
750
|
+
}, St = (e) => {
|
|
263
751
|
let t = getComputedStyle(e);
|
|
264
|
-
return !
|
|
265
|
-
},
|
|
752
|
+
return !bt.has(t.backgroundColor) || t.backgroundImage !== "none";
|
|
753
|
+
}, Ct = (e) => {
|
|
266
754
|
for (let t = e; t; t = t.parentElement) {
|
|
267
755
|
let e = getComputedStyle(t).backgroundColor;
|
|
268
|
-
if (!
|
|
756
|
+
if (!bt.has(e)) return e;
|
|
269
757
|
}
|
|
270
758
|
return "#ffffff";
|
|
271
|
-
},
|
|
272
|
-
let { toPng: n } = await import("./es-
|
|
273
|
-
...
|
|
759
|
+
}, wt = async (e, t) => {
|
|
760
|
+
let { toPng: n } = await import("./es-Bj3CsMJz.js"), r = e.getBoundingClientRect(), i = Math.max(r.width, r.height, 1), a = Math.min(2, Math.max(.4, vt / i)), o = await n(e, {
|
|
761
|
+
...xt,
|
|
274
762
|
pixelRatio: a,
|
|
275
|
-
backgroundColor:
|
|
763
|
+
backgroundColor: Ct(e),
|
|
276
764
|
filter: (e) => !t.includes(e)
|
|
277
765
|
});
|
|
278
|
-
if (o.length >
|
|
766
|
+
if (o.length > yt) throw Error("capture too large");
|
|
279
767
|
return o;
|
|
280
|
-
},
|
|
768
|
+
}, Tt = 4, Et = 4e3, Dt = (e, t) => {
|
|
281
769
|
let n = document.elementFromPoint(e.x + e.width / 2, e.y + e.height / 2);
|
|
282
770
|
for (; n && t.includes(n);) n = n.parentElement;
|
|
283
771
|
let r = document.body;
|
|
@@ -288,8 +776,8 @@ var H = (e) => [
|
|
|
288
776
|
break;
|
|
289
777
|
}
|
|
290
778
|
}
|
|
291
|
-
let i = window.innerWidth * window.innerHeight *
|
|
292
|
-
for (; !
|
|
779
|
+
let i = window.innerWidth * window.innerHeight * Tt || 2 ** 53 - 1, a = r;
|
|
780
|
+
for (; !St(a);) {
|
|
293
781
|
let e = a.parentElement;
|
|
294
782
|
if (!e || e === document.documentElement) break;
|
|
295
783
|
let t = e.getBoundingClientRect();
|
|
@@ -297,13 +785,13 @@ var H = (e) => [
|
|
|
297
785
|
a = e;
|
|
298
786
|
}
|
|
299
787
|
return a;
|
|
300
|
-
},
|
|
301
|
-
let { toCanvas: n } = await import("./es-
|
|
302
|
-
o = Math.min(o,
|
|
788
|
+
}, Ot = async (e, t) => {
|
|
789
|
+
let { toCanvas: n } = await import("./es-Bj3CsMJz.js"), r = Dt(e, t), i = r.getBoundingClientRect(), a = Math.max(e.width, e.height, 1), o = Math.min(2, Math.max(.4, vt / a)), s = Math.max(i.width, i.height, 1);
|
|
790
|
+
o = Math.min(o, Et / s);
|
|
303
791
|
let c = await n(r, {
|
|
304
|
-
...
|
|
792
|
+
...xt,
|
|
305
793
|
pixelRatio: o,
|
|
306
|
-
backgroundColor:
|
|
794
|
+
backgroundColor: Ct(r),
|
|
307
795
|
filter: (e) => !t.includes(e)
|
|
308
796
|
}), l = document.createElement("canvas");
|
|
309
797
|
l.width = Math.max(1, Math.round(e.width * o)), l.height = Math.max(1, Math.round(e.height * o));
|
|
@@ -311,39 +799,39 @@ var H = (e) => [
|
|
|
311
799
|
if (!u) throw Error("no 2d context");
|
|
312
800
|
u.drawImage(c, (e.x - i.left) * o, (e.y - i.top) * o, e.width * o, e.height * o, 0, 0, l.width, l.height);
|
|
313
801
|
let d = l.toDataURL("image/png");
|
|
314
|
-
if (d.length >
|
|
802
|
+
if (d.length > yt) throw Error("capture too large");
|
|
315
803
|
return d;
|
|
316
|
-
},
|
|
804
|
+
}, kt = {
|
|
317
805
|
ring: 99997,
|
|
318
806
|
overlay: 99998,
|
|
319
807
|
label: 99999
|
|
320
|
-
},
|
|
808
|
+
}, X = {
|
|
321
809
|
hover: "#3b82f6",
|
|
322
810
|
hoverBg: "rgba(59,130,246,0.12)",
|
|
323
811
|
hoverLabelBg: "#1d4ed8",
|
|
324
812
|
select: "#16a34a",
|
|
325
813
|
selectGlow: "rgba(22,163,74,0.18)"
|
|
326
|
-
},
|
|
814
|
+
}, Z = (e) => {
|
|
327
815
|
let t = e?.getAttribute("data-tsd-source");
|
|
328
816
|
return t ? t.replace(/^\//, "") : null;
|
|
329
|
-
},
|
|
330
|
-
let n =
|
|
817
|
+
}, At = (e) => Array.from(document.querySelectorAll("[data-tsd-source]")).filter((t) => Z(t) === e), jt = (e, t) => {
|
|
818
|
+
let n = At(t).indexOf(e);
|
|
331
819
|
return n < 0 ? 0 : n;
|
|
332
|
-
},
|
|
333
|
-
let n =
|
|
820
|
+
}, Mt = (e, t = 0) => {
|
|
821
|
+
let n = At(e);
|
|
334
822
|
return n[t] ?? n[0] ?? null;
|
|
335
|
-
},
|
|
823
|
+
}, Nt = (e, t) => {
|
|
336
824
|
let n = (e.getAttribute("data-staged-key") || "").split(/\s+/).filter(Boolean);
|
|
337
825
|
n.includes(t) || e.setAttribute("data-staged-key", [...n, t].join(" "));
|
|
338
|
-
},
|
|
826
|
+
}, Pt = (e, t) => {
|
|
339
827
|
let n = (e.getAttribute("data-staged-key") || "").split(/\s+/).filter((e) => e && e !== t);
|
|
340
828
|
n.length ? e.setAttribute("data-staged-key", n.join(" ")) : e.removeAttribute("data-staged-key");
|
|
341
|
-
},
|
|
829
|
+
}, Ft = (e, t) => {
|
|
342
830
|
let n = Object.entries(t.styles).filter(([e]) => /^-?[a-zA-Z][a-zA-Z0-9-]*$/.test(e)).map(([e, t]) => `${e}:${String(t).replace(/[;{}]/g, "")} !important;`).join("");
|
|
343
831
|
if (!n) return "";
|
|
344
832
|
let r = `[data-staged-key~="${CSS.escape(e)}"]{${n}}`, i = t.media?.replace(/[;{}]/g, "").trim();
|
|
345
833
|
return i ? `@media ${i}{${r}}` : r;
|
|
346
|
-
},
|
|
834
|
+
}, It = (e) => {
|
|
347
835
|
let t = e.tagName.toLowerCase();
|
|
348
836
|
return t === "input" ? {
|
|
349
837
|
checkbox: "Checkbox",
|
|
@@ -385,31 +873,31 @@ var H = (e) => [
|
|
|
385
873
|
aside: "Sidebar",
|
|
386
874
|
div: "Container"
|
|
387
875
|
}[t] || `${t.charAt(0).toUpperCase()}${t.slice(1)}`;
|
|
388
|
-
},
|
|
389
|
-
let t =
|
|
390
|
-
return n ? `${t} · ${n.length >
|
|
391
|
-
},
|
|
876
|
+
}, Lt = 36, Rt = (e) => {
|
|
877
|
+
let t = It(e), n = ((e) => e.replace(/\s+/g, " ").trim())(e.getAttribute("aria-label") || e.getAttribute("alt") || e.getAttribute("title") || e.getAttribute("name") || "");
|
|
878
|
+
return n ? `${t} · ${n.length > Lt ? `${n.slice(0, Lt - 1).trimEnd()}…` : n}` : t;
|
|
879
|
+
}, zt = (e) => {
|
|
392
880
|
let t = [], n = e;
|
|
393
881
|
for (; n && n.nodeType === 1 && n !== document.body && t.length < 8;) t.unshift(n.tagName.toLowerCase()), n = n.parentElement;
|
|
394
882
|
return t.join(" > ");
|
|
395
|
-
},
|
|
883
|
+
}, Bt = () => {
|
|
396
884
|
let e = document.createElement("div");
|
|
397
|
-
e.style.cssText = `position:fixed;pointer-events:none;z-index:${
|
|
885
|
+
e.style.cssText = `position:fixed;pointer-events:none;z-index:${kt.overlay};background:${X.hoverBg};outline:2px solid ${X.hover};border-radius:2px;display:none`;
|
|
398
886
|
let t = document.createElement("div");
|
|
399
|
-
t.style.cssText = `position:fixed;pointer-events:none;z-index:${
|
|
887
|
+
t.style.cssText = `position:fixed;pointer-events:none;z-index:${kt.label};background:${X.hoverLabelBg};color:#fff;font:11px/1.6 ui-monospace,monospace;padding:1px 6px;border-radius:4px;display:none;max-width:70vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis`;
|
|
400
888
|
let n = document.createElement("div");
|
|
401
|
-
n.style.cssText = `position:fixed;pointer-events:none;z-index:${
|
|
889
|
+
n.style.cssText = `position:fixed;pointer-events:none;z-index:${kt.ring};outline:2px solid ${X.select};outline-offset:1px;border-radius:3px;box-shadow:0 0 0 4px ${X.selectGlow};display:none`;
|
|
402
890
|
let r = document.createElement("div");
|
|
403
|
-
return r.style.cssText = `position:fixed;pointer-events:none;z-index:${
|
|
891
|
+
return r.style.cssText = `position:fixed;pointer-events:none;z-index:${kt.label};background:${X.select};color:#fff;font:11px/1.6 ui-monospace,monospace;padding:1px 6px;border-radius:4px;display:none;max-width:70vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis`, {
|
|
404
892
|
overlay: e,
|
|
405
893
|
label: t,
|
|
406
894
|
ring: n,
|
|
407
895
|
ringLabel: r
|
|
408
896
|
};
|
|
409
|
-
},
|
|
897
|
+
}, Vt = (e, t, n) => {
|
|
410
898
|
let r = n.getBoundingClientRect();
|
|
411
|
-
e.style.display = "block", e.style.left = `${r.left}px`, e.style.top = `${r.top}px`, e.style.width = `${r.width}px`, e.style.height = `${r.height}px`, t.style.display = "block", t.textContent =
|
|
412
|
-
},
|
|
899
|
+
e.style.display = "block", e.style.left = `${r.left}px`, e.style.top = `${r.top}px`, e.style.width = `${r.width}px`, e.style.height = `${r.height}px`, t.style.display = "block", t.textContent = Rt(n), t.style.left = `${Math.max(4, r.left)}px`, t.style.top = `${r.top > 26 ? r.top - 22 : r.bottom + 4}px`;
|
|
900
|
+
}, Ht = (e) => {
|
|
413
901
|
let t = (e instanceof Element ? e : null)?.closest("a[href]");
|
|
414
902
|
if (!t || t.target === "_blank") return null;
|
|
415
903
|
let n;
|
|
@@ -419,11 +907,11 @@ var H = (e) => [
|
|
|
419
907
|
return null;
|
|
420
908
|
}
|
|
421
909
|
return n.protocol !== "http:" && n.protocol !== "https:" || n.origin === location.origin ? null : n.href;
|
|
422
|
-
},
|
|
910
|
+
}, Ut = (e) => {
|
|
423
911
|
if (!e) return !1;
|
|
424
912
|
let t = e.tagName;
|
|
425
913
|
return t === "INPUT" || t === "TEXTAREA" || t === "SELECT" || e.isContentEditable === !0;
|
|
426
|
-
},
|
|
914
|
+
}, Wt = (e) => {
|
|
427
915
|
if (!e.childNodes.length) return !1;
|
|
428
916
|
let t = !1;
|
|
429
917
|
for (let n of e.childNodes) {
|
|
@@ -431,10 +919,10 @@ var H = (e) => [
|
|
|
431
919
|
(n.textContent ?? "").trim() && (t = !0);
|
|
432
920
|
}
|
|
433
921
|
return t;
|
|
434
|
-
},
|
|
922
|
+
}, Gt = 2e3, Kt = (e) => {
|
|
435
923
|
let t = [], n = e;
|
|
436
924
|
for (; n && n.nodeType === 1 && n !== document.body && t.length < 8;) {
|
|
437
|
-
let e =
|
|
925
|
+
let e = Z(n);
|
|
438
926
|
e && t.unshift({
|
|
439
927
|
tag: n.tagName.toLowerCase(),
|
|
440
928
|
text: (n.textContent || "").trim().slice(0, 60),
|
|
@@ -442,25 +930,25 @@ var H = (e) => [
|
|
|
442
930
|
}), n = n.parentElement;
|
|
443
931
|
}
|
|
444
932
|
return t;
|
|
445
|
-
},
|
|
446
|
-
let t =
|
|
933
|
+
}, qt = (e) => {
|
|
934
|
+
let t = Z(e), n = t ? At(t).length : 1, r = t ? jt(e, t) : 0, i = t && Wt(e) ? (e.textContent ?? "").replace(/\s+/g, " ").trim().slice(0, Gt) : void 0, a = Jt(e);
|
|
447
935
|
return {
|
|
448
936
|
tag: e.tagName.toLowerCase(),
|
|
449
937
|
classes: typeof e.className == "string" ? e.className.trim() : "",
|
|
450
938
|
text: (e.innerText || "").trim().slice(0, 120),
|
|
451
|
-
label:
|
|
452
|
-
path:
|
|
939
|
+
label: Rt(e),
|
|
940
|
+
path: zt(e),
|
|
453
941
|
source: t,
|
|
454
942
|
index: r,
|
|
455
943
|
occurrences: n,
|
|
456
|
-
ancestors:
|
|
944
|
+
ancestors: Kt(e),
|
|
457
945
|
...i === void 0 ? {} : { fullText: i },
|
|
458
946
|
...a ? { sourceBinding: a } : {}
|
|
459
947
|
};
|
|
460
|
-
},
|
|
948
|
+
}, Jt = (e) => {
|
|
461
949
|
let t = e.closest("[data-levo-source]");
|
|
462
950
|
if (!t) return;
|
|
463
|
-
let n = t.getAttribute("data-levo-source") ?? "", r =
|
|
951
|
+
let n = t.getAttribute("data-levo-source") ?? "", r = Z(t), i;
|
|
464
952
|
try {
|
|
465
953
|
i = JSON.parse(n);
|
|
466
954
|
} catch {
|
|
@@ -470,12 +958,12 @@ var H = (e) => [
|
|
|
470
958
|
raw: n,
|
|
471
959
|
element: {
|
|
472
960
|
source: r ?? "",
|
|
473
|
-
index: r ?
|
|
961
|
+
index: r ? jt(t, r) : 0
|
|
474
962
|
},
|
|
475
963
|
...i === void 0 ? {} : { config: i }
|
|
476
964
|
};
|
|
477
|
-
},
|
|
478
|
-
let t = e.getAttribute("data-levo-source") ?? "", n =
|
|
965
|
+
}, Yt = () => Array.from(document.querySelectorAll("[data-levo-source]")).map((e) => {
|
|
966
|
+
let t = e.getAttribute("data-levo-source") ?? "", n = Z(e), r;
|
|
479
967
|
try {
|
|
480
968
|
r = JSON.parse(t);
|
|
481
969
|
} catch {
|
|
@@ -485,21 +973,21 @@ var H = (e) => [
|
|
|
485
973
|
raw: t,
|
|
486
974
|
element: {
|
|
487
975
|
source: n ?? "",
|
|
488
|
-
index: n ?
|
|
976
|
+
index: n ? jt(e, n) : 0
|
|
489
977
|
},
|
|
490
978
|
tag: e.tagName.toLowerCase(),
|
|
491
|
-
label:
|
|
979
|
+
label: Rt(e),
|
|
492
980
|
...r === void 0 ? {} : { config: r }
|
|
493
981
|
};
|
|
494
|
-
}),
|
|
982
|
+
}), Xt = 14, Zt = 2e3, Qt = 100, $t = 48, en = new Set([
|
|
495
983
|
"script",
|
|
496
984
|
"style",
|
|
497
985
|
"template",
|
|
498
986
|
"noscript"
|
|
499
|
-
]),
|
|
987
|
+
]), tn = (e, t) => t.includes(e) || e.id === "studio-staged" || en.has(e.tagName.toLowerCase()), nn = (e) => {
|
|
500
988
|
let t = !1, n = 0, r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
501
989
|
for (let e of Array.from(document.querySelectorAll("[data-tsd-source]"))) {
|
|
502
|
-
let t =
|
|
990
|
+
let t = Z(e);
|
|
503
991
|
if (!t) continue;
|
|
504
992
|
let n = i.get(t) ?? 0;
|
|
505
993
|
r.set(e, n), i.set(t, n + 1);
|
|
@@ -508,11 +996,11 @@ var H = (e) => [
|
|
|
508
996
|
for (let t of e.childNodes) {
|
|
509
997
|
if (t.nodeType !== 3) continue;
|
|
510
998
|
let e = (t.textContent ?? "").replace(/\s+/g, " ").trim();
|
|
511
|
-
if (e) return e.length >
|
|
999
|
+
if (e) return e.length > $t ? `${e.slice(0, $t).trimEnd()}…` : e;
|
|
512
1000
|
}
|
|
513
1001
|
}, o = (i, s) => {
|
|
514
1002
|
n++;
|
|
515
|
-
let c =
|
|
1003
|
+
let c = Z(i), l = a(i), u = Array.from(i.children).filter((t) => !tn(t, e)), d = {
|
|
516
1004
|
tag: i.tagName.toLowerCase(),
|
|
517
1005
|
...c ? {
|
|
518
1006
|
source: c,
|
|
@@ -523,9 +1011,9 @@ var H = (e) => [
|
|
|
523
1011
|
childCount: u.length,
|
|
524
1012
|
children: []
|
|
525
1013
|
};
|
|
526
|
-
if (s >=
|
|
1014
|
+
if (s >= Xt) return u.length && (t = !0), d;
|
|
527
1015
|
for (let e of u) {
|
|
528
|
-
if (d.children.length >=
|
|
1016
|
+
if (d.children.length >= Qt || n >= Zt) {
|
|
529
1017
|
t = !0;
|
|
530
1018
|
break;
|
|
531
1019
|
}
|
|
@@ -537,7 +1025,7 @@ var H = (e) => [
|
|
|
537
1025
|
tree: o(document.body, 0),
|
|
538
1026
|
truncated: t
|
|
539
1027
|
};
|
|
540
|
-
},
|
|
1028
|
+
}, rn = () => {
|
|
541
1029
|
let e = null;
|
|
542
1030
|
return {
|
|
543
1031
|
send: (t) => {
|
|
@@ -552,7 +1040,7 @@ var H = (e) => [
|
|
|
552
1040
|
return !0;
|
|
553
1041
|
}
|
|
554
1042
|
};
|
|
555
|
-
},
|
|
1043
|
+
}, an = (e) => {
|
|
556
1044
|
let t = location.pathname, n = () => {
|
|
557
1045
|
location.pathname !== t && (t = location.pathname, e.onPathChange());
|
|
558
1046
|
}, r = !1;
|
|
@@ -572,7 +1060,7 @@ var H = (e) => [
|
|
|
572
1060
|
e.__inspectorPatched && e.__orig && (history.pushState = e.__orig), t.__inspectorPatched && t.__orig && (history.replaceState = t.__orig);
|
|
573
1061
|
}
|
|
574
1062
|
} };
|
|
575
|
-
},
|
|
1063
|
+
}, on = (e) => {
|
|
576
1064
|
let { channel: t, originals: n, staged: r } = e, i = t.send, a = null;
|
|
577
1065
|
return { onMessage: (o) => {
|
|
578
1066
|
let s = o.data;
|
|
@@ -580,7 +1068,7 @@ var H = (e) => [
|
|
|
580
1068
|
if (s.type === "set-inspect") e.setInspect(s.enabled);
|
|
581
1069
|
else if (s.type === "set-text-edit") e.setTextEdit(s.enabled);
|
|
582
1070
|
else if (s.type === "revert-text") {
|
|
583
|
-
let e = String(s.element?.source || ""), t = Number.isInteger(s.element?.index) ? s.element.index : 0, r = n.restore(`${e}#${t}`), i = r == null ? null :
|
|
1071
|
+
let e = String(s.element?.source || ""), t = Number.isInteger(s.element?.index) ? s.element.index : 0, r = n.restore(`${e}#${t}`), i = r == null ? null : Mt(e, t);
|
|
584
1072
|
i && r != null && (i.textContent = r);
|
|
585
1073
|
} else if (s.type === "stage-style") {
|
|
586
1074
|
let t = String(s.stageId || ""), n = String(s.element?.source || ""), a = Number.isInteger(s.element?.index) ? s.element.index : 0, o = s.styles && typeof s.styles == "object" ? s.styles : null;
|
|
@@ -639,7 +1127,7 @@ var H = (e) => [
|
|
|
639
1127
|
}
|
|
640
1128
|
e.syncDomObserver();
|
|
641
1129
|
} else if (s.type === "select-element") {
|
|
642
|
-
let t = String(s.element?.source || ""), n = Number.isInteger(s.element?.index) ? s.element.index : 0, r = t ?
|
|
1130
|
+
let t = String(s.element?.source || ""), n = Number.isInteger(s.element?.index) ? s.element.index : 0, r = t ? Mt(t, n) : null;
|
|
643
1131
|
if (!r) {
|
|
644
1132
|
i({
|
|
645
1133
|
type: "select-miss",
|
|
@@ -655,10 +1143,10 @@ var H = (e) => [
|
|
|
655
1143
|
behavior: "smooth"
|
|
656
1144
|
}), i({
|
|
657
1145
|
type: "element-selected",
|
|
658
|
-
element:
|
|
1146
|
+
element: qt(r)
|
|
659
1147
|
});
|
|
660
1148
|
} else if (s.type === "edit-element") {
|
|
661
|
-
let t = String(s.element?.source || ""), n = Number.isInteger(s.element?.index) ? s.element.index : 0, r = t ?
|
|
1149
|
+
let t = String(s.element?.source || ""), n = Number.isInteger(s.element?.index) ? s.element.index : 0, r = t ? Mt(t, n) : null;
|
|
662
1150
|
if (!r) {
|
|
663
1151
|
i({
|
|
664
1152
|
type: "select-miss",
|
|
@@ -674,12 +1162,12 @@ var H = (e) => [
|
|
|
674
1162
|
behavior: "smooth"
|
|
675
1163
|
}), i({
|
|
676
1164
|
type: "element-selected",
|
|
677
|
-
element:
|
|
1165
|
+
element: qt(r)
|
|
678
1166
|
}), e.isTextEditing() || e.setTextEdit(!0);
|
|
679
1167
|
let o = e.editableTarget(r);
|
|
680
1168
|
o && e.startEditAtEnd(o);
|
|
681
1169
|
} else if (s.type === "highlight-element") {
|
|
682
|
-
let t = String(s.element?.source || ""), n = Number.isInteger(s.element?.index) ? s.element.index : 0, r = t ?
|
|
1170
|
+
let t = String(s.element?.source || ""), n = Number.isInteger(s.element?.index) ? s.element.index : 0, r = t ? Mt(t, n) : null;
|
|
683
1171
|
if (!r) a = null, e.hideTextHover(), i({
|
|
684
1172
|
type: "highlight-miss",
|
|
685
1173
|
element: {
|
|
@@ -697,7 +1185,7 @@ var H = (e) => [
|
|
|
697
1185
|
}
|
|
698
1186
|
} else if (s.type === "clear-highlight") a && (a = null, !e.isInspecting() && !e.editingNode() && e.hideTextHover());
|
|
699
1187
|
else if (s.type === "request-layers") {
|
|
700
|
-
let { tree: t, truncated: n } =
|
|
1188
|
+
let { tree: t, truncated: n } = nn(e.ownNodes);
|
|
701
1189
|
i({
|
|
702
1190
|
type: "layers-tree",
|
|
703
1191
|
tree: t,
|
|
@@ -705,7 +1193,7 @@ var H = (e) => [
|
|
|
705
1193
|
});
|
|
706
1194
|
} else if (s.type === "request-sources") i({
|
|
707
1195
|
type: "sources-list",
|
|
708
|
-
sources:
|
|
1196
|
+
sources: Yt()
|
|
709
1197
|
});
|
|
710
1198
|
else if (s.type === "capture-selected") {
|
|
711
1199
|
let t = String(s.requestId || "");
|
|
@@ -720,7 +1208,7 @@ var H = (e) => [
|
|
|
720
1208
|
});
|
|
721
1209
|
return;
|
|
722
1210
|
}
|
|
723
|
-
|
|
1211
|
+
wt(n, e.ownNodes).then((e) => {
|
|
724
1212
|
console.info(`[levo-inspector] element capture ok <${n.tagName.toLowerCase()}> (${Math.round(e.length / 1024)}kB)`), i({
|
|
725
1213
|
type: "capture-result",
|
|
726
1214
|
requestId: t,
|
|
@@ -741,7 +1229,7 @@ var H = (e) => [
|
|
|
741
1229
|
}
|
|
742
1230
|
}
|
|
743
1231
|
} };
|
|
744
|
-
},
|
|
1232
|
+
}, sn = () => {
|
|
745
1233
|
let e = /* @__PURE__ */ new Map(), t = () => {
|
|
746
1234
|
if (e.size > 50) {
|
|
747
1235
|
let t = e.keys().next().value;
|
|
@@ -761,31 +1249,31 @@ var H = (e) => [
|
|
|
761
1249
|
return e.delete(t), n;
|
|
762
1250
|
}
|
|
763
1251
|
};
|
|
764
|
-
},
|
|
1252
|
+
}, cn = 6, ln = 12, un = 12, dn = .6, fn = (e, t, n, r) => ({
|
|
765
1253
|
x: Math.min(e, n),
|
|
766
1254
|
y: Math.min(t, r),
|
|
767
1255
|
width: Math.abs(n - e),
|
|
768
1256
|
height: Math.abs(r - t)
|
|
769
|
-
}),
|
|
1257
|
+
}), pn = (e, t) => {
|
|
770
1258
|
let n = e.x + e.width, r = e.y + e.height, i = [];
|
|
771
1259
|
for (let a of Array.from(document.querySelectorAll("[data-tsd-source]"))) {
|
|
772
1260
|
if (t.includes(a)) continue;
|
|
773
1261
|
let o = a.getBoundingClientRect(), s = o.width * o.height;
|
|
774
|
-
s <= 0 || Math.max(0, Math.min(n, o.right) - Math.max(e.x, o.left)) * Math.max(0, Math.min(r, o.bottom) - Math.max(e.y, o.top)) / s >=
|
|
1262
|
+
s <= 0 || Math.max(0, Math.min(n, o.right) - Math.max(e.x, o.left)) * Math.max(0, Math.min(r, o.bottom) - Math.max(e.y, o.top)) / s >= dn && i.push(a);
|
|
775
1263
|
}
|
|
776
1264
|
let a = new Set(i), o = i.filter((e) => {
|
|
777
1265
|
for (let t = e.parentElement; t; t = t.parentElement) if (a.has(t)) return !1;
|
|
778
1266
|
return !0;
|
|
779
|
-
}), s = o.length >
|
|
780
|
-
for (let e of o.slice(0,
|
|
781
|
-
let t =
|
|
1267
|
+
}), s = o.length > un, c = [], l = [];
|
|
1268
|
+
for (let e of o.slice(0, un)) {
|
|
1269
|
+
let t = Z(e);
|
|
782
1270
|
if (!t) continue;
|
|
783
1271
|
let n = (e.innerText || "").replace(/\s+/g, " ").trim().slice(0, 80);
|
|
784
1272
|
c.push({
|
|
785
1273
|
source: t,
|
|
786
|
-
index:
|
|
1274
|
+
index: jt(e, t),
|
|
787
1275
|
tag: e.tagName.toLowerCase(),
|
|
788
|
-
label:
|
|
1276
|
+
label: Rt(e),
|
|
789
1277
|
...n ? { text: n } : {}
|
|
790
1278
|
}), l.push(e);
|
|
791
1279
|
}
|
|
@@ -794,12 +1282,12 @@ var H = (e) => [
|
|
|
794
1282
|
nodes: l,
|
|
795
1283
|
truncated: s
|
|
796
1284
|
};
|
|
797
|
-
},
|
|
1285
|
+
}, mn = () => Array.from({ length: un }, () => {
|
|
798
1286
|
let e = document.createElement("div");
|
|
799
|
-
return e.style.cssText = `position:fixed;pointer-events:none;z-index:${
|
|
800
|
-
}),
|
|
1287
|
+
return e.style.cssText = `position:fixed;pointer-events:none;z-index:${kt.ring};outline:1.5px solid ${X.select};outline-offset:1px;border-radius:3px;box-shadow:0 0 0 3px ${X.selectGlow};display:none`, e;
|
|
1288
|
+
}), hn = () => {
|
|
801
1289
|
let e = document.createElement("div");
|
|
802
|
-
e.style.cssText = `position:fixed;pointer-events:none;z-index:${
|
|
1290
|
+
e.style.cssText = `position:fixed;pointer-events:none;z-index:${kt.overlay};border:1.5px dashed ${X.select};background:${X.selectGlow};border-radius:2px;display:none`;
|
|
803
1291
|
let t = null, n = !1, r = 0, i = 0, a = () => {
|
|
804
1292
|
e.style.display = "none";
|
|
805
1293
|
};
|
|
@@ -814,31 +1302,31 @@ var H = (e) => [
|
|
|
814
1302
|
pointerMove: (a, o) => {
|
|
815
1303
|
if (!t) return;
|
|
816
1304
|
if (a = Math.min(Math.max(0, a), window.innerWidth), o = Math.min(Math.max(0, o), window.innerHeight), r = a, i = o, !n) {
|
|
817
|
-
if (Math.abs(a - t.x) <
|
|
1305
|
+
if (Math.abs(a - t.x) < cn && Math.abs(o - t.y) < cn) return;
|
|
818
1306
|
n = !0;
|
|
819
1307
|
}
|
|
820
|
-
let s =
|
|
1308
|
+
let s = fn(t.x, t.y, a, o);
|
|
821
1309
|
e.style.display = "block", e.style.left = `${s.x}px`, e.style.top = `${s.y}px`, e.style.width = `${s.width}px`, e.style.height = `${s.height}px`;
|
|
822
1310
|
},
|
|
823
1311
|
pointerUp: () => {
|
|
824
1312
|
let e = n, o = t;
|
|
825
1313
|
if (t = null, n = !1, a(), !e || !o) return null;
|
|
826
|
-
let s =
|
|
827
|
-
return s.width <
|
|
1314
|
+
let s = fn(o.x, o.y, r, i);
|
|
1315
|
+
return s.width < ln || s.height < ln ? null : s;
|
|
828
1316
|
},
|
|
829
1317
|
cancel: () => {
|
|
830
1318
|
t = null, n = !1, a();
|
|
831
1319
|
},
|
|
832
1320
|
isDragging: () => n
|
|
833
1321
|
};
|
|
834
|
-
},
|
|
1322
|
+
}, gn = (e) => {
|
|
835
1323
|
let { originals: t, editingNode: n } = e, r = /* @__PURE__ */ new Map(), i = () => {
|
|
836
1324
|
let e = document.getElementById("studio-staged");
|
|
837
1325
|
return e || (e = document.createElement("style"), e.id = "studio-staged", document.head.appendChild(e)), e;
|
|
838
1326
|
}, a = () => {
|
|
839
1327
|
let e = [];
|
|
840
1328
|
for (let [t, n] of r) if (n.kind === "style") {
|
|
841
|
-
let r =
|
|
1329
|
+
let r = Ft(t, n);
|
|
842
1330
|
r && e.push(r);
|
|
843
1331
|
}
|
|
844
1332
|
let t = e.join("\n");
|
|
@@ -846,8 +1334,8 @@ var H = (e) => [
|
|
|
846
1334
|
let n = i();
|
|
847
1335
|
n.textContent !== t && (n.textContent = t);
|
|
848
1336
|
}, o = (e, r) => {
|
|
849
|
-
let i =
|
|
850
|
-
if (i) if (r.kind === "style")
|
|
1337
|
+
let i = Mt(r.source, r.index);
|
|
1338
|
+
if (i) if (r.kind === "style") Nt(i, e);
|
|
851
1339
|
else if (r.kind === "image") t.captureOnce(`${r.source}#${r.index}:src`, i.getAttribute("src") ?? ""), t.captureOnce(`${r.source}#${r.index}:srcset`, i.getAttribute("srcset") ?? ""), i.getAttribute("src") !== r.value && i.setAttribute("src", r.value), i.hasAttribute("srcset") && i.removeAttribute("srcset");
|
|
852
1340
|
else {
|
|
853
1341
|
if (i === n()) return;
|
|
@@ -860,8 +1348,8 @@ var H = (e) => [
|
|
|
860
1348
|
let n = r.get(e);
|
|
861
1349
|
if (!n) return;
|
|
862
1350
|
r.delete(e);
|
|
863
|
-
let i =
|
|
864
|
-
if (n.kind === "style") i &&
|
|
1351
|
+
let i = Mt(n.source, n.index);
|
|
1352
|
+
if (n.kind === "style") i && Pt(i, e), a();
|
|
865
1353
|
else if (n.kind === "image") {
|
|
866
1354
|
let e = t.restore(`${n.source}#${n.index}:src`), r = t.restore(`${n.source}#${n.index}:srcset`);
|
|
867
1355
|
i && (e != null && (e ? i.setAttribute("src", e) : i.removeAttribute("src")), r != null && (r ? i.setAttribute("srcset", r) : i.removeAttribute("srcset")));
|
|
@@ -890,7 +1378,7 @@ var H = (e) => [
|
|
|
890
1378
|
for (let e of Array.from(document.querySelectorAll("[data-staged-key]"))) e.removeAttribute("data-staged-key");
|
|
891
1379
|
}
|
|
892
1380
|
};
|
|
893
|
-
},
|
|
1381
|
+
}, _n = (e) => {
|
|
894
1382
|
let { channel: t, originals: n, clearTextHover: r } = e, i = null, a = "", o = 0, s = (() => {
|
|
895
1383
|
try {
|
|
896
1384
|
let e = document.createElement("div");
|
|
@@ -909,15 +1397,15 @@ var H = (e) => [
|
|
|
909
1397
|
n.selectNodeContents(e), n.collapse(!1), t.removeAllRanges(), t.addRange(n);
|
|
910
1398
|
}, d = (e, t = !1) => {
|
|
911
1399
|
if (i === e) return;
|
|
912
|
-
i && p(i), i = e, a =
|
|
1400
|
+
i && p(i), i = e, a = Z(e) || "", o = jt(e, a), r(), n.capture(`${a}#${o}`, e.textContent ?? ""), e.setAttribute("contenteditable", s ? "plaintext-only" : "true");
|
|
913
1401
|
let d = e;
|
|
914
|
-
d.style.outline = `2px solid ${
|
|
1402
|
+
d.style.outline = `2px solid ${X.hover}`, d.style.outlineOffset = "3px", d.style.borderRadius = "3px", d.focus(), t && u(e), d.addEventListener("blur", c, !0), d.addEventListener("keydown", l, !0);
|
|
915
1403
|
}, f = (e) => {
|
|
916
1404
|
e.removeAttribute("contenteditable");
|
|
917
1405
|
let t = e;
|
|
918
1406
|
t.style.outline = "", t.style.outlineOffset = "", t.style.borderRadius = "", t.removeEventListener("blur", c, !0), t.removeEventListener("keydown", l, !0), i = null;
|
|
919
1407
|
}, p = (e) => {
|
|
920
|
-
let r =
|
|
1408
|
+
let r = Z(e), i = o, s = n.get(`${a}#${o}`);
|
|
921
1409
|
f(e);
|
|
922
1410
|
let c = (e.textContent ?? "").replace(/\s+/g, " ").trim();
|
|
923
1411
|
t.send({
|
|
@@ -928,7 +1416,7 @@ var H = (e) => [
|
|
|
928
1416
|
tag: e.tagName.toLowerCase(),
|
|
929
1417
|
value: c,
|
|
930
1418
|
previous: s,
|
|
931
|
-
occurrences: r ?
|
|
1419
|
+
occurrences: r ? At(r).length : 1
|
|
932
1420
|
}
|
|
933
1421
|
});
|
|
934
1422
|
}, m = (e) => {
|
|
@@ -947,16 +1435,16 @@ var H = (e) => [
|
|
|
947
1435
|
i && f(i);
|
|
948
1436
|
}
|
|
949
1437
|
};
|
|
950
|
-
},
|
|
951
|
-
function
|
|
952
|
-
return
|
|
1438
|
+
}, vn = "2026-07-24g · element-capture + region-drag + region-highlights (stale-region guard)";
|
|
1439
|
+
function yn() {
|
|
1440
|
+
return k(() => bn(), []), null;
|
|
953
1441
|
}
|
|
954
|
-
function
|
|
955
|
-
let e = !1, t = null, n = null, r = !1, i = null, a =
|
|
1442
|
+
function bn() {
|
|
1443
|
+
let e = !1, t = null, n = null, r = !1, i = null, a = sn(), o = rn(), { overlay: s, label: c, ring: l, ringLabel: u } = Bt();
|
|
956
1444
|
document.body.append(s, c, l, u);
|
|
957
|
-
let d =
|
|
1445
|
+
let d = hn();
|
|
958
1446
|
document.body.append(d.node);
|
|
959
|
-
let f =
|
|
1447
|
+
let f = mn();
|
|
960
1448
|
document.body.append(...f);
|
|
961
1449
|
let p = [
|
|
962
1450
|
s,
|
|
@@ -985,124 +1473,124 @@ function ht() {
|
|
|
985
1473
|
e && !b ? (b = document.createElement("style"), b.id = "studio-pick-cursor", b.textContent = "*,*::before,*::after{cursor:crosshair !important}", document.head.appendChild(b)) : !e && b && (b.remove(), b = null);
|
|
986
1474
|
}, S = (e) => !e || p.includes(e) || e === document.body || e === document.documentElement, C = (e) => {
|
|
987
1475
|
if (!e || S(e)) return null;
|
|
988
|
-
let t =
|
|
989
|
-
return !t || S(t) || !
|
|
990
|
-
}, w = (e) =>
|
|
1476
|
+
let t = Z(e) ? e : e.closest("[data-tsd-source]");
|
|
1477
|
+
return !t || S(t) || !Wt(t) ? null : t;
|
|
1478
|
+
}, w = (e) => Vt(s, c, e), T = () => {
|
|
991
1479
|
if (n) {
|
|
992
1480
|
if (!n.isConnected) {
|
|
993
|
-
|
|
1481
|
+
N();
|
|
994
1482
|
return;
|
|
995
1483
|
}
|
|
996
|
-
|
|
1484
|
+
Vt(l, u, n);
|
|
997
1485
|
}
|
|
998
1486
|
}, E = 0, D = () => {
|
|
999
1487
|
E || !n || r || (E = requestAnimationFrame(() => {
|
|
1000
1488
|
E = 0, T();
|
|
1001
1489
|
}));
|
|
1002
|
-
}, O = new ResizeObserver(D),
|
|
1490
|
+
}, O = new ResizeObserver(D), ee = new MutationObserver((e) => {
|
|
1003
1491
|
for (let t of e) {
|
|
1004
1492
|
let e = t.target;
|
|
1005
1493
|
if (!p.some((t) => t === e) && !(t.type === "attributes" && t.attributeName === "data-staged-key")) {
|
|
1006
|
-
D(),
|
|
1494
|
+
D(), L.scheduleReapply();
|
|
1007
1495
|
return;
|
|
1008
1496
|
}
|
|
1009
1497
|
}
|
|
1010
|
-
}),
|
|
1011
|
-
|
|
1498
|
+
}), k = !1, A = () => {
|
|
1499
|
+
k ||= (ee.observe(document.documentElement, {
|
|
1012
1500
|
attributes: !0,
|
|
1013
1501
|
childList: !0,
|
|
1014
1502
|
characterData: !0,
|
|
1015
1503
|
subtree: !0
|
|
1016
1504
|
}), !0);
|
|
1017
1505
|
}, j = () => {
|
|
1018
|
-
|
|
1019
|
-
},
|
|
1020
|
-
O.disconnect(), n?.isConnected && (O.observe(n),
|
|
1021
|
-
},
|
|
1022
|
-
n = null, O.disconnect(),
|
|
1023
|
-
},
|
|
1506
|
+
k &&= (ee.disconnect(), !1);
|
|
1507
|
+
}, M = () => {
|
|
1508
|
+
O.disconnect(), n?.isConnected && (O.observe(n), A());
|
|
1509
|
+
}, N = () => {
|
|
1510
|
+
n = null, O.disconnect(), te(), E &&= (cancelAnimationFrame(E), 0), l.style.display = "none", u.style.display = "none", y(), g();
|
|
1511
|
+
}, P = (e) => w(e), F = () => {
|
|
1024
1512
|
s.style.display = "none", c.style.display = "none";
|
|
1025
|
-
},
|
|
1513
|
+
}, I = _n({
|
|
1026
1514
|
channel: o,
|
|
1027
1515
|
originals: a,
|
|
1028
1516
|
clearTextHover: () => {
|
|
1029
|
-
i = null,
|
|
1517
|
+
i = null, F();
|
|
1030
1518
|
}
|
|
1031
|
-
}),
|
|
1519
|
+
}), L = gn({
|
|
1032
1520
|
originals: a,
|
|
1033
|
-
editingNode:
|
|
1034
|
-
}),
|
|
1035
|
-
n?.isConnected ||
|
|
1036
|
-
},
|
|
1037
|
-
n && r &&
|
|
1521
|
+
editingNode: I.editingNode
|
|
1522
|
+
}), te = () => {
|
|
1523
|
+
n?.isConnected || L.count() ? A() : j();
|
|
1524
|
+
}, R = (n) => {
|
|
1525
|
+
n && r && z(!1), e = !!n, x(e), e || (t = null, s.style.display = "none", c.style.display = "none", W()), o.send({
|
|
1038
1526
|
type: "inspect-state",
|
|
1039
1527
|
enabled: e
|
|
1040
1528
|
});
|
|
1041
|
-
},
|
|
1529
|
+
}, z = (t) => {
|
|
1042
1530
|
if (r = !!t, r) {
|
|
1043
|
-
e &&
|
|
1531
|
+
e && R(!1), l.style.display = "none", u.style.display = "none";
|
|
1044
1532
|
for (let e of f) e.style.display = "none";
|
|
1045
|
-
} else
|
|
1533
|
+
} else I.commitIfEditing(), F(), document.documentElement.style.cursor = "", n && T(), m.length > 0 && _();
|
|
1046
1534
|
o.send({
|
|
1047
1535
|
type: "text-edit-state",
|
|
1048
1536
|
enabled: r
|
|
1049
1537
|
});
|
|
1050
|
-
},
|
|
1051
|
-
|
|
1052
|
-
let n = document.elementFromPoint(
|
|
1538
|
+
}, ne = 0, re = 0, ie = 0, ae = () => {
|
|
1539
|
+
ne = 0;
|
|
1540
|
+
let n = document.elementFromPoint(re, ie);
|
|
1053
1541
|
if (!S(n)) {
|
|
1054
1542
|
if (r) {
|
|
1055
1543
|
let e = C(n);
|
|
1056
|
-
if (e && e ===
|
|
1057
|
-
i = null,
|
|
1544
|
+
if (e && e === I.editingNode()) {
|
|
1545
|
+
i = null, F(), document.documentElement.style.cursor = "";
|
|
1058
1546
|
return;
|
|
1059
1547
|
}
|
|
1060
|
-
i = e, document.documentElement.style.cursor = e ? "text" : "", e ?
|
|
1548
|
+
i = e, document.documentElement.style.cursor = e ? "text" : "", e ? P(e) : F();
|
|
1061
1549
|
return;
|
|
1062
1550
|
}
|
|
1063
1551
|
e && (d.isDragging() || (t = n, n && w(n)));
|
|
1064
1552
|
}
|
|
1065
|
-
},
|
|
1066
|
-
!e && !r || (
|
|
1067
|
-
},
|
|
1068
|
-
|
|
1069
|
-
},
|
|
1070
|
-
|
|
1071
|
-
},
|
|
1072
|
-
n.relatedTarget || (e ? (t = null, s.style.display = "none", c.style.display = "none") : r && !
|
|
1073
|
-
}, H = !1,
|
|
1074
|
-
if (
|
|
1553
|
+
}, B = (t) => {
|
|
1554
|
+
!e && !r || (re = t.clientX, ie = t.clientY, ne ||= requestAnimationFrame(ae));
|
|
1555
|
+
}, V = 0, oe = () => {
|
|
1556
|
+
V = 0, e && t && w(t), r && !I.editingNode() && i?.isConnected && P(i), n && !r && T(), m.length > 0 && !r && _();
|
|
1557
|
+
}, se = () => {
|
|
1558
|
+
V ||= requestAnimationFrame(oe);
|
|
1559
|
+
}, ce = (n) => {
|
|
1560
|
+
n.relatedTarget || (e ? (t = null, s.style.display = "none", c.style.display = "none") : r && !I.editingNode() && (i = null, F(), document.documentElement.style.cursor = ""));
|
|
1561
|
+
}, H = !1, le = null, U = () => {
|
|
1562
|
+
if (le != null) {
|
|
1075
1563
|
try {
|
|
1076
|
-
document.documentElement.releasePointerCapture(
|
|
1564
|
+
document.documentElement.releasePointerCapture(le);
|
|
1077
1565
|
} catch {}
|
|
1078
|
-
|
|
1566
|
+
le = null;
|
|
1079
1567
|
}
|
|
1080
|
-
},
|
|
1081
|
-
|
|
1082
|
-
},
|
|
1568
|
+
}, W = () => {
|
|
1569
|
+
U(), d.cancel();
|
|
1570
|
+
}, ue = (t) => {
|
|
1083
1571
|
!e || t.button !== 0 || !t.isPrimary || (H = !1, d.pointerDown(t.clientX, t.clientY));
|
|
1084
|
-
},
|
|
1572
|
+
}, de = (n) => {
|
|
1085
1573
|
if (!e || !n.isPrimary) return;
|
|
1086
1574
|
let r = d.isDragging();
|
|
1087
1575
|
if (d.pointerMove(n.clientX, n.clientY), d.isDragging()) {
|
|
1088
1576
|
if (!r) {
|
|
1089
|
-
|
|
1577
|
+
le = n.pointerId;
|
|
1090
1578
|
try {
|
|
1091
1579
|
document.documentElement.setPointerCapture(n.pointerId);
|
|
1092
1580
|
} catch {}
|
|
1093
1581
|
}
|
|
1094
1582
|
t = null, s.style.display = "none", c.style.display = "none";
|
|
1095
1583
|
}
|
|
1096
|
-
},
|
|
1584
|
+
}, G = (t) => {
|
|
1097
1585
|
if (!e || !t.isPrimary) return;
|
|
1098
|
-
|
|
1586
|
+
U();
|
|
1099
1587
|
let n = d.pointerUp();
|
|
1100
1588
|
if (!n) return;
|
|
1101
|
-
H = !0,
|
|
1102
|
-
let { elements: r, nodes: i, truncated: a } =
|
|
1589
|
+
H = !0, N();
|
|
1590
|
+
let { elements: r, nodes: i, truncated: a } = pn(n, p);
|
|
1103
1591
|
console.info(`[levo-inspector] region drag: ${Math.round(n.width)}×${Math.round(n.height)} — ${r.length} element(s)${a ? " (truncated)" : ""}`), v(i);
|
|
1104
1592
|
let s = ++h;
|
|
1105
|
-
|
|
1593
|
+
Ot(n, p).then((e) => {
|
|
1106
1594
|
s === h && (console.info(`[levo-inspector] region capture ok (${Math.round(e.length / 1024)}kB)`), o.send({
|
|
1107
1595
|
type: "region-selected",
|
|
1108
1596
|
rect: n,
|
|
@@ -1119,8 +1607,8 @@ function ht() {
|
|
|
1119
1607
|
dataUrl: null
|
|
1120
1608
|
}));
|
|
1121
1609
|
});
|
|
1122
|
-
},
|
|
1123
|
-
let t =
|
|
1610
|
+
}, K = () => W(), fe = (e) => {
|
|
1611
|
+
let t = Ht(e.target);
|
|
1124
1612
|
return t ? (e.preventDefault(), e.stopPropagation(), window.open(t, "_blank", "noopener,noreferrer"), !0) : !1;
|
|
1125
1613
|
}, pe = (i) => {
|
|
1126
1614
|
if (H) {
|
|
@@ -1129,11 +1617,11 @@ function ht() {
|
|
|
1129
1617
|
}
|
|
1130
1618
|
if (r) {
|
|
1131
1619
|
let e = C(document.elementFromPoint(i.clientX, i.clientY) || i.target);
|
|
1132
|
-
if (!e || e ===
|
|
1620
|
+
if (!e || e === I.editingNode()) {
|
|
1133
1621
|
fe(i);
|
|
1134
1622
|
return;
|
|
1135
1623
|
}
|
|
1136
|
-
i.preventDefault(), i.stopPropagation(), i.stopImmediatePropagation(),
|
|
1624
|
+
i.preventDefault(), i.stopPropagation(), i.stopImmediatePropagation(), I.startEdit(e);
|
|
1137
1625
|
return;
|
|
1138
1626
|
}
|
|
1139
1627
|
if (!e) {
|
|
@@ -1144,29 +1632,29 @@ function ht() {
|
|
|
1144
1632
|
let a = t || i.target;
|
|
1145
1633
|
if (S(a)) return;
|
|
1146
1634
|
let s = a.closest("[data-tsd-source]") || a;
|
|
1147
|
-
y(), g(), n = s, T(),
|
|
1635
|
+
y(), g(), n = s, T(), M(), o.send({
|
|
1148
1636
|
type: "element-selected",
|
|
1149
|
-
element:
|
|
1637
|
+
element: qt(s)
|
|
1150
1638
|
});
|
|
1151
|
-
}, me =
|
|
1639
|
+
}, me = on({
|
|
1152
1640
|
channel: o,
|
|
1153
1641
|
originals: a,
|
|
1154
|
-
staged:
|
|
1155
|
-
setInspect:
|
|
1156
|
-
setTextEdit:
|
|
1642
|
+
staged: L,
|
|
1643
|
+
setInspect: R,
|
|
1644
|
+
setTextEdit: z,
|
|
1157
1645
|
isInspecting: () => e,
|
|
1158
1646
|
isTextEditing: () => r,
|
|
1159
|
-
editingNode:
|
|
1647
|
+
editingNode: I.editingNode,
|
|
1160
1648
|
setSelected: (e) => {
|
|
1161
|
-
y(), g(), n = e,
|
|
1649
|
+
y(), g(), n = e, M();
|
|
1162
1650
|
},
|
|
1163
1651
|
selectedNode: () => n,
|
|
1164
1652
|
positionSelected: T,
|
|
1165
|
-
clearSelection:
|
|
1166
|
-
syncDomObserver:
|
|
1653
|
+
clearSelection: N,
|
|
1654
|
+
syncDomObserver: te,
|
|
1167
1655
|
positionHover: w,
|
|
1168
|
-
hideTextHover:
|
|
1169
|
-
startEditAtEnd: (e) =>
|
|
1656
|
+
hideTextHover: F,
|
|
1657
|
+
startEditAtEnd: (e) => I.startEdit(e, !0),
|
|
1170
1658
|
editableTarget: C,
|
|
1171
1659
|
ownNodes: p
|
|
1172
1660
|
}), he = [
|
|
@@ -1197,88 +1685,229 @@ function ht() {
|
|
|
1197
1685
|
type: "route",
|
|
1198
1686
|
route: e
|
|
1199
1687
|
});
|
|
1200
|
-
}, ye =
|
|
1201
|
-
|
|
1202
|
-
} }),
|
|
1203
|
-
if (
|
|
1688
|
+
}, ye = an({ onPathChange: () => {
|
|
1689
|
+
N(), ve();
|
|
1690
|
+
} }), q = (t) => {
|
|
1691
|
+
if (I.editingNode()) return;
|
|
1204
1692
|
if (t.key === "Escape") {
|
|
1205
1693
|
if (e && d.isDragging()) {
|
|
1206
|
-
t.stopPropagation(),
|
|
1694
|
+
t.stopPropagation(), W();
|
|
1207
1695
|
return;
|
|
1208
1696
|
}
|
|
1209
|
-
r ? (t.stopPropagation(),
|
|
1697
|
+
r ? (t.stopPropagation(), z(!1)) : e && (t.stopPropagation(), R(!1));
|
|
1210
1698
|
return;
|
|
1211
1699
|
}
|
|
1212
|
-
if (t.metaKey || t.ctrlKey || t.altKey || t.shiftKey || t.repeat ||
|
|
1700
|
+
if (t.metaKey || t.ctrlKey || t.altKey || t.shiftKey || t.repeat || Ut(document.activeElement)) return;
|
|
1213
1701
|
let n = t.key.toLowerCase();
|
|
1214
|
-
n === "s" ? (t.preventDefault(), t.stopPropagation(),
|
|
1702
|
+
n === "s" ? (t.preventDefault(), t.stopPropagation(), R(!e)) : n === "t" && (t.preventDefault(), t.stopPropagation(), z(!r));
|
|
1215
1703
|
};
|
|
1216
|
-
window.addEventListener("mousemove",
|
|
1704
|
+
window.addEventListener("mousemove", B, !0), window.addEventListener("scroll", se, !0), window.addEventListener("resize", _e), window.addEventListener("click", pe, !0), window.addEventListener("keydown", q, !0), window.addEventListener("message", me.onMessage), window.addEventListener("mouseout", ce, !0), window.addEventListener("pointerdown", ue, !0), window.addEventListener("pointermove", de, !0), window.addEventListener("pointerup", G, !0), window.addEventListener("pointercancel", K, !0);
|
|
1217
1705
|
for (let e of he) window.addEventListener(e, ge, !0);
|
|
1218
|
-
return console.info(`[levo-inspector] build ${
|
|
1219
|
-
window.removeEventListener("mousemove",
|
|
1706
|
+
return console.info(`[levo-inspector] build ${vn} — runtime mounted`), ve(), o.send({ type: "ready" }), () => {
|
|
1707
|
+
window.removeEventListener("mousemove", B, !0), window.removeEventListener("keydown", q, !0), window.removeEventListener("scroll", se, !0), window.removeEventListener("resize", _e), window.removeEventListener("mouseout", ce, !0), window.removeEventListener("pointerdown", ue, !0), window.removeEventListener("pointermove", de, !0), window.removeEventListener("pointerup", G, !0), window.removeEventListener("pointercancel", K, !0), window.removeEventListener("click", pe, !0), window.removeEventListener("message", me.onMessage);
|
|
1220
1708
|
for (let e of he) window.removeEventListener(e, ge, !0);
|
|
1221
|
-
O.disconnect(),
|
|
1709
|
+
O.disconnect(), ee.disconnect(), E && cancelAnimationFrame(E), ne && cancelAnimationFrame(ne), V && cancelAnimationFrame(V), L.teardown(), ye.teardown(), I.teardown(), document.documentElement.style.cursor = "", b?.remove(), s.remove(), c.remove(), l.remove(), u.remove(), W(), d.node.remove();
|
|
1222
1710
|
for (let e of f) e.remove();
|
|
1223
1711
|
};
|
|
1224
1712
|
}
|
|
1225
1713
|
//#endregion
|
|
1226
1714
|
//#region src/pageId.ts
|
|
1227
|
-
var
|
|
1715
|
+
var xn = "levo:page-id", Sn = () => {
|
|
1228
1716
|
if (typeof document > "u") return null;
|
|
1229
|
-
let e = document.querySelectorAll(`meta[name="${
|
|
1717
|
+
let e = document.querySelectorAll(`meta[name="${xn}"]`);
|
|
1230
1718
|
return e[e.length - 1]?.getAttribute("content")?.trim() || null;
|
|
1231
|
-
},
|
|
1232
|
-
let
|
|
1233
|
-
return !
|
|
1719
|
+
}, Cn = D(() => import("./dist-Rjs__H25.js").then((e) => e.n).then((e) => ({ default: e.PopupLoader }))), wn = ({ siteId: e, pageId: t }) => {
|
|
1720
|
+
let n = J(), r = i();
|
|
1721
|
+
return !n || !r ? null : /* @__PURE__ */ S(T, {
|
|
1234
1722
|
fallback: null,
|
|
1235
|
-
children: /* @__PURE__ */
|
|
1723
|
+
children: /* @__PURE__ */ S(Cn, {
|
|
1236
1724
|
pageId: t,
|
|
1237
1725
|
siteId: e
|
|
1238
1726
|
})
|
|
1239
1727
|
});
|
|
1240
|
-
},
|
|
1241
|
-
let [
|
|
1728
|
+
}, Tn = () => i(), En = () => n(), Dn = ({ site: e, children: t }) => {
|
|
1729
|
+
let [n] = N(() => {
|
|
1242
1730
|
if (!e) return null;
|
|
1243
|
-
let t =
|
|
1731
|
+
let t = Ce(e), n = Se(t);
|
|
1244
1732
|
return n ? {
|
|
1245
1733
|
client: n,
|
|
1246
|
-
insights:
|
|
1734
|
+
insights: ne(n, {
|
|
1247
1735
|
insightsUrl: t.insightsUrl || null,
|
|
1248
1736
|
site: t.siteId || null
|
|
1249
1737
|
}),
|
|
1250
1738
|
site: e
|
|
1251
1739
|
} : null;
|
|
1252
|
-
}), [i, a] =
|
|
1253
|
-
return
|
|
1254
|
-
|
|
1255
|
-
}, [
|
|
1256
|
-
if (!
|
|
1257
|
-
let e =
|
|
1258
|
-
a(e),
|
|
1259
|
-
}, [
|
|
1260
|
-
client:
|
|
1261
|
-
insights:
|
|
1740
|
+
}), [i, a] = N(null), o = z({ select: (e) => e.location.pathname });
|
|
1741
|
+
return k(() => {
|
|
1742
|
+
n && (window.levo_client = n.client, window.levo_insights = n.insights);
|
|
1743
|
+
}, [n]), A(() => {
|
|
1744
|
+
if (!n) return;
|
|
1745
|
+
let e = Sn();
|
|
1746
|
+
a(e), n.insights.init({ pageId: e });
|
|
1747
|
+
}, [n, o]), n ? /* @__PURE__ */ C(r, {
|
|
1748
|
+
client: n.client,
|
|
1749
|
+
insights: n.insights,
|
|
1262
1750
|
children: [
|
|
1263
|
-
|
|
1264
|
-
/* @__PURE__ */
|
|
1265
|
-
site:
|
|
1751
|
+
t,
|
|
1752
|
+
/* @__PURE__ */ S(st, {
|
|
1753
|
+
site: n.site,
|
|
1266
1754
|
path: o
|
|
1267
1755
|
}),
|
|
1268
|
-
/* @__PURE__ */
|
|
1756
|
+
/* @__PURE__ */ S(wn, {
|
|
1269
1757
|
pageId: i ?? void 0,
|
|
1270
|
-
siteId:
|
|
1758
|
+
siteId: n.site.id
|
|
1271
1759
|
})
|
|
1272
1760
|
]
|
|
1273
|
-
}) : /* @__PURE__ */
|
|
1274
|
-
},
|
|
1761
|
+
}) : /* @__PURE__ */ S(x, { children: t });
|
|
1762
|
+
}, On = (e, t) => {
|
|
1763
|
+
let n = h(t);
|
|
1764
|
+
return ({ location: t }) => {
|
|
1765
|
+
if (!e.isLocalized) return;
|
|
1766
|
+
let r = s({
|
|
1767
|
+
pathname: t.pathname,
|
|
1768
|
+
locales: e.locales,
|
|
1769
|
+
defaultLocale: e.defaultLocale,
|
|
1770
|
+
cookie: typeof document > "u" ? null : document.cookie,
|
|
1771
|
+
hasRoute: n
|
|
1772
|
+
});
|
|
1773
|
+
if (r.kind === "redirect" && r.path !== t.pathname) throw R({ href: `${r.path}${t.searchStr ?? ""}` });
|
|
1774
|
+
};
|
|
1775
|
+
}, kn = (e) => {
|
|
1776
|
+
let t = e.locales ?? [], n = e.domain?.trim().replace(/^https?:\/\//, "").replace(/\/+$/, "");
|
|
1777
|
+
return {
|
|
1778
|
+
locales: t,
|
|
1779
|
+
defaultLocale: e.default_locale || t[0] || "en",
|
|
1780
|
+
isLocalized: t.length > 1,
|
|
1781
|
+
origin: n ? `https://${n}` : null
|
|
1782
|
+
};
|
|
1783
|
+
}, An = (e) => e.replace(/\/$/, ""), jn = (e) => {
|
|
1784
|
+
let { neutralPath: t, locales: n, activePrefix: r, hasRoute: i } = e, a = An(e.origin), o = `${a}${t}`;
|
|
1785
|
+
if (n.length <= 1) return [{
|
|
1786
|
+
rel: "canonical",
|
|
1787
|
+
href: o
|
|
1788
|
+
}];
|
|
1789
|
+
let s = [{
|
|
1790
|
+
rel: "canonical",
|
|
1791
|
+
href: r ? `${a}${p(t, r, n)}` : o
|
|
1792
|
+
}];
|
|
1793
|
+
for (let e of n) {
|
|
1794
|
+
let r = p(t, e, n);
|
|
1795
|
+
i && !i(r) || s.push({
|
|
1796
|
+
rel: "alternate",
|
|
1797
|
+
hrefLang: e,
|
|
1798
|
+
href: `${a}${r}`
|
|
1799
|
+
});
|
|
1800
|
+
}
|
|
1801
|
+
return s.push({
|
|
1802
|
+
rel: "alternate",
|
|
1803
|
+
hrefLang: "x-default",
|
|
1804
|
+
href: o
|
|
1805
|
+
}), s;
|
|
1806
|
+
}, Mn = ({ config: e, routeTree: t }) => {
|
|
1807
|
+
let n = z({ select: (e) => e.location.pathname });
|
|
1808
|
+
if (!e.isLocalized || !e.origin) return null;
|
|
1809
|
+
let { neutralPath: r } = f(n, e.locales);
|
|
1810
|
+
return /* @__PURE__ */ S(x, { children: jn({
|
|
1811
|
+
neutralPath: r,
|
|
1812
|
+
origin: e.origin,
|
|
1813
|
+
locales: e.locales,
|
|
1814
|
+
hasRoute: t ? h(t) : void 0
|
|
1815
|
+
}).filter((e) => e.rel === "alternate").map((e) => /* @__PURE__ */ S("link", {
|
|
1816
|
+
href: e.href,
|
|
1817
|
+
hrefLang: e.hrefLang,
|
|
1818
|
+
rel: e.rel
|
|
1819
|
+
}, e.hrefLang ?? e.href)) });
|
|
1820
|
+
}, Nn = E(void 0), Pn = ({ children: e, locale: t, locales: n, defaultLocale: r, source: i = "default", hasRoute: a }) => {
|
|
1821
|
+
let o = j(() => {
|
|
1822
|
+
let e = n?.length ? n : [t];
|
|
1823
|
+
return {
|
|
1824
|
+
locale: t,
|
|
1825
|
+
locales: e,
|
|
1826
|
+
defaultLocale: r || e[0] || t,
|
|
1827
|
+
source: i,
|
|
1828
|
+
isMultiLocale: e.length > 1,
|
|
1829
|
+
hasRoute: a,
|
|
1830
|
+
setLocale: (t) => {
|
|
1831
|
+
document.cookie = c(t);
|
|
1832
|
+
let { neutralPath: n } = f(window.location.pathname, e), r = p(n, t, e);
|
|
1833
|
+
window.location.href = `${r}${window.location.search}${window.location.hash}`;
|
|
1834
|
+
},
|
|
1835
|
+
pathFor: (t, n) => p(t, n, e)
|
|
1836
|
+
};
|
|
1837
|
+
}, [
|
|
1838
|
+
t,
|
|
1839
|
+
n,
|
|
1840
|
+
r,
|
|
1841
|
+
i,
|
|
1842
|
+
a
|
|
1843
|
+
]);
|
|
1844
|
+
return /* @__PURE__ */ S(Nn.Provider, {
|
|
1845
|
+
value: o,
|
|
1846
|
+
children: e
|
|
1847
|
+
});
|
|
1848
|
+
};
|
|
1849
|
+
function Fn() {
|
|
1850
|
+
return ee(Nn) || {
|
|
1851
|
+
locale: "en",
|
|
1852
|
+
locales: ["en"],
|
|
1853
|
+
defaultLocale: "en",
|
|
1854
|
+
source: "default",
|
|
1855
|
+
isMultiLocale: !1,
|
|
1856
|
+
setLocale: () => {},
|
|
1857
|
+
pathFor: (e) => e
|
|
1858
|
+
};
|
|
1859
|
+
}
|
|
1860
|
+
function In(e) {
|
|
1861
|
+
let { prefix: t } = f(z({ select: (e) => e.location.pathname }), e.locales);
|
|
1862
|
+
return t ?? e.defaultLocale;
|
|
1863
|
+
}
|
|
1864
|
+
var Ln = ({ config: e, children: t, routeTree: n }) => {
|
|
1865
|
+
let { prefix: r } = f(z({ select: (e) => e.location.pathname }), e.locales);
|
|
1866
|
+
return /* @__PURE__ */ S(Pn, {
|
|
1867
|
+
defaultLocale: e.defaultLocale,
|
|
1868
|
+
hasRoute: n ? h(n) : void 0,
|
|
1869
|
+
locale: r ?? e.defaultLocale,
|
|
1870
|
+
locales: e.locales,
|
|
1871
|
+
source: r ? "prefix" : "default",
|
|
1872
|
+
children: t
|
|
1873
|
+
});
|
|
1874
|
+
};
|
|
1875
|
+
function Rn() {
|
|
1876
|
+
let { locale: e, locales: t, isMultiLocale: n, setLocale: r, pathFor: i, hasRoute: a } = Fn(), o = z({ select: (e) => e.location.pathname });
|
|
1877
|
+
return j(() => {
|
|
1878
|
+
if (!n) return [];
|
|
1879
|
+
let { neutralPath: s } = f(o, t), c = t.filter((e) => !a || a(i(s, e)));
|
|
1880
|
+
return c.length < 2 ? [] : c.map((t) => ({
|
|
1881
|
+
locale: t,
|
|
1882
|
+
isActive: t === e,
|
|
1883
|
+
linkProps: {
|
|
1884
|
+
href: i(s, t),
|
|
1885
|
+
"aria-current": t === e ? "true" : void 0,
|
|
1886
|
+
onClick: (e) => {
|
|
1887
|
+
e.defaultPrevented || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0 || (e.preventDefault(), r(t));
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
}));
|
|
1891
|
+
}, [
|
|
1892
|
+
e,
|
|
1893
|
+
t,
|
|
1894
|
+
n,
|
|
1895
|
+
o,
|
|
1896
|
+
r,
|
|
1897
|
+
i,
|
|
1898
|
+
a
|
|
1899
|
+
]);
|
|
1900
|
+
}
|
|
1901
|
+
//#endregion
|
|
1902
|
+
//#region src/pageHead.tsx
|
|
1903
|
+
var zn = (e) => JSON.stringify(e).replace(/<\//g, "<\\/"), Bn = (e) => {
|
|
1275
1904
|
let t = {}, n = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*("([^"]*)"|'([^']*)'|[^\s"'>]+))?/g;
|
|
1276
1905
|
for (let r = n.exec(e); r; r = n.exec(e)) {
|
|
1277
1906
|
let e = r[1];
|
|
1278
1907
|
!e || /^on/i.test(e) || (t[e] = r[3] ?? r[4] ?? (r[2] ? r[2] : ""));
|
|
1279
1908
|
}
|
|
1280
1909
|
return t;
|
|
1281
|
-
},
|
|
1910
|
+
}, Vn = (e) => {
|
|
1282
1911
|
let t = {
|
|
1283
1912
|
meta: [],
|
|
1284
1913
|
links: [],
|
|
@@ -1286,11 +1915,11 @@ var gt = "levo:page-id", _t = () => {
|
|
|
1286
1915
|
};
|
|
1287
1916
|
if (!e?.trim()) return t;
|
|
1288
1917
|
let n = e.replace(/<script\b([^>]*)>([\s\S]*?)<\/script\s*>/gi, (e, n, r) => {
|
|
1289
|
-
let i =
|
|
1918
|
+
let i = Bn(n), a = r.trim();
|
|
1290
1919
|
return a && (i.children = a), t.scripts.push(i), "";
|
|
1291
1920
|
});
|
|
1292
|
-
return n = n.replace(/<(meta|link)\b([^>]*?)\/?>/gi, (e, n, r) => ((n.toLowerCase() === "meta" ? t.meta : t.links).push(
|
|
1293
|
-
},
|
|
1921
|
+
return n = n.replace(/<(meta|link)\b([^>]*?)\/?>/gi, (e, n, r) => ((n.toLowerCase() === "meta" ? t.meta : t.links).push(Bn(r)), "")), t;
|
|
1922
|
+
}, Hn = (e = {}, t = {}) => {
|
|
1294
1923
|
let n = {
|
|
1295
1924
|
meta: [],
|
|
1296
1925
|
links: [],
|
|
@@ -1355,21 +1984,21 @@ var gt = "levo:page-id", _t = () => {
|
|
|
1355
1984
|
let y = e.ldJson ? Array.isArray(e.ldJson) ? e.ldJson : [e.ldJson] : [];
|
|
1356
1985
|
for (let e of y) n.scripts.push({
|
|
1357
1986
|
type: "application/ld+json",
|
|
1358
|
-
children:
|
|
1987
|
+
children: zn(e)
|
|
1359
1988
|
});
|
|
1360
1989
|
for (let r of [t.customHead, e.customHead]) {
|
|
1361
1990
|
if (!r) continue;
|
|
1362
|
-
let e =
|
|
1991
|
+
let e = Vn(r);
|
|
1363
1992
|
n.meta.push(...e.meta), n.links.push(...e.links), n.scripts.push(...e.scripts);
|
|
1364
1993
|
}
|
|
1365
1994
|
return n;
|
|
1366
1995
|
};
|
|
1367
|
-
function
|
|
1368
|
-
let n =
|
|
1369
|
-
return /* @__PURE__ */
|
|
1370
|
-
n.meta.map((e, t) => e.title === void 0 ? /* @__PURE__ */
|
|
1371
|
-
n.links.map((e, t) => /* @__PURE__ */
|
|
1372
|
-
n.scripts.map(({ children: e, ...t }, n) => e === void 0 ? /* @__PURE__ */
|
|
1996
|
+
function Un({ meta: e, site: t }) {
|
|
1997
|
+
let n = Hn(e, t);
|
|
1998
|
+
return /* @__PURE__ */ C(x, { children: [
|
|
1999
|
+
n.meta.map((e, t) => e.title === void 0 ? /* @__PURE__ */ S("meta", { ...e }, `m${t}`) : /* @__PURE__ */ S("title", { children: e.title }, `t${t}`)),
|
|
2000
|
+
n.links.map((e, t) => /* @__PURE__ */ S("link", { ...e }, `l${t}`)),
|
|
2001
|
+
n.scripts.map(({ children: e, ...t }, n) => e === void 0 ? /* @__PURE__ */ S("script", { ...t }, `s${n}`) : /* @__PURE__ */ S("script", {
|
|
1373
2002
|
...t,
|
|
1374
2003
|
dangerouslySetInnerHTML: { __html: e }
|
|
1375
2004
|
}, `s${n}`))
|
|
@@ -1377,25 +2006,25 @@ function Dt({ meta: e, site: t }) {
|
|
|
1377
2006
|
}
|
|
1378
2007
|
//#endregion
|
|
1379
2008
|
//#region src/registration/ui.tsx
|
|
1380
|
-
var
|
|
2009
|
+
var Wn = (...e) => e.filter(Boolean).join(" "), Q = w.forwardRef(({ className: e, isLoading: t, loadingText: n, children: r, type: i = "button", ...a }, o) => /* @__PURE__ */ S("button", {
|
|
1381
2010
|
ref: o,
|
|
1382
2011
|
type: i,
|
|
1383
|
-
className:
|
|
2012
|
+
className: Wn("inline-flex items-center justify-center", e),
|
|
1384
2013
|
...a,
|
|
1385
|
-
children: t ? /* @__PURE__ */
|
|
2014
|
+
children: t ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(B, { className: Wn("h-4 w-4 animate-spin", n ? "mr-2" : "") }), n] }) : r
|
|
1386
2015
|
}));
|
|
1387
|
-
|
|
2016
|
+
Q.displayName = "Btn";
|
|
1388
2017
|
//#endregion
|
|
1389
2018
|
//#region src/registration/AttendeeForm.tsx
|
|
1390
|
-
var
|
|
2019
|
+
var Gn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, registerLoading: i, onBack: a, submitLabel: o, showBusinessBilling: s = !0 }) => /* @__PURE__ */ C("form", {
|
|
1391
2020
|
onSubmit: r,
|
|
1392
2021
|
className: "flex flex-col gap-4",
|
|
1393
2022
|
children: [
|
|
1394
|
-
/* @__PURE__ */
|
|
2023
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
1395
2024
|
htmlFor: "name",
|
|
1396
2025
|
className: "font-medium text-sm",
|
|
1397
2026
|
children: "Name"
|
|
1398
|
-
}), /* @__PURE__ */
|
|
2027
|
+
}), /* @__PURE__ */ S("input", {
|
|
1399
2028
|
className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
1400
2029
|
placeholder: "Name",
|
|
1401
2030
|
name: "name",
|
|
@@ -1404,11 +2033,11 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1404
2033
|
onBlur: n,
|
|
1405
2034
|
required: !0
|
|
1406
2035
|
})] }),
|
|
1407
|
-
/* @__PURE__ */
|
|
2036
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
1408
2037
|
htmlFor: "email",
|
|
1409
2038
|
className: "font-medium text-sm",
|
|
1410
2039
|
children: "Email"
|
|
1411
|
-
}), /* @__PURE__ */
|
|
2040
|
+
}), /* @__PURE__ */ S("input", {
|
|
1412
2041
|
className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
1413
2042
|
placeholder: "Email",
|
|
1414
2043
|
name: "email",
|
|
@@ -1418,32 +2047,32 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1418
2047
|
type: "email",
|
|
1419
2048
|
required: !0
|
|
1420
2049
|
})] }),
|
|
1421
|
-
s && /* @__PURE__ */
|
|
2050
|
+
s && /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
|
|
1422
2051
|
htmlFor: "is_business_purchase",
|
|
1423
2052
|
className: "flex items-center gap-2 text-sm",
|
|
1424
|
-
children: [/* @__PURE__ */
|
|
2053
|
+
children: [/* @__PURE__ */ S("input", {
|
|
1425
2054
|
type: "checkbox",
|
|
1426
2055
|
name: "is_business_purchase",
|
|
1427
2056
|
checked: e.is_business_purchase || !1,
|
|
1428
2057
|
onChange: t,
|
|
1429
2058
|
className: "rounded border-gray-300"
|
|
1430
|
-
}), /* @__PURE__ */
|
|
2059
|
+
}), /* @__PURE__ */ S("span", {
|
|
1431
2060
|
className: "font-medium",
|
|
1432
2061
|
children: "Tax for Business"
|
|
1433
2062
|
})]
|
|
1434
|
-
}), /* @__PURE__ */
|
|
2063
|
+
}), /* @__PURE__ */ S("p", {
|
|
1435
2064
|
className: "mt-1 text-gray-500 text-xs",
|
|
1436
2065
|
children: "Check this if you're purchasing for a business and need a tax-compliant invoice"
|
|
1437
2066
|
})] }),
|
|
1438
|
-
s && e.is_business_purchase && /* @__PURE__ */
|
|
1439
|
-
/* @__PURE__ */
|
|
2067
|
+
s && e.is_business_purchase && /* @__PURE__ */ C(x, { children: [
|
|
2068
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
|
|
1440
2069
|
htmlFor: "business_name",
|
|
1441
2070
|
className: "font-medium text-sm",
|
|
1442
|
-
children: ["Company Name ", /* @__PURE__ */
|
|
2071
|
+
children: ["Company Name ", /* @__PURE__ */ S("span", {
|
|
1443
2072
|
className: "text-red-500",
|
|
1444
2073
|
children: "*"
|
|
1445
2074
|
})]
|
|
1446
|
-
}), /* @__PURE__ */
|
|
2075
|
+
}), /* @__PURE__ */ S("input", {
|
|
1447
2076
|
className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
1448
2077
|
placeholder: "Acme Corporation",
|
|
1449
2078
|
name: "billing_details.name",
|
|
@@ -1452,14 +2081,14 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1452
2081
|
onBlur: n,
|
|
1453
2082
|
required: e.is_business_purchase
|
|
1454
2083
|
})] }),
|
|
1455
|
-
/* @__PURE__ */
|
|
2084
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
|
|
1456
2085
|
htmlFor: "business_tax_id",
|
|
1457
2086
|
className: "font-medium text-sm",
|
|
1458
|
-
children: ["Tax ID / GST Number ", /* @__PURE__ */
|
|
2087
|
+
children: ["Tax ID / GST Number ", /* @__PURE__ */ S("span", {
|
|
1459
2088
|
className: "text-red-500",
|
|
1460
2089
|
children: "*"
|
|
1461
2090
|
})]
|
|
1462
|
-
}), /* @__PURE__ */
|
|
2091
|
+
}), /* @__PURE__ */ S("input", {
|
|
1463
2092
|
className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
1464
2093
|
placeholder: "GST123456789",
|
|
1465
2094
|
name: "billing_details.tax_id",
|
|
@@ -1468,15 +2097,15 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1468
2097
|
onBlur: n,
|
|
1469
2098
|
required: e.is_business_purchase
|
|
1470
2099
|
})] }),
|
|
1471
|
-
/* @__PURE__ */
|
|
1472
|
-
/* @__PURE__ */
|
|
2100
|
+
/* @__PURE__ */ C("div", { children: [
|
|
2101
|
+
/* @__PURE__ */ C("p", {
|
|
1473
2102
|
className: "mb-1 font-medium text-sm",
|
|
1474
|
-
children: ["Business Address ", /* @__PURE__ */
|
|
2103
|
+
children: ["Business Address ", /* @__PURE__ */ S("span", {
|
|
1475
2104
|
className: "text-red-500",
|
|
1476
2105
|
children: "*"
|
|
1477
2106
|
})]
|
|
1478
2107
|
}),
|
|
1479
|
-
/* @__PURE__ */
|
|
2108
|
+
/* @__PURE__ */ S("input", {
|
|
1480
2109
|
className: "mb-2 w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
1481
2110
|
placeholder: "Street Address Line 1",
|
|
1482
2111
|
name: "billing_details.address.line1",
|
|
@@ -1485,7 +2114,7 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1485
2114
|
onBlur: n,
|
|
1486
2115
|
required: e.is_business_purchase
|
|
1487
2116
|
}),
|
|
1488
|
-
/* @__PURE__ */
|
|
2117
|
+
/* @__PURE__ */ S("input", {
|
|
1489
2118
|
className: "mb-2 w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
1490
2119
|
placeholder: "Street Address Line 2 (Optional)",
|
|
1491
2120
|
name: "billing_details.address.line2",
|
|
@@ -1493,9 +2122,9 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1493
2122
|
onChange: t,
|
|
1494
2123
|
onBlur: n
|
|
1495
2124
|
}),
|
|
1496
|
-
/* @__PURE__ */
|
|
2125
|
+
/* @__PURE__ */ C("div", {
|
|
1497
2126
|
className: "grid grid-cols-2 gap-2",
|
|
1498
|
-
children: [/* @__PURE__ */
|
|
2127
|
+
children: [/* @__PURE__ */ S("input", {
|
|
1499
2128
|
className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
1500
2129
|
placeholder: "City",
|
|
1501
2130
|
name: "billing_details.address.city",
|
|
@@ -1503,7 +2132,7 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1503
2132
|
onChange: t,
|
|
1504
2133
|
onBlur: n,
|
|
1505
2134
|
required: e.is_business_purchase
|
|
1506
|
-
}), /* @__PURE__ */
|
|
2135
|
+
}), /* @__PURE__ */ S("input", {
|
|
1507
2136
|
className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
1508
2137
|
placeholder: "State/Province",
|
|
1509
2138
|
name: "billing_details.address.state",
|
|
@@ -1513,9 +2142,9 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1513
2142
|
required: e.is_business_purchase
|
|
1514
2143
|
})]
|
|
1515
2144
|
}),
|
|
1516
|
-
/* @__PURE__ */
|
|
2145
|
+
/* @__PURE__ */ C("div", {
|
|
1517
2146
|
className: "mt-2 grid grid-cols-2 gap-2",
|
|
1518
|
-
children: [/* @__PURE__ */
|
|
2147
|
+
children: [/* @__PURE__ */ S("input", {
|
|
1519
2148
|
className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
1520
2149
|
placeholder: "Postal Code",
|
|
1521
2150
|
name: "billing_details.address.postal_code",
|
|
@@ -1523,7 +2152,7 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1523
2152
|
onChange: t,
|
|
1524
2153
|
onBlur: n,
|
|
1525
2154
|
required: e.is_business_purchase
|
|
1526
|
-
}), /* @__PURE__ */
|
|
2155
|
+
}), /* @__PURE__ */ S("input", {
|
|
1527
2156
|
className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
1528
2157
|
placeholder: "Country",
|
|
1529
2158
|
name: "billing_details.address.country",
|
|
@@ -1535,15 +2164,15 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1535
2164
|
})
|
|
1536
2165
|
] })
|
|
1537
2166
|
] }),
|
|
1538
|
-
/* @__PURE__ */
|
|
2167
|
+
/* @__PURE__ */ C("div", {
|
|
1539
2168
|
className: "flex flex-col-reverse justify-end gap-4 md:flex-row",
|
|
1540
|
-
children: [/* @__PURE__ */
|
|
2169
|
+
children: [/* @__PURE__ */ S(Q, {
|
|
1541
2170
|
className: "rounded-lg bg-gray-100 px-6 py-2 font-semibold text-black hover:bg-gray-200",
|
|
1542
2171
|
type: "button",
|
|
1543
2172
|
onClick: a,
|
|
1544
2173
|
disabled: i,
|
|
1545
2174
|
children: "Back"
|
|
1546
|
-
}), /* @__PURE__ */
|
|
2175
|
+
}), /* @__PURE__ */ S(Q, {
|
|
1547
2176
|
className: "rounded-lg bg-brand px-6 py-2 font-semibold text-brand-foreground hover:opacity-90",
|
|
1548
2177
|
type: "submit",
|
|
1549
2178
|
isLoading: i,
|
|
@@ -1552,57 +2181,57 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1552
2181
|
})]
|
|
1553
2182
|
})
|
|
1554
2183
|
]
|
|
1555
|
-
}),
|
|
2184
|
+
}), Kn = {
|
|
1556
2185
|
USD: "$",
|
|
1557
2186
|
EUR: "€",
|
|
1558
2187
|
GBP: "£",
|
|
1559
2188
|
INR: "₹"
|
|
1560
|
-
},
|
|
2189
|
+
}, $ = (e) => e?.unit_amount ? `${Kn[e.currency ?? "INR"]} ${(e.unit_amount ?? 0) / 100}` : "Free", qn = (e) => {
|
|
1561
2190
|
if (!e) return null;
|
|
1562
2191
|
let t = e.tax_enabled ?? !1, n = e.tax_inclusive ?? !1, r = e.taxes ?? [];
|
|
1563
2192
|
return !t || r.length === 0 ? null : n ? "(inclusive of taxes)" : "+ taxes";
|
|
1564
|
-
},
|
|
2193
|
+
}, Jn = (e) => !!(e?.taxes && e.taxes.length > 0 && e.tax_amount !== void 0), Yn = (e) => {
|
|
1565
2194
|
if (!e) return !1;
|
|
1566
2195
|
let t = e;
|
|
1567
2196
|
return t.tax_enabled === !0 && t.taxes !== void 0 && t.taxes.length > 0 && t.subtotal !== void 0;
|
|
1568
|
-
},
|
|
2197
|
+
}, Xn = (e, t) => t ? t.total_amount ?? t.sale_amount ?? 0 : Yn(e) ? e.total ?? e.unit_amount ?? 0 : e?.unit_amount ?? 0, Zn = (e, t) => !t || e.tickets.length === 0 ? !0 : e.tickets.some((e) => typeof e == "string" ? e === t : e._id === t), Qn = ({ couponCode: e, onCouponCodeChange: t, couponError: n, couponLoading: r, onValidateCoupon: i, publicCoupons: a, onBack: o, selectedTicket: s }) => {
|
|
1569
2198
|
let c = [...a].sort((e, t) => {
|
|
1570
|
-
let n =
|
|
2199
|
+
let n = Zn(e, s?._id), r = Zn(t, s?._id);
|
|
1571
2200
|
return n && !r ? -1 : !n && r ? 1 : 0;
|
|
1572
2201
|
});
|
|
1573
|
-
return /* @__PURE__ */
|
|
1574
|
-
/* @__PURE__ */
|
|
2202
|
+
return /* @__PURE__ */ C("div", { children: [
|
|
2203
|
+
/* @__PURE__ */ C("div", {
|
|
1575
2204
|
className: "flex items-center justify-between text-center",
|
|
1576
2205
|
children: [
|
|
1577
|
-
/* @__PURE__ */
|
|
2206
|
+
/* @__PURE__ */ S("button", {
|
|
1578
2207
|
type: "button",
|
|
1579
2208
|
className: "rounded-md p-2 hover:bg-gray-50 focus:outline-none",
|
|
1580
2209
|
"aria-label": "Back",
|
|
1581
2210
|
onClick: o,
|
|
1582
|
-
children: /* @__PURE__ */
|
|
2211
|
+
children: /* @__PURE__ */ S(ie, { className: "size-4" })
|
|
1583
2212
|
}),
|
|
1584
|
-
/* @__PURE__ */
|
|
2213
|
+
/* @__PURE__ */ C("p", {
|
|
1585
2214
|
className: "font-semibold text-md",
|
|
1586
2215
|
children: ["Apply Coupon for ", s?.title]
|
|
1587
2216
|
}),
|
|
1588
|
-
/* @__PURE__ */
|
|
2217
|
+
/* @__PURE__ */ S("div", { className: "w-4" })
|
|
1589
2218
|
]
|
|
1590
2219
|
}),
|
|
1591
|
-
/* @__PURE__ */
|
|
2220
|
+
/* @__PURE__ */ C("div", {
|
|
1592
2221
|
className: "mt-2 flex gap-4",
|
|
1593
|
-
children: [/* @__PURE__ */
|
|
2222
|
+
children: [/* @__PURE__ */ C("div", {
|
|
1594
2223
|
className: "w-full",
|
|
1595
|
-
children: [/* @__PURE__ */
|
|
2224
|
+
children: [/* @__PURE__ */ S("input", {
|
|
1596
2225
|
className: "w-full rounded border border-gray-300 px-3 py-2 focus:border-brand focus:outline-none",
|
|
1597
2226
|
type: "text",
|
|
1598
2227
|
placeholder: "Enter Coupon Code",
|
|
1599
2228
|
value: e,
|
|
1600
2229
|
onChange: (e) => t(e.target.value)
|
|
1601
|
-
}), n && /* @__PURE__ */
|
|
2230
|
+
}), n && /* @__PURE__ */ S("p", {
|
|
1602
2231
|
className: "mt-1 text-red-400 text-xs",
|
|
1603
2232
|
children: n
|
|
1604
2233
|
})]
|
|
1605
|
-
}), /* @__PURE__ */
|
|
2234
|
+
}), /* @__PURE__ */ S(Q, {
|
|
1606
2235
|
"aria-label": "Apply Coupon",
|
|
1607
2236
|
onClick: () => i(),
|
|
1608
2237
|
className: "rounded-lg bg-brand px-3 text-brand-foreground hover:opacity-90",
|
|
@@ -1611,55 +2240,55 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1611
2240
|
zIndex: e ? 1 : -1
|
|
1612
2241
|
},
|
|
1613
2242
|
isLoading: r,
|
|
1614
|
-
children: /* @__PURE__ */
|
|
2243
|
+
children: /* @__PURE__ */ S(re, { className: "h-fit" })
|
|
1615
2244
|
})]
|
|
1616
2245
|
}),
|
|
1617
|
-
c.length > 0 && /* @__PURE__ */
|
|
2246
|
+
c.length > 0 && /* @__PURE__ */ C("div", {
|
|
1618
2247
|
className: "mt-4 flex flex-col gap-4",
|
|
1619
|
-
children: [c.filter((e) =>
|
|
2248
|
+
children: [c.filter((e) => Zn(e, s?._id)).length > 0 && /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
1620
2249
|
className: "mb-2 text-gray-600 text-sm",
|
|
1621
2250
|
children: "Available Coupons"
|
|
1622
|
-
}), /* @__PURE__ */
|
|
2251
|
+
}), /* @__PURE__ */ S("div", {
|
|
1623
2252
|
className: "flex flex-col gap-2",
|
|
1624
|
-
children: c.filter((e) =>
|
|
2253
|
+
children: c.filter((e) => Zn(e, s?._id)).map((e) => /* @__PURE__ */ C("button", {
|
|
1625
2254
|
type: "button",
|
|
1626
2255
|
className: "flex flex-col gap-1 rounded-md border border-gray-300 border-dashed px-3 py-2 text-left transition hover:border-gray-400 hover:bg-gray-50",
|
|
1627
2256
|
onClick: () => {
|
|
1628
2257
|
i(e.code), t(e.code);
|
|
1629
2258
|
},
|
|
1630
|
-
children: [/* @__PURE__ */
|
|
2259
|
+
children: [/* @__PURE__ */ C("div", {
|
|
1631
2260
|
className: "flex w-full items-center justify-between",
|
|
1632
|
-
children: [/* @__PURE__ */
|
|
2261
|
+
children: [/* @__PURE__ */ S("span", {
|
|
1633
2262
|
className: "font-medium",
|
|
1634
2263
|
children: e.code
|
|
1635
|
-
}), /* @__PURE__ */
|
|
2264
|
+
}), /* @__PURE__ */ S("span", {
|
|
1636
2265
|
className: "text-gray-500 text-sm",
|
|
1637
|
-
children: e.kind === "percent" ? `${e.percent_off}% off` : `${
|
|
2266
|
+
children: e.kind === "percent" ? `${e.percent_off}% off` : `${Kn[e.currency ?? "INR"]} ${(e.amount_off ?? 0) / 100} off`
|
|
1638
2267
|
})]
|
|
1639
|
-
}), e.description && /* @__PURE__ */
|
|
2268
|
+
}), e.description && /* @__PURE__ */ S("span", {
|
|
1640
2269
|
className: "text-gray-500 text-xs",
|
|
1641
2270
|
children: e.description
|
|
1642
2271
|
})]
|
|
1643
2272
|
}, e._id))
|
|
1644
|
-
})] }), c.filter((e) =>
|
|
2273
|
+
})] }), c.filter((e) => !Zn(e, s?._id)).length > 0 && /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
1645
2274
|
className: "mb-2 text-gray-400 text-sm",
|
|
1646
2275
|
children: "Not Applicable"
|
|
1647
|
-
}), /* @__PURE__ */
|
|
2276
|
+
}), /* @__PURE__ */ S("div", {
|
|
1648
2277
|
className: "flex flex-col gap-2",
|
|
1649
|
-
children: c.filter((e) =>
|
|
2278
|
+
children: c.filter((e) => !Zn(e, s?._id)).map((e) => /* @__PURE__ */ C("button", {
|
|
1650
2279
|
type: "button",
|
|
1651
2280
|
disabled: !0,
|
|
1652
2281
|
className: "flex cursor-not-allowed flex-col gap-1 rounded-md border border-gray-200 border-dashed px-3 py-2 text-left opacity-50",
|
|
1653
|
-
children: [/* @__PURE__ */
|
|
2282
|
+
children: [/* @__PURE__ */ C("div", {
|
|
1654
2283
|
className: "flex w-full items-center justify-between",
|
|
1655
|
-
children: [/* @__PURE__ */
|
|
2284
|
+
children: [/* @__PURE__ */ S("span", {
|
|
1656
2285
|
className: "font-medium",
|
|
1657
2286
|
children: e.code
|
|
1658
|
-
}), /* @__PURE__ */
|
|
2287
|
+
}), /* @__PURE__ */ S("span", {
|
|
1659
2288
|
className: "text-gray-500 text-sm",
|
|
1660
|
-
children: e.kind === "percent" ? `${e.percent_off}% off` : `${
|
|
2289
|
+
children: e.kind === "percent" ? `${e.percent_off}% off` : `${Kn[e.currency ?? "INR"]} ${(e.amount_off ?? 0) / 100} off`
|
|
1661
2290
|
})]
|
|
1662
|
-
}), e.description && /* @__PURE__ */
|
|
2291
|
+
}), e.description && /* @__PURE__ */ S("span", {
|
|
1663
2292
|
className: "text-gray-500 text-xs",
|
|
1664
2293
|
children: e.description
|
|
1665
2294
|
})]
|
|
@@ -1667,7 +2296,7 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1667
2296
|
})] })]
|
|
1668
2297
|
})
|
|
1669
2298
|
] });
|
|
1670
|
-
},
|
|
2299
|
+
}, $n = (e) => {
|
|
1671
2300
|
let t = new Date(e);
|
|
1672
2301
|
return `${new Intl.DateTimeFormat("en-GB", {
|
|
1673
2302
|
day: "numeric",
|
|
@@ -1678,24 +2307,24 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1678
2307
|
minute: "2-digit",
|
|
1679
2308
|
hour12: !0
|
|
1680
2309
|
}).format(t)}`;
|
|
1681
|
-
},
|
|
1682
|
-
let [r, i] =
|
|
2310
|
+
}, er = ({ ticketData: e, paymentData: t, type: n }) => {
|
|
2311
|
+
let [r, i] = N(!0), a = (t.total_amount || t.unit_amount) / 100, o = t.unit_amount === 0, s = (e) => new Intl.NumberFormat("en-IN", {
|
|
1683
2312
|
style: "currency",
|
|
1684
2313
|
currency: t.currency || "INR",
|
|
1685
2314
|
minimumFractionDigits: 0
|
|
1686
2315
|
}).format(e);
|
|
1687
|
-
return /* @__PURE__ */
|
|
2316
|
+
return /* @__PURE__ */ S(P.Root, {
|
|
1688
2317
|
open: r,
|
|
1689
2318
|
onOpenChange: (e) => i(e),
|
|
1690
|
-
children: /* @__PURE__ */
|
|
2319
|
+
children: /* @__PURE__ */ C(P.Portal, { children: [/* @__PURE__ */ S(P.Backdrop, { className: "fixed inset-0 z-50 bg-black/50" }), /* @__PURE__ */ C(P.Popup, {
|
|
1691
2320
|
className: "fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100vh-2rem)] w-full max-w-md -translate-x-1/2 -translate-y-1/2 flex-col overflow-y-auto rounded-2xl bg-white shadow-2xl",
|
|
1692
2321
|
children: [
|
|
1693
|
-
/* @__PURE__ */
|
|
2322
|
+
/* @__PURE__ */ C("div", {
|
|
1694
2323
|
className: "bg-gradient-to-br from-green-50 to-emerald-50 px-6 py-6 text-center",
|
|
1695
2324
|
children: [
|
|
1696
|
-
/* @__PURE__ */
|
|
2325
|
+
/* @__PURE__ */ S("div", {
|
|
1697
2326
|
className: "mx-auto mb-3 flex size-14 items-center justify-center rounded-full bg-green-100 ring-4 ring-green-50",
|
|
1698
|
-
children: /* @__PURE__ */
|
|
2327
|
+
children: /* @__PURE__ */ C("svg", {
|
|
1699
2328
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1700
2329
|
width: "28",
|
|
1701
2330
|
height: "28",
|
|
@@ -1707,72 +2336,72 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1707
2336
|
strokeLinejoin: "round",
|
|
1708
2337
|
className: "text-green-600",
|
|
1709
2338
|
"aria-hidden": "true",
|
|
1710
|
-
children: [/* @__PURE__ */
|
|
2339
|
+
children: [/* @__PURE__ */ S("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }), /* @__PURE__ */ S("polyline", { points: "22 4 12 14.01 9 11.01" })]
|
|
1711
2340
|
})
|
|
1712
2341
|
}),
|
|
1713
|
-
/* @__PURE__ */
|
|
2342
|
+
/* @__PURE__ */ S(P.Title, {
|
|
1714
2343
|
className: "font-bold text-gray-900 text-lg",
|
|
1715
2344
|
children: n === "view" ? "Booking Details" : "Tickets Confirmed!"
|
|
1716
2345
|
}),
|
|
1717
|
-
/* @__PURE__ */
|
|
2346
|
+
/* @__PURE__ */ S(P.Description, {
|
|
1718
2347
|
className: "mt-1 text-gray-600 text-sm",
|
|
1719
2348
|
children: n === "confirm" ? "Your tickets have been confirmed. A confirmation email is on its way." : "Here are the details about your booking."
|
|
1720
2349
|
})
|
|
1721
2350
|
]
|
|
1722
2351
|
}),
|
|
1723
|
-
/* @__PURE__ */
|
|
2352
|
+
/* @__PURE__ */ C("div", {
|
|
1724
2353
|
className: "px-6 py-5",
|
|
1725
|
-
children: [/* @__PURE__ */
|
|
2354
|
+
children: [/* @__PURE__ */ C("div", {
|
|
1726
2355
|
className: "relative overflow-hidden rounded-xl border border-gray-200 bg-white",
|
|
1727
2356
|
children: [
|
|
1728
|
-
/* @__PURE__ */
|
|
1729
|
-
/* @__PURE__ */
|
|
1730
|
-
/* @__PURE__ */
|
|
2357
|
+
/* @__PURE__ */ S("div", { className: "absolute top-1/2 -left-3 size-6 -translate-y-1/2 rounded-full bg-gray-100" }),
|
|
2358
|
+
/* @__PURE__ */ S("div", { className: "absolute top-1/2 -right-3 size-6 -translate-y-1/2 rounded-full bg-gray-100" }),
|
|
2359
|
+
/* @__PURE__ */ C("div", {
|
|
1731
2360
|
className: "px-5 py-4",
|
|
1732
2361
|
children: [
|
|
1733
|
-
t.qr_image && /* @__PURE__ */
|
|
2362
|
+
t.qr_image && /* @__PURE__ */ S("div", {
|
|
1734
2363
|
className: "mb-4 flex flex-col items-center",
|
|
1735
|
-
children: /* @__PURE__ */
|
|
2364
|
+
children: /* @__PURE__ */ S("div", {
|
|
1736
2365
|
className: "rounded-lg border border-gray-200 bg-white p-2",
|
|
1737
|
-
children: /* @__PURE__ */
|
|
2366
|
+
children: /* @__PURE__ */ S("img", {
|
|
1738
2367
|
src: t.qr_image.location,
|
|
1739
2368
|
alt: "Booking QR Code",
|
|
1740
2369
|
className: "size-24"
|
|
1741
2370
|
})
|
|
1742
2371
|
})
|
|
1743
2372
|
}),
|
|
1744
|
-
/* @__PURE__ */
|
|
2373
|
+
/* @__PURE__ */ C("div", {
|
|
1745
2374
|
className: "mb-4 flex items-center justify-between rounded-lg bg-gray-50 px-3 py-2.5",
|
|
1746
|
-
children: [/* @__PURE__ */
|
|
2375
|
+
children: [/* @__PURE__ */ S("span", {
|
|
1747
2376
|
className: "font-medium text-gray-500 text-xs uppercase tracking-wide",
|
|
1748
2377
|
children: "Booking ID"
|
|
1749
|
-
}), /* @__PURE__ */
|
|
2378
|
+
}), /* @__PURE__ */ S("span", {
|
|
1750
2379
|
className: "font-mono font-semibold text-gray-900 text-sm",
|
|
1751
2380
|
children: t._id
|
|
1752
2381
|
})]
|
|
1753
2382
|
}),
|
|
1754
|
-
/* @__PURE__ */
|
|
1755
|
-
/* @__PURE__ */
|
|
2383
|
+
/* @__PURE__ */ S("div", { className: "my-4 border-gray-200 border-t border-dashed" }),
|
|
2384
|
+
/* @__PURE__ */ S("div", {
|
|
1756
2385
|
className: "space-y-3",
|
|
1757
2386
|
children: t.attendees.map((t) => {
|
|
1758
2387
|
let n = e.find((e) => e._id === t.ticket._id);
|
|
1759
|
-
return n ? /* @__PURE__ */
|
|
2388
|
+
return n ? /* @__PURE__ */ C("div", {
|
|
1760
2389
|
className: "flex items-center justify-between",
|
|
1761
|
-
children: [/* @__PURE__ */
|
|
2390
|
+
children: [/* @__PURE__ */ C("div", {
|
|
1762
2391
|
className: "min-w-0 flex-1",
|
|
1763
|
-
children: [/* @__PURE__ */
|
|
2392
|
+
children: [/* @__PURE__ */ S("p", {
|
|
1764
2393
|
className: "truncate font-medium text-gray-900 text-sm",
|
|
1765
2394
|
children: t.name
|
|
1766
|
-
}), /* @__PURE__ */
|
|
2395
|
+
}), /* @__PURE__ */ S("p", {
|
|
1767
2396
|
className: "truncate text-gray-500 text-xs",
|
|
1768
2397
|
children: t.email
|
|
1769
2398
|
})]
|
|
1770
|
-
}), /* @__PURE__ */
|
|
2399
|
+
}), /* @__PURE__ */ C("div", {
|
|
1771
2400
|
className: "ml-3 shrink-0 text-right",
|
|
1772
|
-
children: [/* @__PURE__ */
|
|
2401
|
+
children: [/* @__PURE__ */ S("p", {
|
|
1773
2402
|
className: "font-medium text-gray-900 text-sm",
|
|
1774
2403
|
children: n.title
|
|
1775
|
-
}), /* @__PURE__ */
|
|
2404
|
+
}), /* @__PURE__ */ S("p", {
|
|
1776
2405
|
className: "text-gray-500 text-xs",
|
|
1777
2406
|
children: s(t.ticket.unit_amount / 100)
|
|
1778
2407
|
})]
|
|
@@ -1780,63 +2409,63 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1780
2409
|
}, t._id) : null;
|
|
1781
2410
|
})
|
|
1782
2411
|
}),
|
|
1783
|
-
/* @__PURE__ */
|
|
1784
|
-
!o && /* @__PURE__ */
|
|
2412
|
+
/* @__PURE__ */ S("div", { className: "my-4 border-gray-200 border-t border-dashed" }),
|
|
2413
|
+
!o && /* @__PURE__ */ C("div", {
|
|
1785
2414
|
className: "space-y-1.5 text-sm",
|
|
1786
2415
|
children: [
|
|
1787
|
-
/* @__PURE__ */
|
|
2416
|
+
/* @__PURE__ */ C("div", {
|
|
1788
2417
|
className: "flex justify-between",
|
|
1789
|
-
children: [/* @__PURE__ */
|
|
2418
|
+
children: [/* @__PURE__ */ S("span", {
|
|
1790
2419
|
className: "text-gray-500",
|
|
1791
2420
|
children: "Base Amount"
|
|
1792
|
-
}), /* @__PURE__ */
|
|
2421
|
+
}), /* @__PURE__ */ S("span", {
|
|
1793
2422
|
className: "font-medium text-gray-700",
|
|
1794
2423
|
children: s(t.unit_amount / 100)
|
|
1795
2424
|
})]
|
|
1796
2425
|
}),
|
|
1797
|
-
t.discount > 0 && /* @__PURE__ */
|
|
2426
|
+
t.discount > 0 && /* @__PURE__ */ C("div", {
|
|
1798
2427
|
className: "flex justify-between text-green-600",
|
|
1799
|
-
children: [/* @__PURE__ */
|
|
2428
|
+
children: [/* @__PURE__ */ S("span", { children: "Discount" }), /* @__PURE__ */ C("span", {
|
|
1800
2429
|
className: "font-medium",
|
|
1801
2430
|
children: ["- ", s(t.discount / 100)]
|
|
1802
2431
|
})]
|
|
1803
2432
|
}),
|
|
1804
|
-
t.taxes && Array.isArray(t.taxes) && t.taxes.length > 0 && t.taxes.map((e, t) => /* @__PURE__ */
|
|
2433
|
+
t.taxes && Array.isArray(t.taxes) && t.taxes.length > 0 && t.taxes.map((e, t) => /* @__PURE__ */ C("div", {
|
|
1805
2434
|
className: "flex justify-between",
|
|
1806
|
-
children: [/* @__PURE__ */
|
|
2435
|
+
children: [/* @__PURE__ */ S("span", {
|
|
1807
2436
|
className: "text-gray-500",
|
|
1808
2437
|
children: e.label
|
|
1809
|
-
}), /* @__PURE__ */
|
|
2438
|
+
}), /* @__PURE__ */ S("span", {
|
|
1810
2439
|
className: "font-medium text-gray-700",
|
|
1811
2440
|
children: s(e.amount / 100)
|
|
1812
2441
|
})]
|
|
1813
2442
|
}, t)),
|
|
1814
|
-
/* @__PURE__ */
|
|
2443
|
+
/* @__PURE__ */ C("div", {
|
|
1815
2444
|
className: "flex justify-between border-gray-200 border-t pt-2 font-semibold text-gray-900",
|
|
1816
|
-
children: [/* @__PURE__ */
|
|
2445
|
+
children: [/* @__PURE__ */ S("span", { children: "Total Paid" }), /* @__PURE__ */ S("span", { children: s(a) })]
|
|
1817
2446
|
})
|
|
1818
2447
|
]
|
|
1819
2448
|
}),
|
|
1820
|
-
o && /* @__PURE__ */
|
|
2449
|
+
o && /* @__PURE__ */ C("div", {
|
|
1821
2450
|
className: "flex items-center justify-between font-semibold text-gray-900",
|
|
1822
|
-
children: [/* @__PURE__ */
|
|
2451
|
+
children: [/* @__PURE__ */ S("span", { children: "Total" }), /* @__PURE__ */ S("span", { children: "Free" })]
|
|
1823
2452
|
})
|
|
1824
2453
|
]
|
|
1825
2454
|
})
|
|
1826
2455
|
]
|
|
1827
|
-
}), /* @__PURE__ */
|
|
2456
|
+
}), /* @__PURE__ */ S("p", {
|
|
1828
2457
|
className: "mt-3 text-center text-gray-400 text-xs",
|
|
1829
|
-
children:
|
|
2458
|
+
children: $n(t.created_at)
|
|
1830
2459
|
})]
|
|
1831
2460
|
}),
|
|
1832
|
-
/* @__PURE__ */
|
|
2461
|
+
/* @__PURE__ */ C("div", {
|
|
1833
2462
|
className: "flex flex-col gap-2 px-6 pb-5",
|
|
1834
|
-
children: [t.invoice?.location && /* @__PURE__ */
|
|
2463
|
+
children: [t.invoice?.location && /* @__PURE__ */ C("a", {
|
|
1835
2464
|
href: t.invoice.location,
|
|
1836
2465
|
target: "_blank",
|
|
1837
2466
|
rel: "noopener noreferrer",
|
|
1838
2467
|
className: "flex w-full items-center justify-center gap-2 rounded-lg border border-gray-200 px-4 py-2.5 font-medium text-gray-700 text-sm transition-colors hover:bg-gray-50",
|
|
1839
|
-
children: [/* @__PURE__ */
|
|
2468
|
+
children: [/* @__PURE__ */ C("svg", {
|
|
1840
2469
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1841
2470
|
width: "16",
|
|
1842
2471
|
height: "16",
|
|
@@ -1848,9 +2477,9 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1848
2477
|
strokeLinejoin: "round",
|
|
1849
2478
|
"aria-hidden": "true",
|
|
1850
2479
|
children: [
|
|
1851
|
-
/* @__PURE__ */
|
|
1852
|
-
/* @__PURE__ */
|
|
1853
|
-
/* @__PURE__ */
|
|
2480
|
+
/* @__PURE__ */ S("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
2481
|
+
/* @__PURE__ */ S("polyline", { points: "7 10 12 15 17 10" }),
|
|
2482
|
+
/* @__PURE__ */ S("line", {
|
|
1854
2483
|
x1: "12",
|
|
1855
2484
|
x2: "12",
|
|
1856
2485
|
y1: "15",
|
|
@@ -1858,7 +2487,7 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1858
2487
|
})
|
|
1859
2488
|
]
|
|
1860
2489
|
}), "Download Invoice"]
|
|
1861
|
-
}), /* @__PURE__ */
|
|
2490
|
+
}), /* @__PURE__ */ S(P.Close, {
|
|
1862
2491
|
className: "w-full rounded-lg bg-gray-900 px-4 py-2.5 font-medium text-sm text-white transition-colors hover:bg-gray-800",
|
|
1863
2492
|
children: "Done"
|
|
1864
2493
|
})]
|
|
@@ -1866,123 +2495,123 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1866
2495
|
]
|
|
1867
2496
|
})] })
|
|
1868
2497
|
});
|
|
1869
|
-
},
|
|
2498
|
+
}, tr = ({ isOpen: e, onClose: t, stripePromise: n, clientSecret: r, onComplete: i }) => !n || !r ? null : /* @__PURE__ */ S(P.Root, {
|
|
1870
2499
|
open: e,
|
|
1871
2500
|
onOpenChange: (e) => {
|
|
1872
2501
|
e || t();
|
|
1873
2502
|
},
|
|
1874
|
-
children: /* @__PURE__ */
|
|
2503
|
+
children: /* @__PURE__ */ C(P.Portal, { children: [/* @__PURE__ */ S(P.Backdrop, { className: "fixed inset-0 z-[100] bg-black/50" }), /* @__PURE__ */ C(P.Popup, {
|
|
1875
2504
|
className: "fixed top-8 left-1/2 z-[100] flex max-h-[calc(100vh-4rem)] min-h-[500px] w-[98vw] -translate-x-1/2 flex-col overflow-hidden rounded-2xl bg-white shadow-2xl md:top-10 md:w-auto md:max-w-[1000px] lg:max-w-[1100px]",
|
|
1876
|
-
children: [/* @__PURE__ */
|
|
2505
|
+
children: [/* @__PURE__ */ S(P.Close, {
|
|
1877
2506
|
className: "absolute top-4 right-4 z-10 rounded-full bg-white/90 p-2.5 text-gray-500 shadow-md backdrop-blur-sm transition-all hover:bg-white hover:text-gray-700",
|
|
1878
|
-
children: /* @__PURE__ */
|
|
1879
|
-
}), /* @__PURE__ */
|
|
2507
|
+
children: /* @__PURE__ */ S(se, { className: "size-5" })
|
|
2508
|
+
}), /* @__PURE__ */ S("div", {
|
|
1880
2509
|
className: "flex-1 overflow-y-auto rounded-2xl py-6",
|
|
1881
|
-
children: /* @__PURE__ */
|
|
2510
|
+
children: /* @__PURE__ */ S(le, {
|
|
1882
2511
|
stripe: n,
|
|
1883
2512
|
options: {
|
|
1884
2513
|
clientSecret: r,
|
|
1885
2514
|
onComplete: i
|
|
1886
2515
|
},
|
|
1887
|
-
children: /* @__PURE__ */
|
|
2516
|
+
children: /* @__PURE__ */ S(H, { className: "stripe-embedded-checkout h-full" })
|
|
1888
2517
|
})
|
|
1889
2518
|
})]
|
|
1890
2519
|
})] })
|
|
1891
|
-
}),
|
|
1892
|
-
let l =
|
|
1893
|
-
return /* @__PURE__ */
|
|
2520
|
+
}), nr = ({ tickets: e, selectedTicket: t, onSelectTicket: n, discount: r, couponCode: i, publicCouponsCount: a, onApplyCouponClick: o, onRemoveCoupon: s, onNext: c }) => {
|
|
2521
|
+
let l = Yn(t), u = Jn(r);
|
|
2522
|
+
return /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("div", {
|
|
1894
2523
|
className: "flex max-h-[64dvh] w-full flex-col justify-between gap-6 overflow-y-auto md:max-h-[unset] md:flex-row",
|
|
1895
|
-
children: [/* @__PURE__ */
|
|
2524
|
+
children: [/* @__PURE__ */ S("div", {
|
|
1896
2525
|
className: "flex w-full flex-col gap-3 md:w-[55%]",
|
|
1897
|
-
children: e.map((e) => /* @__PURE__ */
|
|
1898
|
-
className:
|
|
2526
|
+
children: e.map((e) => /* @__PURE__ */ S("div", {
|
|
2527
|
+
className: Wn("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 bg-brand/10 hover:bg-brand/20" : ""),
|
|
1899
2528
|
onClick: () => n(e),
|
|
1900
|
-
children: /* @__PURE__ */
|
|
1901
|
-
/* @__PURE__ */
|
|
2529
|
+
children: /* @__PURE__ */ C("div", { children: [
|
|
2530
|
+
/* @__PURE__ */ S("p", {
|
|
1902
2531
|
className: "text-md",
|
|
1903
2532
|
children: e.title
|
|
1904
2533
|
}),
|
|
1905
|
-
/* @__PURE__ */
|
|
2534
|
+
/* @__PURE__ */ S("p", {
|
|
1906
2535
|
className: "-mt-[2px] mb-1 text-gray-600 text-xs",
|
|
1907
2536
|
children: e.description
|
|
1908
2537
|
}),
|
|
1909
|
-
/* @__PURE__ */
|
|
2538
|
+
/* @__PURE__ */ C("p", {
|
|
1910
2539
|
className: "text-md",
|
|
1911
|
-
children: [
|
|
2540
|
+
children: [$(e), qn(e) && /* @__PURE__ */ C("span", {
|
|
1912
2541
|
className: "text-gray-500 text-sm",
|
|
1913
|
-
children: [" ",
|
|
2542
|
+
children: [" ", qn(e)]
|
|
1914
2543
|
})]
|
|
1915
2544
|
})
|
|
1916
2545
|
] })
|
|
1917
2546
|
}, e._id))
|
|
1918
|
-
}), /* @__PURE__ */
|
|
2547
|
+
}), /* @__PURE__ */ C("div", {
|
|
1919
2548
|
className: "w-full md:w-[45%]",
|
|
1920
|
-
children: [/* @__PURE__ */
|
|
2549
|
+
children: [/* @__PURE__ */ C("div", {
|
|
1921
2550
|
className: "mt-4 flex min-h-[250px] flex-col justify-between rounded-md border border-gray-300 p-4 md:mt-0",
|
|
1922
|
-
children: [/* @__PURE__ */
|
|
2551
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
1923
2552
|
className: "border-b border-b-gray-200 pb-1 text-md",
|
|
1924
2553
|
children: "Confirm Details"
|
|
1925
|
-
}), /* @__PURE__ */
|
|
2554
|
+
}), /* @__PURE__ */ S("div", {
|
|
1926
2555
|
className: "mt-2 flex flex-col gap-2",
|
|
1927
|
-
children: t && /* @__PURE__ */
|
|
2556
|
+
children: t && /* @__PURE__ */ C("div", {
|
|
1928
2557
|
className: "flex justify-between",
|
|
1929
|
-
children: [/* @__PURE__ */
|
|
2558
|
+
children: [/* @__PURE__ */ S("span", {
|
|
1930
2559
|
className: "text-md",
|
|
1931
2560
|
children: t.title
|
|
1932
|
-
}), /* @__PURE__ */
|
|
2561
|
+
}), /* @__PURE__ */ S("span", { children: $({
|
|
1933
2562
|
unit_amount: l ? t.subtotal : t.unit_amount,
|
|
1934
2563
|
currency: t.currency
|
|
1935
2564
|
}) })]
|
|
1936
2565
|
})
|
|
1937
|
-
})] }), r && u ? /* @__PURE__ */
|
|
2566
|
+
})] }), r && u ? /* @__PURE__ */ C("div", {
|
|
1938
2567
|
className: "mt-2",
|
|
1939
2568
|
children: [
|
|
1940
|
-
/* @__PURE__ */
|
|
2569
|
+
/* @__PURE__ */ C("div", {
|
|
1941
2570
|
className: "flex items-center justify-between",
|
|
1942
|
-
children: [/* @__PURE__ */
|
|
2571
|
+
children: [/* @__PURE__ */ S("span", {
|
|
1943
2572
|
className: "text-md",
|
|
1944
2573
|
children: "Subtotal"
|
|
1945
|
-
}), /* @__PURE__ */
|
|
2574
|
+
}), /* @__PURE__ */ S("span", {
|
|
1946
2575
|
className: "text-md",
|
|
1947
|
-
children:
|
|
2576
|
+
children: $({
|
|
1948
2577
|
unit_amount: r.base_amount,
|
|
1949
2578
|
currency: t?.currency
|
|
1950
2579
|
})
|
|
1951
2580
|
})]
|
|
1952
2581
|
}),
|
|
1953
|
-
/* @__PURE__ */
|
|
2582
|
+
/* @__PURE__ */ C("div", {
|
|
1954
2583
|
className: "flex items-center justify-between text-green-600",
|
|
1955
|
-
children: [/* @__PURE__ */
|
|
2584
|
+
children: [/* @__PURE__ */ S("span", {
|
|
1956
2585
|
className: "text-md",
|
|
1957
2586
|
children: "Discount"
|
|
1958
|
-
}), /* @__PURE__ */
|
|
2587
|
+
}), /* @__PURE__ */ C("span", {
|
|
1959
2588
|
className: "text-md",
|
|
1960
2589
|
children: [
|
|
1961
2590
|
"-",
|
|
1962
2591
|
" ",
|
|
1963
|
-
|
|
2592
|
+
$({
|
|
1964
2593
|
unit_amount: r.discount,
|
|
1965
2594
|
currency: t?.currency
|
|
1966
2595
|
})
|
|
1967
2596
|
]
|
|
1968
2597
|
})]
|
|
1969
2598
|
}),
|
|
1970
|
-
/* @__PURE__ */
|
|
2599
|
+
/* @__PURE__ */ C("div", {
|
|
1971
2600
|
className: "flex items-center justify-between border-t border-t-gray-200 pt-1",
|
|
1972
|
-
children: [/* @__PURE__ */
|
|
2601
|
+
children: [/* @__PURE__ */ S("span", {
|
|
1973
2602
|
className: "text-md",
|
|
1974
2603
|
children: "Taxable Amount"
|
|
1975
|
-
}), /* @__PURE__ */
|
|
2604
|
+
}), /* @__PURE__ */ S("span", {
|
|
1976
2605
|
className: "text-md",
|
|
1977
|
-
children:
|
|
2606
|
+
children: $({
|
|
1978
2607
|
unit_amount: r.taxable_amount,
|
|
1979
2608
|
currency: t?.currency
|
|
1980
2609
|
})
|
|
1981
2610
|
})]
|
|
1982
2611
|
}),
|
|
1983
|
-
r.taxes?.map((e, n) => /* @__PURE__ */
|
|
2612
|
+
r.taxes?.map((e, n) => /* @__PURE__ */ C("div", {
|
|
1984
2613
|
className: "flex items-center justify-between text-gray-600",
|
|
1985
|
-
children: [/* @__PURE__ */
|
|
2614
|
+
children: [/* @__PURE__ */ C("span", {
|
|
1986
2615
|
className: "text-sm",
|
|
1987
2616
|
children: [
|
|
1988
2617
|
e.label,
|
|
@@ -1990,94 +2619,94 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1990
2619
|
e.percentage,
|
|
1991
2620
|
"%)"
|
|
1992
2621
|
]
|
|
1993
|
-
}), /* @__PURE__ */
|
|
2622
|
+
}), /* @__PURE__ */ S("span", {
|
|
1994
2623
|
className: "text-sm",
|
|
1995
|
-
children:
|
|
2624
|
+
children: $({
|
|
1996
2625
|
unit_amount: e.amount,
|
|
1997
2626
|
currency: t?.currency
|
|
1998
2627
|
})
|
|
1999
2628
|
})]
|
|
2000
2629
|
}, e.id || e._id || n)),
|
|
2001
|
-
/* @__PURE__ */
|
|
2630
|
+
/* @__PURE__ */ C("div", {
|
|
2002
2631
|
className: "mt-1 flex items-center justify-between border-t border-t-gray-200 pt-1 font-medium",
|
|
2003
|
-
children: [/* @__PURE__ */
|
|
2632
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2004
2633
|
className: "text-md",
|
|
2005
2634
|
children: "Payable"
|
|
2006
|
-
}), /* @__PURE__ */
|
|
2635
|
+
}), /* @__PURE__ */ S("span", {
|
|
2007
2636
|
className: "text-md",
|
|
2008
|
-
children:
|
|
2637
|
+
children: $({
|
|
2009
2638
|
unit_amount: r.total_amount,
|
|
2010
2639
|
currency: t?.currency
|
|
2011
2640
|
})
|
|
2012
2641
|
})]
|
|
2013
2642
|
})
|
|
2014
2643
|
]
|
|
2015
|
-
}) : r ? /* @__PURE__ */
|
|
2644
|
+
}) : r ? /* @__PURE__ */ C("div", {
|
|
2016
2645
|
className: "mt-2",
|
|
2017
2646
|
children: [
|
|
2018
|
-
/* @__PURE__ */
|
|
2647
|
+
/* @__PURE__ */ C("div", {
|
|
2019
2648
|
className: "flex items-center justify-between",
|
|
2020
|
-
children: [/* @__PURE__ */
|
|
2649
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2021
2650
|
className: "text-md",
|
|
2022
2651
|
children: "Subtotal"
|
|
2023
|
-
}), /* @__PURE__ */
|
|
2652
|
+
}), /* @__PURE__ */ S("span", {
|
|
2024
2653
|
className: "text-md",
|
|
2025
|
-
children:
|
|
2654
|
+
children: $({
|
|
2026
2655
|
unit_amount: r.base_amount,
|
|
2027
2656
|
currency: t?.currency
|
|
2028
2657
|
})
|
|
2029
2658
|
})]
|
|
2030
2659
|
}),
|
|
2031
|
-
/* @__PURE__ */
|
|
2660
|
+
/* @__PURE__ */ C("div", {
|
|
2032
2661
|
className: "flex items-center justify-between text-green-600",
|
|
2033
|
-
children: [/* @__PURE__ */
|
|
2662
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2034
2663
|
className: "text-md",
|
|
2035
2664
|
children: "Discount"
|
|
2036
|
-
}), /* @__PURE__ */
|
|
2665
|
+
}), /* @__PURE__ */ C("span", {
|
|
2037
2666
|
className: "text-md",
|
|
2038
2667
|
children: [
|
|
2039
2668
|
"-",
|
|
2040
2669
|
" ",
|
|
2041
|
-
|
|
2670
|
+
$({
|
|
2042
2671
|
unit_amount: r.discount,
|
|
2043
2672
|
currency: t?.currency
|
|
2044
2673
|
})
|
|
2045
2674
|
]
|
|
2046
2675
|
})]
|
|
2047
2676
|
}),
|
|
2048
|
-
/* @__PURE__ */
|
|
2677
|
+
/* @__PURE__ */ C("div", {
|
|
2049
2678
|
className: "mt-1 flex items-center justify-between border-t border-t-gray-200 pt-1 font-medium",
|
|
2050
|
-
children: [/* @__PURE__ */
|
|
2679
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2051
2680
|
className: "text-md",
|
|
2052
2681
|
children: "Payable"
|
|
2053
|
-
}), /* @__PURE__ */
|
|
2682
|
+
}), /* @__PURE__ */ S("span", {
|
|
2054
2683
|
className: "text-md",
|
|
2055
|
-
children:
|
|
2684
|
+
children: $({
|
|
2056
2685
|
unit_amount: r.sale_amount,
|
|
2057
2686
|
currency: t?.currency
|
|
2058
2687
|
})
|
|
2059
2688
|
})]
|
|
2060
2689
|
})
|
|
2061
2690
|
]
|
|
2062
|
-
}) : l ? /* @__PURE__ */
|
|
2691
|
+
}) : l ? /* @__PURE__ */ C("div", {
|
|
2063
2692
|
className: "mt-2",
|
|
2064
2693
|
children: [
|
|
2065
|
-
/* @__PURE__ */
|
|
2694
|
+
/* @__PURE__ */ C("div", {
|
|
2066
2695
|
className: "flex items-center justify-between",
|
|
2067
|
-
children: [/* @__PURE__ */
|
|
2696
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2068
2697
|
className: "text-md",
|
|
2069
2698
|
children: "Subtotal"
|
|
2070
|
-
}), /* @__PURE__ */
|
|
2699
|
+
}), /* @__PURE__ */ S("span", {
|
|
2071
2700
|
className: "text-md",
|
|
2072
|
-
children:
|
|
2701
|
+
children: $({
|
|
2073
2702
|
unit_amount: t.subtotal,
|
|
2074
2703
|
currency: t?.currency
|
|
2075
2704
|
})
|
|
2076
2705
|
})]
|
|
2077
2706
|
}),
|
|
2078
|
-
t.taxes.map((e, n) => /* @__PURE__ */
|
|
2707
|
+
t.taxes.map((e, n) => /* @__PURE__ */ C("div", {
|
|
2079
2708
|
className: "flex items-center justify-between text-gray-600",
|
|
2080
|
-
children: [/* @__PURE__ */
|
|
2709
|
+
children: [/* @__PURE__ */ C("span", {
|
|
2081
2710
|
className: "text-sm",
|
|
2082
2711
|
children: [
|
|
2083
2712
|
e.label,
|
|
@@ -2085,81 +2714,81 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2085
2714
|
e.percentage,
|
|
2086
2715
|
"%)"
|
|
2087
2716
|
]
|
|
2088
|
-
}), /* @__PURE__ */
|
|
2717
|
+
}), /* @__PURE__ */ S("span", {
|
|
2089
2718
|
className: "text-sm",
|
|
2090
|
-
children:
|
|
2719
|
+
children: $({
|
|
2091
2720
|
unit_amount: e.amount,
|
|
2092
2721
|
currency: t?.currency
|
|
2093
2722
|
})
|
|
2094
2723
|
})]
|
|
2095
2724
|
}, e.id || e._id || n)),
|
|
2096
|
-
/* @__PURE__ */
|
|
2725
|
+
/* @__PURE__ */ C("div", {
|
|
2097
2726
|
className: "mt-1 flex items-center justify-between border-t border-t-gray-200 pt-1 font-medium",
|
|
2098
|
-
children: [/* @__PURE__ */
|
|
2727
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2099
2728
|
className: "text-md",
|
|
2100
2729
|
children: "Payable"
|
|
2101
|
-
}), /* @__PURE__ */
|
|
2730
|
+
}), /* @__PURE__ */ S("span", {
|
|
2102
2731
|
className: "text-md",
|
|
2103
|
-
children:
|
|
2732
|
+
children: $({
|
|
2104
2733
|
unit_amount: t.total,
|
|
2105
2734
|
currency: t?.currency
|
|
2106
2735
|
})
|
|
2107
2736
|
})]
|
|
2108
2737
|
}),
|
|
2109
|
-
t.tax_inclusive && /* @__PURE__ */
|
|
2738
|
+
t.tax_inclusive && /* @__PURE__ */ S("p", {
|
|
2110
2739
|
className: "mt-1 text-gray-500 text-xs",
|
|
2111
2740
|
children: "* Price is inclusive of taxes"
|
|
2112
2741
|
})
|
|
2113
2742
|
]
|
|
2114
|
-
}) : /* @__PURE__ */
|
|
2743
|
+
}) : /* @__PURE__ */ S("div", {
|
|
2115
2744
|
className: "mt-2",
|
|
2116
|
-
children: /* @__PURE__ */
|
|
2745
|
+
children: /* @__PURE__ */ C("div", {
|
|
2117
2746
|
className: "flex items-center justify-between font-medium",
|
|
2118
|
-
children: [/* @__PURE__ */
|
|
2747
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2119
2748
|
className: "text-md",
|
|
2120
2749
|
children: "Payable"
|
|
2121
|
-
}), /* @__PURE__ */
|
|
2750
|
+
}), /* @__PURE__ */ S("span", {
|
|
2122
2751
|
className: "text-md",
|
|
2123
|
-
children:
|
|
2752
|
+
children: $(t)
|
|
2124
2753
|
})]
|
|
2125
2754
|
})
|
|
2126
2755
|
})]
|
|
2127
|
-
}), r ? /* @__PURE__ */
|
|
2756
|
+
}), r ? /* @__PURE__ */ S("div", {
|
|
2128
2757
|
className: "flex flex-col justify-between gap-1 py-2",
|
|
2129
|
-
children: /* @__PURE__ */
|
|
2758
|
+
children: /* @__PURE__ */ C("div", {
|
|
2130
2759
|
className: "mt-2 mb-1 space-y-1 rounded-lg border border-green-200 bg-green-50 px-3 py-3",
|
|
2131
|
-
children: [/* @__PURE__ */
|
|
2760
|
+
children: [/* @__PURE__ */ C("div", {
|
|
2132
2761
|
className: "flex items-start justify-between gap-2",
|
|
2133
|
-
children: [/* @__PURE__ */
|
|
2762
|
+
children: [/* @__PURE__ */ C("div", {
|
|
2134
2763
|
className: "flex max-w-16 items-center gap-2",
|
|
2135
|
-
children: [/* @__PURE__ */
|
|
2764
|
+
children: [/* @__PURE__ */ S("div", {
|
|
2136
2765
|
className: "rounded bg-green-500 p-2",
|
|
2137
|
-
children: /* @__PURE__ */
|
|
2766
|
+
children: /* @__PURE__ */ S(V, {
|
|
2138
2767
|
size: 16,
|
|
2139
2768
|
className: "text-white"
|
|
2140
2769
|
})
|
|
2141
|
-
}), /* @__PURE__ */
|
|
2770
|
+
}), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("div", {
|
|
2142
2771
|
className: "font-medium text-green-700 text-xs uppercase opacity-60",
|
|
2143
2772
|
children: "Coupon Applied"
|
|
2144
|
-
}), /* @__PURE__ */
|
|
2773
|
+
}), /* @__PURE__ */ S("div", {
|
|
2145
2774
|
className: "-mt-0.5 max-w-32 truncate font-bold text-green-900 text-sm tracking-wide",
|
|
2146
2775
|
children: i
|
|
2147
2776
|
})] })]
|
|
2148
|
-
}), /* @__PURE__ */
|
|
2777
|
+
}), /* @__PURE__ */ S("button", {
|
|
2149
2778
|
type: "button",
|
|
2150
2779
|
onClick: s,
|
|
2151
2780
|
className: "rounded-md p-1 text-green-600 transition-colors hover:bg-green-100 hover:text-green-800",
|
|
2152
2781
|
"aria-label": "Remove coupon",
|
|
2153
|
-
children: /* @__PURE__ */
|
|
2782
|
+
children: /* @__PURE__ */ S(oe, { size: 18 })
|
|
2154
2783
|
})]
|
|
2155
|
-
}), /* @__PURE__ */
|
|
2784
|
+
}), /* @__PURE__ */ C("div", {
|
|
2156
2785
|
className: "text-green-700 text-xs",
|
|
2157
2786
|
children: [
|
|
2158
2787
|
"You are saving",
|
|
2159
2788
|
" ",
|
|
2160
|
-
/* @__PURE__ */
|
|
2789
|
+
/* @__PURE__ */ S("span", {
|
|
2161
2790
|
className: "font-semibold",
|
|
2162
|
-
children:
|
|
2791
|
+
children: $({
|
|
2163
2792
|
unit_amount: r.discount,
|
|
2164
2793
|
currency: t?.currency
|
|
2165
2794
|
})
|
|
@@ -2167,33 +2796,33 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2167
2796
|
]
|
|
2168
2797
|
})]
|
|
2169
2798
|
})
|
|
2170
|
-
}) : /* @__PURE__ */
|
|
2171
|
-
className:
|
|
2799
|
+
}) : /* @__PURE__ */ C("div", {
|
|
2800
|
+
className: Wn("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"),
|
|
2172
2801
|
onClick: () => t ? o() : null,
|
|
2173
|
-
children: [/* @__PURE__ */
|
|
2802
|
+
children: [/* @__PURE__ */ C("span", {
|
|
2174
2803
|
className: "flex items-center gap-2",
|
|
2175
|
-
children: ["Apply Coupon", a > 0 && /* @__PURE__ */
|
|
2804
|
+
children: ["Apply Coupon", a > 0 && /* @__PURE__ */ S("span", {
|
|
2176
2805
|
className: "rounded-full bg-gray-200 px-2 py-0.5 text-gray-600 text-xs",
|
|
2177
2806
|
children: a
|
|
2178
2807
|
})]
|
|
2179
|
-
}), /* @__PURE__ */
|
|
2808
|
+
}), /* @__PURE__ */ S("span", { children: /* @__PURE__ */ S(ae, {}) })]
|
|
2180
2809
|
})]
|
|
2181
2810
|
})]
|
|
2182
|
-
}), /* @__PURE__ */
|
|
2811
|
+
}), /* @__PURE__ */ S("div", {
|
|
2183
2812
|
className: "mt-3 flex justify-start",
|
|
2184
|
-
children: /* @__PURE__ */
|
|
2813
|
+
children: /* @__PURE__ */ S(Q, {
|
|
2185
2814
|
onClick: c,
|
|
2186
2815
|
className: "rounded-lg bg-brand px-6 py-2 font-semibold text-brand-foreground hover:opacity-90",
|
|
2187
2816
|
children: "Continue for Payment"
|
|
2188
2817
|
})
|
|
2189
2818
|
})] });
|
|
2190
|
-
},
|
|
2191
|
-
let [e, t] =
|
|
2819
|
+
}, rr = () => {
|
|
2820
|
+
let [e, t] = N(null), [n, r] = N(null), [i, a] = N(!1), [o, s] = N(null);
|
|
2192
2821
|
return {
|
|
2193
2822
|
stripePromise: e,
|
|
2194
2823
|
config: n,
|
|
2195
2824
|
isOpen: i,
|
|
2196
|
-
openStripeCheckout:
|
|
2825
|
+
openStripeCheckout: O(async (e) => {
|
|
2197
2826
|
try {
|
|
2198
2827
|
let { loadStripe: n } = await import("@stripe/stripe-js");
|
|
2199
2828
|
t(n(e.key)), r({ clientSecret: e.client_secret }), a(!0);
|
|
@@ -2201,17 +2830,17 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2201
2830
|
console.error("Failed to initialize Stripe checkout:", e);
|
|
2202
2831
|
}
|
|
2203
2832
|
}, []),
|
|
2204
|
-
closeStripeCheckout:
|
|
2833
|
+
closeStripeCheckout: O(() => {
|
|
2205
2834
|
a(!1), setTimeout(() => {
|
|
2206
2835
|
r(null), t(null);
|
|
2207
2836
|
}, 300);
|
|
2208
2837
|
}, []),
|
|
2209
2838
|
onComplete: o,
|
|
2210
|
-
setOnComplete:
|
|
2839
|
+
setOnComplete: O((e) => {
|
|
2211
2840
|
s(() => e);
|
|
2212
2841
|
}, [])
|
|
2213
2842
|
};
|
|
2214
|
-
},
|
|
2843
|
+
}, ir = {
|
|
2215
2844
|
name: "",
|
|
2216
2845
|
email: "",
|
|
2217
2846
|
is_business_purchase: !1,
|
|
@@ -2227,55 +2856,55 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2227
2856
|
country: ""
|
|
2228
2857
|
}
|
|
2229
2858
|
}
|
|
2230
|
-
},
|
|
2859
|
+
}, ar = (e, t, n) => {
|
|
2231
2860
|
let r = t.split("."), i = structuredClone(e), a = i, o = r.length - 1;
|
|
2232
2861
|
return r.forEach((e, t) => {
|
|
2233
2862
|
t === o ? a[e] = n : a = a[e];
|
|
2234
2863
|
}), i;
|
|
2235
|
-
},
|
|
2864
|
+
}, or = async (e, t) => {
|
|
2236
2865
|
try {
|
|
2237
2866
|
let n = new URLSearchParams();
|
|
2238
2867
|
return n.append("query", JSON.stringify({ where: { status: "active" } })), (await e.fetch?.url(`/v1/event/event/${t}/ticket/query?${n.toString()}`).get().json())?.content?.data;
|
|
2239
2868
|
} catch (t) {
|
|
2240
|
-
e.logger?.error("Failed to fetch event tickets", { exception:
|
|
2869
|
+
e.logger?.error("Failed to fetch event tickets", { exception: b(t) });
|
|
2241
2870
|
}
|
|
2242
|
-
},
|
|
2243
|
-
let a =
|
|
2244
|
-
|
|
2245
|
-
}, { Razorpay: H } =
|
|
2871
|
+
}, sr = ({ eventID: e, title: t, external: n, buttonText: r = "Register Now" }) => {
|
|
2872
|
+
let a = i(), [o, s] = N([]), [c, l] = N(!0), [u, d] = N(!1), [f, p] = N(!1), [m, h] = N(null), [g, _] = N(void 0), [v, y] = N(""), [w, T] = N(null), [E, D] = N(!1), [ee, A] = N(null), [j, F] = N(!1), [I, L] = N(1), [te, R] = N(null), [z, ne] = N([]), [re, ie] = N(ir), ae = Xn(m, w) === 0, B = M(null), V = () => ie(ir), oe = () => {
|
|
2873
|
+
T(null), _(void 0), A(null), D(!1), y(""), R(null), d(!1), L(1), V();
|
|
2874
|
+
}, { Razorpay: H } = ce(), { stripePromise: le, config: U, isOpen: W, openStripeCheckout: ue, closeStripeCheckout: de, setOnComplete: G } = rr(), K = () => {
|
|
2246
2875
|
let e = B.current;
|
|
2247
2876
|
!e || !a || a.fetch?.url(`/v1/event/booking/${e.bookingId}/confirm-booking`)?.post({ session_id: e.sessionId })?.json().then((e) => {
|
|
2248
|
-
e?.content?.data &&
|
|
2877
|
+
e?.content?.data && _(e?.content?.data), de(), B.current = null;
|
|
2249
2878
|
}).catch((e) => {
|
|
2250
|
-
a.logger?.error("Failed to confirm booking after Stripe payment", { exception:
|
|
2879
|
+
a.logger?.error("Failed to confirm booking after Stripe payment", { exception: b(e) }), de(), B.current = null;
|
|
2251
2880
|
});
|
|
2252
2881
|
}, fe = async () => {
|
|
2253
2882
|
if (!a) return;
|
|
2254
|
-
|
|
2255
|
-
let { name: t, email: n, is_business_purchase: r, billing_details: i } =
|
|
2883
|
+
p(!0), R(null);
|
|
2884
|
+
let { name: t, email: n, is_business_purchase: r, billing_details: i } = re;
|
|
2256
2885
|
try {
|
|
2257
2886
|
let o = {
|
|
2258
2887
|
event: e,
|
|
2259
|
-
coupon:
|
|
2888
|
+
coupon: v,
|
|
2260
2889
|
attendees: [{
|
|
2261
2890
|
name: t,
|
|
2262
2891
|
email: n,
|
|
2263
|
-
ticket:
|
|
2892
|
+
ticket: m?._id,
|
|
2264
2893
|
details: {}
|
|
2265
2894
|
}]
|
|
2266
2895
|
};
|
|
2267
|
-
r && !
|
|
2896
|
+
r && !ae && (o.is_business_purchase = !0, o.billing_details = i);
|
|
2268
2897
|
let s = await a.fetch?.url(`/v1/event/event/${e}/booking/create-new-booking`)?.post(o).json();
|
|
2269
|
-
if (!s?.status)
|
|
2898
|
+
if (!s?.status) R("Booking failed. Please try again.");
|
|
2270
2899
|
else {
|
|
2271
|
-
|
|
2900
|
+
oe();
|
|
2272
2901
|
let e = s?.content?.meta;
|
|
2273
2902
|
if (e?.key) {
|
|
2274
2903
|
let t = s?.content.data?._id;
|
|
2275
2904
|
e.provider === "stripe" && e.client_secret ? (B.current = t && e.session_id ? {
|
|
2276
2905
|
bookingId: t,
|
|
2277
2906
|
sessionId: e.session_id
|
|
2278
|
-
} : null,
|
|
2907
|
+
} : null, G(K), await ue({
|
|
2279
2908
|
key: e.key,
|
|
2280
2909
|
client_secret: e.client_secret,
|
|
2281
2910
|
amount: s?.content.data?.unit_amount || 0,
|
|
@@ -2289,12 +2918,12 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2289
2918
|
order_id: e.order_id,
|
|
2290
2919
|
booking_id: t
|
|
2291
2920
|
});
|
|
2292
|
-
} else
|
|
2921
|
+
} else _(s?.content.data);
|
|
2293
2922
|
}
|
|
2294
2923
|
} catch (e) {
|
|
2295
|
-
|
|
2924
|
+
R(b(e).message || "Something went wrong. Please try again.");
|
|
2296
2925
|
}
|
|
2297
|
-
|
|
2926
|
+
p(!1);
|
|
2298
2927
|
}, pe = async (e) => {
|
|
2299
2928
|
if (!a) return;
|
|
2300
2929
|
let n = new H({
|
|
@@ -2310,9 +2939,9 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2310
2939
|
payment_id: t.razorpay_payment_id,
|
|
2311
2940
|
signature: t.razorpay_signature
|
|
2312
2941
|
})?.json().then((e) => {
|
|
2313
|
-
e?.content?.data?.status &&
|
|
2942
|
+
e?.content?.data?.status && _(e?.content?.data);
|
|
2314
2943
|
}).catch((e) => {
|
|
2315
|
-
a.logger?.error("Failed to confirm Razorpay booking", { exception:
|
|
2944
|
+
a.logger?.error("Failed to confirm Razorpay booking", { exception: b(e) });
|
|
2316
2945
|
});
|
|
2317
2946
|
},
|
|
2318
2947
|
prefill: {
|
|
@@ -2323,19 +2952,19 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2323
2952
|
theme: { color: "#FC751A" }
|
|
2324
2953
|
});
|
|
2325
2954
|
n.on("payment.failed", (e) => {
|
|
2326
|
-
a.logger?.error("Razorpay payment failed", { exception:
|
|
2955
|
+
a.logger?.error("Razorpay payment failed", { exception: b(e.error) });
|
|
2327
2956
|
}), n.open();
|
|
2328
|
-
}, me =
|
|
2957
|
+
}, me = O(async () => {
|
|
2329
2958
|
if (a) try {
|
|
2330
2959
|
let t = await a.fetch?.url(`/v1/event/event/${e}/coupon/list-public-coupons`)?.get().json();
|
|
2331
|
-
t?.status && t?.content?.data &&
|
|
2960
|
+
t?.status && t?.content?.data && ne(t.content.data);
|
|
2332
2961
|
} catch (e) {
|
|
2333
|
-
a.logger?.error("Failed to fetch public coupons", { exception:
|
|
2962
|
+
a.logger?.error("Failed to fetch public coupons", { exception: b(e) });
|
|
2334
2963
|
}
|
|
2335
2964
|
}, [a, e]), he = async (t) => {
|
|
2336
2965
|
if (!a) return;
|
|
2337
|
-
let n = t ??
|
|
2338
|
-
|
|
2966
|
+
let n = t ?? v;
|
|
2967
|
+
D(!0), A(null);
|
|
2339
2968
|
try {
|
|
2340
2969
|
let t = await a.fetch?.url(`/v1/event/event/${e}/coupon/validate-coupon-code`)?.post({
|
|
2341
2970
|
coupon: n,
|
|
@@ -2343,141 +2972,141 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2343
2972
|
attendees: [{
|
|
2344
2973
|
name: "",
|
|
2345
2974
|
email: "",
|
|
2346
|
-
ticket:
|
|
2975
|
+
ticket: m?._id
|
|
2347
2976
|
}]
|
|
2348
2977
|
}).json();
|
|
2349
|
-
t?.status && (
|
|
2978
|
+
t?.status && (T(t.content.data), y(n)), F(!1), D(!1);
|
|
2350
2979
|
} catch (e) {
|
|
2351
|
-
|
|
2980
|
+
A(b(e).message), D(!1);
|
|
2352
2981
|
}
|
|
2353
2982
|
}, ge = (e) => {
|
|
2354
|
-
|
|
2983
|
+
y(""), T(null), A(null), D(!1), R(null), h(e);
|
|
2355
2984
|
}, _e = () => {
|
|
2356
|
-
|
|
2985
|
+
T(null), A(null), y("");
|
|
2357
2986
|
}, ve = () => {
|
|
2358
|
-
|
|
2987
|
+
A(null), D(!1), y(""), F(!1);
|
|
2359
2988
|
}, ye = (e) => {
|
|
2360
2989
|
let { name: t, value: n, type: r, checked: i } = e.target;
|
|
2361
|
-
|
|
2362
|
-
},
|
|
2990
|
+
ie((e) => ar(e, t, r === "checkbox" ? i : n));
|
|
2991
|
+
}, q = () => {}, be = (e) => {
|
|
2363
2992
|
e?.preventDefault(), fe();
|
|
2364
2993
|
};
|
|
2365
|
-
if (
|
|
2366
|
-
if (
|
|
2994
|
+
if (k(() => {
|
|
2995
|
+
if (n) {
|
|
2367
2996
|
l(!1);
|
|
2368
2997
|
return;
|
|
2369
2998
|
}
|
|
2370
|
-
e && a && (l(!0),
|
|
2371
|
-
s(e ?? []), e && e.length > 0 &&
|
|
2999
|
+
e && a && (l(!0), or(a, e).then((e) => {
|
|
3000
|
+
s(e ?? []), e && e.length > 0 && h(e[0] || null), l(!1);
|
|
2372
3001
|
}));
|
|
2373
3002
|
}, [
|
|
2374
3003
|
e,
|
|
2375
|
-
|
|
3004
|
+
n,
|
|
2376
3005
|
a
|
|
2377
|
-
]),
|
|
2378
|
-
|
|
2379
|
-
}, [
|
|
2380
|
-
|
|
3006
|
+
]), k(() => {
|
|
3007
|
+
m?.unit_amount === 0 && o?.length === 1 && L(2);
|
|
3008
|
+
}, [m, o]), k(() => {
|
|
3009
|
+
u && e && me();
|
|
2381
3010
|
}, [
|
|
2382
|
-
|
|
3011
|
+
u,
|
|
2383
3012
|
e,
|
|
2384
3013
|
me
|
|
2385
|
-
]),
|
|
3014
|
+
]), n) return /* @__PURE__ */ S("div", {
|
|
2386
3015
|
className: "my-2",
|
|
2387
|
-
children: /* @__PURE__ */
|
|
3016
|
+
children: /* @__PURE__ */ S(Q, {
|
|
2388
3017
|
className: "rounded-lg bg-brand px-4 py-3 font-semibold text-brand-foreground hover:opacity-90",
|
|
2389
|
-
onClick: () => window.open(
|
|
2390
|
-
children:
|
|
3018
|
+
onClick: () => window.open(n, "_blank", "noopener,noreferrer"),
|
|
3019
|
+
children: r
|
|
2391
3020
|
})
|
|
2392
3021
|
});
|
|
2393
|
-
if (c) return /* @__PURE__ */
|
|
3022
|
+
if (c) return /* @__PURE__ */ S("div", {
|
|
2394
3023
|
className: "my-2",
|
|
2395
|
-
children: /* @__PURE__ */
|
|
3024
|
+
children: /* @__PURE__ */ S(Q, {
|
|
2396
3025
|
className: "rounded-lg bg-brand px-4 py-2 font-bold text-brand-foreground",
|
|
2397
3026
|
children: "Loading..."
|
|
2398
3027
|
})
|
|
2399
3028
|
});
|
|
2400
|
-
let
|
|
2401
|
-
return /* @__PURE__ */
|
|
2402
|
-
/* @__PURE__ */
|
|
3029
|
+
let xe = ae ? "Complete Registration" : "Pay";
|
|
3030
|
+
return /* @__PURE__ */ C(x, { children: [
|
|
3031
|
+
/* @__PURE__ */ S("div", {
|
|
2403
3032
|
className: "my-2",
|
|
2404
|
-
children: o?.length ? /* @__PURE__ */
|
|
2405
|
-
onClick: () =>
|
|
3033
|
+
children: o?.length ? /* @__PURE__ */ S(Q, {
|
|
3034
|
+
onClick: () => d(!0),
|
|
2406
3035
|
className: "rounded-lg bg-brand px-4 py-3 font-semibold text-brand-foreground hover:opacity-90",
|
|
2407
|
-
children:
|
|
2408
|
-
}) : /* @__PURE__ */
|
|
3036
|
+
children: r
|
|
3037
|
+
}) : /* @__PURE__ */ S("p", {
|
|
2409
3038
|
className: "text-red-500",
|
|
2410
3039
|
children: "No tickets available for this event."
|
|
2411
3040
|
})
|
|
2412
3041
|
}),
|
|
2413
|
-
/* @__PURE__ */
|
|
2414
|
-
open:
|
|
3042
|
+
/* @__PURE__ */ S(P.Root, {
|
|
3043
|
+
open: u,
|
|
2415
3044
|
onOpenChange: (e) => {
|
|
2416
|
-
e ||
|
|
3045
|
+
e || oe();
|
|
2417
3046
|
},
|
|
2418
|
-
children: /* @__PURE__ */
|
|
2419
|
-
className:
|
|
2420
|
-
children: [/* @__PURE__ */
|
|
2421
|
-
className: `mb-4 flex w-full items-start justify-between ${
|
|
2422
|
-
children: [/* @__PURE__ */
|
|
3047
|
+
children: /* @__PURE__ */ C(P.Portal, { children: [/* @__PURE__ */ S(P.Backdrop, { className: "fixed inset-0 z-[100] bg-black/50" }), /* @__PURE__ */ C(P.Popup, {
|
|
3048
|
+
className: Wn("fixed top-24 left-1/2 z-[100] flex max-h-[calc(100dvh-12rem)] w-[90%] -translate-x-1/2 flex-col overflow-y-auto rounded-lg bg-white p-4", j ? "md:w-[30%]" : "md:w-[40%]"),
|
|
3049
|
+
children: [/* @__PURE__ */ C("div", {
|
|
3050
|
+
className: `mb-4 flex w-full items-start justify-between ${j ? "" : "pb-[6px]"} `,
|
|
3051
|
+
children: [/* @__PURE__ */ C(P.Title, {
|
|
2423
3052
|
className: "font-semibold text-lg",
|
|
2424
3053
|
children: [
|
|
2425
3054
|
"Register for ",
|
|
2426
3055
|
t,
|
|
2427
3056
|
"!"
|
|
2428
3057
|
]
|
|
2429
|
-
}), /* @__PURE__ */
|
|
3058
|
+
}), /* @__PURE__ */ S(P.Close, {
|
|
2430
3059
|
className: "rounded-md p-2 hover:bg-gray-100 focus:outline-none",
|
|
2431
|
-
children: /* @__PURE__ */
|
|
3060
|
+
children: /* @__PURE__ */ S(se, { className: "size-4" })
|
|
2432
3061
|
})]
|
|
2433
|
-
}), /* @__PURE__ */
|
|
3062
|
+
}), /* @__PURE__ */ C("div", { children: [te && /* @__PURE__ */ S("div", {
|
|
2434
3063
|
className: "mb-4 rounded-md bg-red-50 p-3 text-red-600 text-sm",
|
|
2435
|
-
children:
|
|
2436
|
-
}),
|
|
2437
|
-
couponCode:
|
|
2438
|
-
onCouponCodeChange:
|
|
2439
|
-
couponError:
|
|
2440
|
-
couponLoading:
|
|
3064
|
+
children: te
|
|
3065
|
+
}), I === 1 ? /* @__PURE__ */ S("div", { children: j ? /* @__PURE__ */ S(Qn, {
|
|
3066
|
+
couponCode: v,
|
|
3067
|
+
onCouponCodeChange: y,
|
|
3068
|
+
couponError: ee,
|
|
3069
|
+
couponLoading: E,
|
|
2441
3070
|
onValidateCoupon: he,
|
|
2442
|
-
publicCoupons:
|
|
3071
|
+
publicCoupons: z,
|
|
2443
3072
|
onBack: ve,
|
|
2444
|
-
selectedTicket:
|
|
2445
|
-
}) : /* @__PURE__ */
|
|
3073
|
+
selectedTicket: m
|
|
3074
|
+
}) : /* @__PURE__ */ S(nr, {
|
|
2446
3075
|
tickets: o,
|
|
2447
|
-
selectedTicket:
|
|
3076
|
+
selectedTicket: m,
|
|
2448
3077
|
onSelectTicket: ge,
|
|
2449
|
-
discount:
|
|
2450
|
-
couponCode:
|
|
2451
|
-
publicCouponsCount:
|
|
2452
|
-
onApplyCouponClick: () =>
|
|
3078
|
+
discount: w,
|
|
3079
|
+
couponCode: v,
|
|
3080
|
+
publicCouponsCount: z.length,
|
|
3081
|
+
onApplyCouponClick: () => F(!0),
|
|
2453
3082
|
onRemoveCoupon: _e,
|
|
2454
|
-
onNext: () =>
|
|
2455
|
-
}) }) : /* @__PURE__ */
|
|
2456
|
-
values:
|
|
3083
|
+
onNext: () => L(2)
|
|
3084
|
+
}) }) : /* @__PURE__ */ S(Gn, {
|
|
3085
|
+
values: re,
|
|
2457
3086
|
handleChange: ye,
|
|
2458
|
-
handleBlur:
|
|
2459
|
-
handleSubmit:
|
|
2460
|
-
registerLoading:
|
|
2461
|
-
onBack: () =>
|
|
2462
|
-
submitLabel:
|
|
2463
|
-
showBusinessBilling: !
|
|
3087
|
+
handleBlur: q,
|
|
3088
|
+
handleSubmit: be,
|
|
3089
|
+
registerLoading: f,
|
|
3090
|
+
onBack: () => L(1),
|
|
3091
|
+
submitLabel: xe,
|
|
3092
|
+
showBusinessBilling: !ae
|
|
2464
3093
|
})] })]
|
|
2465
3094
|
})] })
|
|
2466
3095
|
}),
|
|
2467
|
-
|
|
2468
|
-
paymentData:
|
|
3096
|
+
g && /* @__PURE__ */ S(er, {
|
|
3097
|
+
paymentData: g,
|
|
2469
3098
|
ticketData: o,
|
|
2470
3099
|
type: "confirm"
|
|
2471
3100
|
}),
|
|
2472
|
-
|
|
2473
|
-
isOpen:
|
|
2474
|
-
onClose:
|
|
2475
|
-
stripePromise:
|
|
2476
|
-
clientSecret:
|
|
2477
|
-
onComplete:
|
|
3101
|
+
W && U && /* @__PURE__ */ S(tr, {
|
|
3102
|
+
isOpen: W,
|
|
3103
|
+
onClose: de,
|
|
3104
|
+
stripePromise: le,
|
|
3105
|
+
clientSecret: U.clientSecret,
|
|
3106
|
+
onComplete: K
|
|
2478
3107
|
})
|
|
2479
3108
|
] });
|
|
2480
|
-
},
|
|
3109
|
+
}, cr = (e) => e.length > 1 ? e.replace(/\/+$/, "") : e, lr = (e) => typeof e == "string" && e.trim() ? e : void 0, ur = (e) => typeof e == "string" ? e : e?.location ?? void 0, dr = (e, t) => {
|
|
2481
3110
|
let n = e.meta ?? {}, r = e.title && t ? `${e.title} | ${t}` : e.title || t || void 0;
|
|
2482
3111
|
return {
|
|
2483
3112
|
title: n.meta_title || r,
|
|
@@ -2487,33 +3116,33 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2487
3116
|
og: {
|
|
2488
3117
|
title: n.og_title || void 0,
|
|
2489
3118
|
description: n.og_description || void 0,
|
|
2490
|
-
image:
|
|
3119
|
+
image: ur(n.og_image),
|
|
2491
3120
|
url: n.og_url || void 0
|
|
2492
3121
|
},
|
|
2493
3122
|
twitter: { card: n.twitter_card || void 0 },
|
|
2494
3123
|
ldJson: n.ld_json || void 0,
|
|
2495
3124
|
customHead: n.head_code || void 0
|
|
2496
3125
|
};
|
|
2497
|
-
},
|
|
3126
|
+
}, fr = (e) => ({
|
|
2498
3127
|
description: e.description || void 0,
|
|
2499
3128
|
icon: e.icon?.location || void 0,
|
|
2500
3129
|
customHead: e.settings?.head_code || void 0
|
|
2501
|
-
}),
|
|
2502
|
-
let i =
|
|
3130
|
+
}), pr = (e) => (t = {}, n) => (r) => {
|
|
3131
|
+
let i = dr(t, e.name);
|
|
2503
3132
|
if (n) {
|
|
2504
3133
|
let t = r?.loaderData?.[n.source];
|
|
2505
3134
|
if (t) {
|
|
2506
|
-
let r = n.title ?
|
|
3135
|
+
let r = n.title ? lr(t[n.title]) : void 0;
|
|
2507
3136
|
r && (i.title = e.name ? `${r} | ${e.name}` : r, i.og = {
|
|
2508
3137
|
...i.og,
|
|
2509
3138
|
title: r
|
|
2510
3139
|
});
|
|
2511
|
-
let a = n.description ?
|
|
3140
|
+
let a = n.description ? lr(t[n.description]) : void 0;
|
|
2512
3141
|
a && (i.description = a, i.og = {
|
|
2513
3142
|
...i.og,
|
|
2514
3143
|
description: a
|
|
2515
3144
|
});
|
|
2516
|
-
let o = n.image ?
|
|
3145
|
+
let o = n.image ? ur(t[n.image]) : void 0;
|
|
2517
3146
|
o && (i.og = {
|
|
2518
3147
|
...i.og,
|
|
2519
3148
|
image: o
|
|
@@ -2522,21 +3151,24 @@ var kt = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2522
3151
|
}
|
|
2523
3152
|
if (!i.canonical) {
|
|
2524
3153
|
let t = r?.match?.pathname, n = (e.domain || "").trim();
|
|
2525
|
-
n && t?.startsWith("/") && (i.canonical = (/^https?:\/\//.test(n) ? n : `https://${n}`).replace(/\/+$/, "") + t);
|
|
3154
|
+
n && t?.startsWith("/") && (i.canonical = (/^https?:\/\//.test(n) ? n : `https://${n}`).replace(/\/+$/, "") + cr(t));
|
|
2526
3155
|
}
|
|
2527
|
-
let a =
|
|
3156
|
+
let a = Hn(i, fr(e)), o = t.id?.trim();
|
|
2528
3157
|
return o && a.meta.push({
|
|
2529
|
-
name:
|
|
3158
|
+
name: xn,
|
|
2530
3159
|
content: o
|
|
2531
3160
|
}), a;
|
|
2532
|
-
},
|
|
2533
|
-
let t =
|
|
2534
|
-
return (e
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
3161
|
+
}, mr = (e) => {
|
|
3162
|
+
let t = Ce(e);
|
|
3163
|
+
return (e, n) => {
|
|
3164
|
+
let { rules: r, invalid: i } = ge(n?.access), a = r.length > 0 || i;
|
|
3165
|
+
return ({ context: n, params: r }) => a ? Promise.resolve({}) : Ne({
|
|
3166
|
+
queryClient: n.queryClient,
|
|
3167
|
+
config: t,
|
|
3168
|
+
sources: e,
|
|
3169
|
+
params: r
|
|
3170
|
+
});
|
|
3171
|
+
};
|
|
2540
3172
|
};
|
|
2541
3173
|
//#endregion
|
|
2542
|
-
export {
|
|
3174
|
+
export { ht as ColorModeProvider, yn as Inspector, ue as LEVO_AUTH_METHODS, Y as LEVO_AUTH_QUERY_KEY, W as LEVO_OAUTH_METHODS, et as LEVO_OTP_LENGTH, We as LEVO_PENDING_APPROVAL_CODE, U as LEVO_PRIMARY_AUTH_METHODS, m as LOCALE_COOKIE, l as LOCALE_REDIRECT_CACHE_CONTROL, st as LevoChat, Le as LevoEntryForm, sr as LevoEventRegister, _t as LevoForm, wn as LevoPopups, He as LevoProfileForm, Dn as LevoSiteProvider, Mn as LocaleHreflang, Pn as LocaleProvider, xn as PAGE_ID_META, Un as PageHead, Ln as SiteLocaleProvider, jn as buildHreflangLinks, pr as createLevoHead, mr as createLevoLoader, _ as createRouteTreeMatcher, Se as createSiteClient, xe as decideAccess, v as extractGeoAndLanguageData, Ge as isPendingApprovalError, tt as isValidEmail, nt as isValidOtp, it as isValidPhone, On as localeBeforeLoad, p as localePath, d as localeRedirectResponse, rt as normalizePhone, Hn as pageHead, ge as parseAccess, Vn as parseRawHead, Ne as prefetchLevoSources, kn as readLocaleConfig, Sn as readPageId, _e as resolveAuthMethods, g as resolveLocale, u as resolveLocaleRedirect, s as resolveLocaleRequest, Ce as siteConfigFromJson, f as splitLocalePrefix, gt as useColorMode, Rn as useLanguageOptions, Ue as useLevoAccess, Ie as useLevoAuth, Me as useLevoForm, En as useLevoInsights, Je as useLevoLogin, $e as useLevoOAuth, at as useLevoOtpInput, je as useLevoRecord, Tn as useLevoSite, Ae as useLevoSource, Fn as useLocale, In as useUrlLocale };
|