@levo-so/site-runtime 0.3.8 → 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/{DateTimeWidget-hFjcn3o6.js → DateTimeWidget-LfaosVVW.js} +1 -1
- package/{KBChatWidget-ClHFDgJ5.js → KBChatWidget-CuAtGhHT.js} +11 -10
- package/{PopupBody-DZVwDLkg-Cfy3lWGs.js → PopupBody-BI-MJqmd-C0qNyN7V.js} +285 -168
- package/PopupRenderer-D66Gx63H-C6RnOnl2.js +388 -0
- package/{RichTextWidget-DkKHEq4j.js → RichTextWidget-BFWVevY7.js} +3 -3
- package/{dist-DPmVG7VB.js → dist-Rjs__H25.js} +3 -3
- package/{dist-CRDgdAkQ.js → dist-orLT2eNz.js} +498 -466
- package/index.d.ts +511 -0
- package/index.js +925 -783
- package/{kbChat-C00LVlxP.js → kbChat-L55effMi.js} +2 -2
- package/package.json +37 -27
- package/popups.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/{usePopupRedirect-BThP_YPW-COUseDik.js → usePopupRedirect-CAAdcpaW-D9XoiVhG.js} +15 -13
- package/PopupRenderer-BjW1jg70-W2y-PEPH.js +0 -387
- /package/{PhoneWidget-BmBO-kvA.js → PhoneWidget-D-CcDuie.js} +0 -0
- /package/{Popover-3N88sRp4.js → Popover-BTdlOQP_.js} +0 -0
- /package/{es-CztjLuNy.js → es-Bj3CsMJz.js} +0 -0
- /package/{nodeAlignment-BnJljFlw.js → nodeAlignment-COvc-rIj.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/{react-CV3jf2mc.js → react-B9yvlbH0.js} +0 -0
- /package/{rteTheme.cssm-xg0gJ28J.js → rteTheme.cssm-CaRzrwtu.js} +0 -0
package/index.js
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as e, r as t } from "./dist-
|
|
2
|
+
import { n as e, r as t } from "./dist-orLT2eNz.js";
|
|
3
3
|
import { i as n, n as r, r as i } from "./LevoProvider-Bsjkcwc8.js";
|
|
4
4
|
import { t as a } from "./inlineCollectionTheme-CWcMCUti.js";
|
|
5
5
|
import { t as o } from "./inlineBaseTheme-BB9e6h5f.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
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";
|
|
17
18
|
//#region src/access/types.ts
|
|
18
|
-
var
|
|
19
|
+
var U = [
|
|
19
20
|
"otp",
|
|
20
21
|
"magiclink",
|
|
21
22
|
"whatsapp"
|
|
22
|
-
],
|
|
23
|
+
], W = [
|
|
23
24
|
"google",
|
|
24
25
|
"microsoft",
|
|
25
26
|
"linkedin"
|
|
26
|
-
],
|
|
27
|
-
if (!
|
|
28
|
-
let t = e.enabled === void 0 ? !0 : e.enabled === !0, n =
|
|
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 : {};
|
|
29
30
|
switch (e.kind) {
|
|
30
31
|
case "authentication": return {
|
|
31
32
|
kind: "authentication",
|
|
32
33
|
enabled: t,
|
|
33
34
|
options: {
|
|
34
|
-
methods:
|
|
35
|
-
...
|
|
35
|
+
methods: pe(n.methods).filter((e) => K(e) || fe(e)),
|
|
36
|
+
...K(n.primary_method) ? { primary_method: n.primary_method } : {}
|
|
36
37
|
}
|
|
37
38
|
};
|
|
38
39
|
case "gating": return typeof n.collection != "string" || !n.collection.trim() ? null : {
|
|
@@ -40,88 +41,88 @@ var F = [
|
|
|
40
41
|
enabled: t,
|
|
41
42
|
options: {
|
|
42
43
|
collection: n.collection.trim(),
|
|
43
|
-
...
|
|
44
|
-
hidden:
|
|
44
|
+
...G(n.condition) ? { condition: me(n.condition) } : {},
|
|
45
|
+
hidden: pe(n.hidden)
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
48
|
case "profile": return {
|
|
48
49
|
kind: "profile",
|
|
49
50
|
enabled: t,
|
|
50
51
|
options: {
|
|
51
|
-
...
|
|
52
|
-
hidden:
|
|
52
|
+
...G(n.condition) ? { condition: me(n.condition) } : {},
|
|
53
|
+
hidden: pe(n.hidden)
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
56
|
default: return null;
|
|
56
57
|
}
|
|
57
|
-
},
|
|
58
|
+
}, ge = (e) => {
|
|
58
59
|
if (!Array.isArray(e) || e.length === 0) return {
|
|
59
60
|
rules: [],
|
|
60
61
|
invalid: !1
|
|
61
62
|
};
|
|
62
|
-
let t = e.map(
|
|
63
|
+
let t = e.map(he).filter((e) => e !== null);
|
|
63
64
|
return {
|
|
64
65
|
rules: t.filter((e) => e.enabled !== !1),
|
|
65
66
|
invalid: t.length === 0
|
|
66
67
|
};
|
|
67
|
-
},
|
|
68
|
+
}, _e = (e) => {
|
|
68
69
|
let t = e.find((e) => e.kind === "authentication"), n = t?.kind === "authentication" ? t.options?.methods ?? [] : [];
|
|
69
70
|
return {
|
|
70
|
-
primary: (t?.kind === "authentication" ? t.options?.primary_method : void 0) ?? n.find(
|
|
71
|
-
oauth: n.filter(
|
|
71
|
+
primary: (t?.kind === "authentication" ? t.options?.primary_method : void 0) ?? n.find(K) ?? de,
|
|
72
|
+
oauth: n.filter(fe)
|
|
72
73
|
};
|
|
73
|
-
},
|
|
74
|
+
}, ve = (e = null) => ({
|
|
74
75
|
state: "granted",
|
|
75
76
|
code: e,
|
|
76
77
|
message: null,
|
|
77
78
|
rule: null
|
|
78
|
-
}),
|
|
79
|
+
}), ye = () => ({
|
|
79
80
|
state: "checking",
|
|
80
81
|
code: null,
|
|
81
82
|
message: null,
|
|
82
83
|
rule: null
|
|
83
|
-
}),
|
|
84
|
+
}), q = (e, t, n = null) => ({
|
|
84
85
|
state: "blocked",
|
|
85
86
|
code: e,
|
|
86
87
|
message: t,
|
|
87
88
|
rule: n
|
|
88
|
-
}),
|
|
89
|
+
}), be = (e, t) => {
|
|
89
90
|
let n = t?.split(".")[0];
|
|
90
91
|
return e.find((e) => e.kind === n) ?? null;
|
|
91
|
-
},
|
|
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) => {
|
|
92
93
|
let t = (e?.apiUrl || "").replace(/\/$/, "");
|
|
93
|
-
return t ?
|
|
94
|
+
return t ? y({
|
|
94
95
|
apiUrl: t,
|
|
95
96
|
workspace: e?.workspace ? e.workspace : null,
|
|
96
97
|
appName: "studio-site",
|
|
97
98
|
NODE_ENV: "",
|
|
98
99
|
APP_MODE: e?.appMode || "production"
|
|
99
100
|
}) : null;
|
|
100
|
-
},
|
|
101
|
+
}, Ce = (e) => ({
|
|
101
102
|
apiUrl: e.levo?.api_url || "",
|
|
102
103
|
workspace: e.workspace_id || "",
|
|
103
104
|
siteId: e.id || "",
|
|
104
105
|
insightsUrl: e.levo?.insights_url || null,
|
|
105
106
|
appMode: e.levo?.app_mode || "production"
|
|
106
|
-
}),
|
|
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 F = [
|
|
|
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 = i(), n =
|
|
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
144
|
data: n.data?.data ?? null,
|
|
144
145
|
meta: n.data?.meta ?? null,
|
|
145
146
|
isLoading: n.isLoading,
|
|
146
|
-
error: n.error ?
|
|
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 n = i(), r =
|
|
154
|
-
queryKey:
|
|
155
|
-
queryFn: () =>
|
|
153
|
+
}, je = (e, t) => {
|
|
154
|
+
let n = i(), r = I({
|
|
155
|
+
queryKey: Te(e, t),
|
|
156
|
+
queryFn: () => Oe(n, e, t),
|
|
156
157
|
enabled: !!n && !!t
|
|
157
158
|
});
|
|
158
159
|
return {
|
|
159
160
|
data: r.data ?? null,
|
|
160
161
|
isLoading: r.isLoading,
|
|
161
|
-
error: r.error ?
|
|
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 = i(), n =
|
|
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
175
|
schema: n.data ?? null,
|
|
175
176
|
isLoading: n.isLoading,
|
|
176
|
-
error: n.error ?
|
|
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,10 +222,10 @@ var F = [
|
|
|
221
222
|
input: "var(--color-background1)",
|
|
222
223
|
inputForeground: "var(--color-ink)",
|
|
223
224
|
ring: "var(--color-brand)"
|
|
224
|
-
},
|
|
225
|
+
}, Fe = (e) => j(() => ({
|
|
225
226
|
...o({
|
|
226
227
|
colors: {
|
|
227
|
-
...
|
|
228
|
+
...Pe,
|
|
228
229
|
...e?.colors
|
|
229
230
|
},
|
|
230
231
|
radius: e?.radius ?? "var(--radius-token)",
|
|
@@ -238,56 +239,56 @@ var F = [
|
|
|
238
239
|
//#endregion
|
|
239
240
|
//#region src/hooks/useMounted.ts
|
|
240
241
|
function J() {
|
|
241
|
-
let [e, t] =
|
|
242
|
-
return
|
|
242
|
+
let [e, t] = N(!1);
|
|
243
|
+
return k(() => t(!0), []), e;
|
|
243
244
|
}
|
|
244
245
|
//#endregion
|
|
245
246
|
//#region src/access/useLevoAuth.ts
|
|
246
|
-
var Y = ["levo-auth", "session"],
|
|
247
|
-
let e = i(), t =
|
|
247
|
+
var Y = ["levo-auth", "session"], Ie = () => {
|
|
248
|
+
let e = i(), t = L(), n = J(), r = I({
|
|
248
249
|
queryKey: Y,
|
|
249
250
|
queryFn: async () => {
|
|
250
251
|
try {
|
|
251
252
|
return await e?.membership?.getMe() ?? null;
|
|
252
253
|
} catch (t) {
|
|
253
|
-
return e?.logger?.debug?.("Session check returned no account", { exception:
|
|
254
|
+
return e?.logger?.debug?.("Session check returned no account", { exception: b(t) }), null;
|
|
254
255
|
}
|
|
255
256
|
},
|
|
256
257
|
enabled: n && !!e,
|
|
257
258
|
staleTime: 3e4,
|
|
258
259
|
retry: !1
|
|
259
|
-
}), a =
|
|
260
|
+
}), a = F({
|
|
260
261
|
mutationFn: async () => {
|
|
261
262
|
await e?.membership?.signOut();
|
|
262
263
|
},
|
|
263
264
|
onSettled: () => t.invalidateQueries({ queryKey: Y }),
|
|
264
265
|
onError: (t) => {
|
|
265
|
-
e?.logger?.error("Sign out failed", { exception:
|
|
266
|
+
e?.logger?.error("Sign out failed", { exception: b(t) });
|
|
266
267
|
}
|
|
267
|
-
}), o =
|
|
268
|
+
}), o = O(async () => {
|
|
268
269
|
await t.invalidateQueries({ queryKey: Y });
|
|
269
|
-
}, [t]), s =
|
|
270
|
+
}, [t]), s = O(async () => {
|
|
270
271
|
await a.mutateAsync().catch(() => void 0);
|
|
271
|
-
}, [a]),
|
|
272
|
+
}, [a]), c = r.data ?? null;
|
|
272
273
|
return {
|
|
273
|
-
account:
|
|
274
|
-
isLoggedIn: !!
|
|
274
|
+
account: c,
|
|
275
|
+
isLoggedIn: !!c,
|
|
275
276
|
isLoaded: n && (!e || r.isSuccess),
|
|
276
277
|
isLoading: r.isFetching,
|
|
277
278
|
refresh: o,
|
|
278
279
|
signOut: s,
|
|
279
280
|
isSigningOut: a.isPending
|
|
280
281
|
};
|
|
281
|
-
},
|
|
282
|
-
let c = i(), { account: l } =
|
|
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({
|
|
283
284
|
module: "collection",
|
|
284
285
|
identifier: t
|
|
285
|
-
}),
|
|
286
|
-
return c ? /* @__PURE__ */
|
|
286
|
+
}), f = Fe(o);
|
|
287
|
+
return c ? /* @__PURE__ */ S("div", {
|
|
287
288
|
className: s,
|
|
288
|
-
children: /* @__PURE__ */
|
|
289
|
-
fetchedSchema:
|
|
290
|
-
isLoading:
|
|
289
|
+
children: /* @__PURE__ */ S(e, {
|
|
290
|
+
fetchedSchema: u,
|
|
291
|
+
isLoading: d,
|
|
291
292
|
submitButtonConfig: {
|
|
292
293
|
show: !0,
|
|
293
294
|
text: r
|
|
@@ -296,7 +297,7 @@ var Y = ["levo-auth", "session"], Ce = () => {
|
|
|
296
297
|
hideFormHeading: !0,
|
|
297
298
|
hideSectionHeadings: !0
|
|
298
299
|
},
|
|
299
|
-
theme: { style:
|
|
300
|
+
theme: { style: f },
|
|
300
301
|
hiddenFields: n,
|
|
301
302
|
isLoggedIn: !!l,
|
|
302
303
|
account: {
|
|
@@ -306,53 +307,53 @@ var Y = ["levo-auth", "session"], Ce = () => {
|
|
|
306
307
|
onSuccess: () => a?.()
|
|
307
308
|
})
|
|
308
309
|
}) : null;
|
|
309
|
-
},
|
|
310
|
+
}, Re = "so_levo_membership_account", ze = [
|
|
310
311
|
"profile_picture",
|
|
311
312
|
"first_name",
|
|
312
313
|
"last_name",
|
|
313
314
|
"email",
|
|
314
315
|
"username",
|
|
315
316
|
"socials"
|
|
316
|
-
],
|
|
317
|
-
let
|
|
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({
|
|
318
319
|
queryKey: ["levo-access", "profile-schema"],
|
|
319
|
-
queryFn: async () => (await
|
|
320
|
-
enabled:
|
|
320
|
+
queryFn: async () => (await c?.collection?.getCollectionByIDExpanded(Re))?.content?.data ?? null,
|
|
321
|
+
enabled: l && !!c,
|
|
321
322
|
staleTime: 5 * 6e4,
|
|
322
323
|
retry: 1
|
|
323
|
-
}),
|
|
324
|
-
let t =
|
|
324
|
+
}), h = e?.join("|") ?? "", g = j(() => {
|
|
325
|
+
let t = m.data;
|
|
325
326
|
return t ? {
|
|
326
327
|
...t,
|
|
327
328
|
sections: t.sections?.map((t) => ({
|
|
328
329
|
...t,
|
|
329
330
|
fields: t.fields?.map((t) => ({
|
|
330
331
|
...t,
|
|
331
|
-
hidden: !
|
|
332
|
-
readonly: t.readonly ||
|
|
332
|
+
hidden: !Ve(t) || !!e?.includes(t.key),
|
|
333
|
+
readonly: t.readonly || Be.includes(t.key)
|
|
333
334
|
}))
|
|
334
335
|
}))
|
|
335
336
|
} : null;
|
|
336
|
-
}, [
|
|
337
|
+
}, [m.data, h]), _ = F({
|
|
337
338
|
mutationFn: async (t) => {
|
|
338
|
-
let n =
|
|
339
|
-
await
|
|
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))));
|
|
340
341
|
},
|
|
341
|
-
onMutate: () =>
|
|
342
|
+
onMutate: () => p(""),
|
|
342
343
|
onSuccess: () => r?.(),
|
|
343
344
|
onError: (e) => {
|
|
344
|
-
let t =
|
|
345
|
-
|
|
345
|
+
let t = b(e);
|
|
346
|
+
c?.logger?.error("Failed to update profile", { exception: t }), p(t?.message || "Something went wrong. Please try again.");
|
|
346
347
|
}
|
|
347
348
|
});
|
|
348
|
-
return
|
|
349
|
+
return c ? /* @__PURE__ */ C("div", {
|
|
349
350
|
className: s,
|
|
350
|
-
children: [
|
|
351
|
+
children: [f ? /* @__PURE__ */ S("p", {
|
|
351
352
|
className: a,
|
|
352
|
-
children:
|
|
353
|
-
}) : null,
|
|
354
|
-
schema:
|
|
355
|
-
initialValues:
|
|
353
|
+
children: f
|
|
354
|
+
}) : null, g ? /* @__PURE__ */ S(t, {
|
|
355
|
+
schema: g,
|
|
356
|
+
initialValues: u ?? {},
|
|
356
357
|
uiConfig: {
|
|
357
358
|
hideFormHeading: !0,
|
|
358
359
|
hideSectionHeadings: !0
|
|
@@ -361,67 +362,67 @@ var Y = ["levo-auth", "session"], Ce = () => {
|
|
|
361
362
|
show: !0,
|
|
362
363
|
text: n
|
|
363
364
|
},
|
|
364
|
-
theme: { style:
|
|
365
|
-
isLoading:
|
|
366
|
-
onSubmit: (e) =>
|
|
365
|
+
theme: { style: d },
|
|
366
|
+
isLoading: _.isPending,
|
|
367
|
+
onSubmit: (e) => _.mutate(e)
|
|
367
368
|
}) : null]
|
|
368
369
|
}) : null;
|
|
369
|
-
},
|
|
370
|
-
let t = i(), n =
|
|
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({
|
|
371
372
|
queryKey: ["levo-access", s],
|
|
372
373
|
queryFn: async () => (await t?.fetch.url(`/v1/builder/page/${s}/check-access`).post().json())?.content?.data ?? null,
|
|
373
|
-
enabled:
|
|
374
|
+
enabled: d,
|
|
374
375
|
staleTime: 0,
|
|
375
376
|
retry: 1
|
|
376
377
|
});
|
|
377
|
-
|
|
378
|
-
|
|
378
|
+
k(() => {
|
|
379
|
+
f.isError && t?.logger?.error("Page access check failed", { exception: b(f.error) });
|
|
379
380
|
}, [
|
|
380
|
-
|
|
381
|
-
|
|
381
|
+
f.isError,
|
|
382
|
+
f.error,
|
|
382
383
|
t
|
|
383
384
|
]);
|
|
384
|
-
let
|
|
385
|
+
let p = O(() => {
|
|
385
386
|
n.invalidateQueries({ queryKey: Y }), n.invalidateQueries({ queryKey: ["levo-access", s] });
|
|
386
387
|
}, [n, s]);
|
|
387
388
|
return {
|
|
388
|
-
...
|
|
389
|
-
rules:
|
|
390
|
-
invalid:
|
|
389
|
+
...xe({
|
|
390
|
+
rules: c,
|
|
391
|
+
invalid: l,
|
|
391
392
|
pageId: s,
|
|
392
393
|
hasClient: !!t,
|
|
393
394
|
isReady: r && o,
|
|
394
395
|
isLoggedIn: a,
|
|
395
396
|
check: {
|
|
396
|
-
isError:
|
|
397
|
-
isSuccess:
|
|
398
|
-
data:
|
|
397
|
+
isError: f.isError,
|
|
398
|
+
isSuccess: f.isSuccess,
|
|
399
|
+
data: f.data ?? null
|
|
399
400
|
}
|
|
400
401
|
}),
|
|
401
|
-
authMethods:
|
|
402
|
-
recheck:
|
|
403
|
-
isChecking:
|
|
402
|
+
authMethods: u,
|
|
403
|
+
recheck: p,
|
|
404
|
+
isChecking: f.isFetching
|
|
404
405
|
};
|
|
405
|
-
},
|
|
406
|
-
let t =
|
|
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);
|
|
407
408
|
return {
|
|
408
409
|
code: t?.code || "SOMETHING_WENT_WRONG",
|
|
409
410
|
title: t?.title || "Something went wrong",
|
|
410
411
|
message: t?.message || "Something went wrong. Please try again.",
|
|
411
412
|
fieldErrors: Object.fromEntries((t?.fieldErrors ?? []).map((e) => [e.param, e.message])),
|
|
412
|
-
isPendingApproval:
|
|
413
|
+
isPendingApproval: Ge(t?.code)
|
|
413
414
|
};
|
|
414
|
-
},
|
|
415
|
+
}, qe = {
|
|
415
416
|
code: "site.NOT_CONNECTED",
|
|
416
417
|
title: "Sign-in unavailable",
|
|
417
418
|
message: "This site is not connected to an account system yet.",
|
|
418
419
|
fieldErrors: {},
|
|
419
420
|
isPendingApproval: !1
|
|
420
|
-
},
|
|
421
|
-
let e = i(), t =
|
|
421
|
+
}, Je = () => {
|
|
422
|
+
let e = i(), t = L(), n = O(async (t, n) => {
|
|
422
423
|
if (!e?.membership) return {
|
|
423
424
|
ok: !1,
|
|
424
|
-
error:
|
|
425
|
+
error: qe
|
|
425
426
|
};
|
|
426
427
|
try {
|
|
427
428
|
return {
|
|
@@ -429,77 +430,77 @@ var Y = ["levo-auth", "session"], Ce = () => {
|
|
|
429
430
|
data: await n()
|
|
430
431
|
};
|
|
431
432
|
} catch (n) {
|
|
432
|
-
let r =
|
|
433
|
+
let r = b(n);
|
|
433
434
|
return e.logger?.error(t, { exception: r }), {
|
|
434
435
|
ok: !1,
|
|
435
|
-
error:
|
|
436
|
+
error: Ke(r)
|
|
436
437
|
};
|
|
437
438
|
}
|
|
438
|
-
}, [e]), r =
|
|
439
|
+
}, [e]), r = O(async ({ identifier: t, medium: n }) => {
|
|
439
440
|
await e?.membership?.requestOtp({
|
|
440
441
|
content: t,
|
|
441
442
|
...n === "whatsapp" ? { medium: "whatsapp" } : {}
|
|
442
443
|
});
|
|
443
|
-
}, [e]), a =
|
|
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 () => {
|
|
444
445
|
let n = await e?.membership?.signInWithOtp({
|
|
445
446
|
content: r,
|
|
446
447
|
code: i
|
|
447
448
|
}) ?? null;
|
|
448
449
|
return t.setQueryData(Y, n), t.invalidateQueries({ queryKey: Y }), n;
|
|
449
|
-
}) }),
|
|
450
|
+
}) }), c = F({ mutationFn: (t) => n("Failed to send magic link", async () => {
|
|
450
451
|
await e?.membership?.requestMagicLink({ content: t });
|
|
451
452
|
}) });
|
|
452
453
|
return {
|
|
453
454
|
sendCode: (e) => a.mutateAsync(e),
|
|
454
455
|
resendCode: (e) => o.mutateAsync(e),
|
|
455
456
|
verifyCode: (e) => s.mutateAsync(e),
|
|
456
|
-
sendMagicLink: (e) =>
|
|
457
|
+
sendMagicLink: (e) => c.mutateAsync(e),
|
|
457
458
|
isSendingCode: a.isPending,
|
|
458
459
|
isResendingCode: o.isPending,
|
|
459
460
|
isVerifying: s.isPending,
|
|
460
|
-
isSendingMagicLink:
|
|
461
|
+
isSendingMagicLink: c.isPending
|
|
461
462
|
};
|
|
462
|
-
},
|
|
463
|
-
let n = window.screenX + (window.outerWidth -
|
|
464
|
-
return window.open(e, t, `width=${
|
|
465
|
-
},
|
|
466
|
-
let a = i(), o =
|
|
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({
|
|
467
468
|
onSuccess: n,
|
|
468
469
|
onError: r
|
|
469
470
|
});
|
|
470
|
-
|
|
471
|
+
m.current = {
|
|
471
472
|
onSuccess: n,
|
|
472
473
|
onError: r
|
|
473
474
|
};
|
|
474
|
-
let
|
|
475
|
+
let h = I({
|
|
475
476
|
queryKey: ["levo-auth", "oauth-urls"],
|
|
476
477
|
queryFn: async () => await a?.membership?.getOAuthURL() ?? null,
|
|
477
478
|
enabled: s && !!a && e.length > 0,
|
|
478
479
|
staleTime: 5 * 6e4,
|
|
479
480
|
retry: !1
|
|
480
481
|
});
|
|
481
|
-
|
|
482
|
-
if (!
|
|
483
|
-
let e =
|
|
484
|
-
a?.logger?.error("Failed to load OAuth URLs", { exception: e }),
|
|
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({
|
|
485
486
|
code: e?.code || "SOMETHING_WENT_WRONG",
|
|
486
487
|
title: e?.title || "Sign-in unavailable",
|
|
487
488
|
message: e?.message || "We could not connect to the sign-in service.",
|
|
488
489
|
fieldErrors: {},
|
|
489
490
|
isPendingApproval: !1
|
|
490
491
|
});
|
|
491
|
-
}, [
|
|
492
|
-
let
|
|
493
|
-
window.clearInterval(
|
|
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);
|
|
494
495
|
}, []);
|
|
495
|
-
|
|
496
|
-
window.clearInterval(
|
|
496
|
+
k(() => () => {
|
|
497
|
+
window.clearInterval(p.current), f.current?.close();
|
|
497
498
|
}, []);
|
|
498
|
-
let
|
|
499
|
-
window.clearInterval(
|
|
500
|
-
let e =
|
|
499
|
+
let _ = O(() => {
|
|
500
|
+
window.clearInterval(p.current), p.current = window.setInterval(() => {
|
|
501
|
+
let e = f.current;
|
|
501
502
|
if (!e || e.closed) {
|
|
502
|
-
|
|
503
|
+
g();
|
|
503
504
|
return;
|
|
504
505
|
}
|
|
505
506
|
let t;
|
|
@@ -510,8 +511,8 @@ var Y = ["levo-auth", "session"], Ce = () => {
|
|
|
510
511
|
}
|
|
511
512
|
let n = t.get("code");
|
|
512
513
|
if (!n) return;
|
|
513
|
-
if (
|
|
514
|
-
|
|
514
|
+
if (g(), n.toLowerCase() === "success") {
|
|
515
|
+
d(null), o.invalidateQueries({ queryKey: Y }), m.current.onSuccess?.();
|
|
515
516
|
return;
|
|
516
517
|
}
|
|
517
518
|
let r = {
|
|
@@ -519,12 +520,12 @@ var Y = ["levo-auth", "session"], Ce = () => {
|
|
|
519
520
|
title: t.get("title") || "Sign-in failed",
|
|
520
521
|
message: t.get("message") || "We could not sign you in. Please try again.",
|
|
521
522
|
fieldErrors: {},
|
|
522
|
-
isPendingApproval:
|
|
523
|
+
isPendingApproval: Ge(t.get("code"))
|
|
523
524
|
};
|
|
524
|
-
r.isPendingApproval ||
|
|
525
|
-
},
|
|
526
|
-
}, [o,
|
|
527
|
-
let e =
|
|
525
|
+
r.isPendingApproval || d(r), m.current.onError?.(r);
|
|
526
|
+
}, Ye);
|
|
527
|
+
}, [o, g]), v = j(() => {
|
|
528
|
+
let e = h.data;
|
|
528
529
|
if (!e || typeof window > "u") return {};
|
|
529
530
|
let t = window.location.href, n = a?.pageContext;
|
|
530
531
|
return Object.fromEntries(Object.entries(e).flatMap(([e, r]) => {
|
|
@@ -536,15 +537,15 @@ var Y = ["levo-auth", "session"], Ce = () => {
|
|
|
536
537
|
return [];
|
|
537
538
|
}
|
|
538
539
|
}));
|
|
539
|
-
}, [
|
|
540
|
+
}, [h.data, a]);
|
|
540
541
|
return {
|
|
541
|
-
providers:
|
|
542
|
+
providers: j(() => e.filter((e) => !!v[e]).map((e) => ({
|
|
542
543
|
provider: e,
|
|
543
544
|
signIn: () => {
|
|
544
|
-
let n =
|
|
545
|
+
let n = v[e];
|
|
545
546
|
if (n) {
|
|
546
|
-
if (
|
|
547
|
-
|
|
547
|
+
if (d(null), f.current?.close(), f.current = Qe(n, t), !f.current) {
|
|
548
|
+
d({
|
|
548
549
|
code: "POPUP_BLOCKED",
|
|
549
550
|
title: "Popup blocked",
|
|
550
551
|
message: "Allow popups for this site, then try again.",
|
|
@@ -553,38 +554,38 @@ var Y = ["levo-auth", "session"], Ce = () => {
|
|
|
553
554
|
});
|
|
554
555
|
return;
|
|
555
556
|
}
|
|
556
|
-
|
|
557
|
+
l(e), _();
|
|
557
558
|
}
|
|
558
559
|
}
|
|
559
560
|
})), [
|
|
560
561
|
e,
|
|
561
|
-
|
|
562
|
+
v,
|
|
562
563
|
t,
|
|
563
|
-
|
|
564
|
+
_
|
|
564
565
|
]),
|
|
565
|
-
isLoading:
|
|
566
|
-
pendingProvider:
|
|
567
|
-
error:
|
|
568
|
-
clearError:
|
|
566
|
+
isLoading: h.isFetching,
|
|
567
|
+
pendingProvider: c,
|
|
568
|
+
error: u,
|
|
569
|
+
clearError: O(() => d(null), [])
|
|
569
570
|
};
|
|
570
|
-
},
|
|
571
|
+
}, et = 4, tt = (e) => /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(e.trim()), nt = (e) => RegExp("^\\d{4}$").test(e.trim()), rt = (e) => {
|
|
571
572
|
let t = e.replace(/\D/g, "").replace(/^0+/, "");
|
|
572
573
|
return t ? `+${t}` : "";
|
|
573
|
-
},
|
|
574
|
-
let o =
|
|
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);
|
|
575
576
|
l.current = r;
|
|
576
|
-
let u = Array.from({ length: n }, (t, n) => e[n] ?? ""), d =
|
|
577
|
+
let u = Array.from({ length: n }, (t, n) => e[n] ?? ""), d = O((e) => {
|
|
577
578
|
let t = Math.max(0, Math.min(n - 1, e)), r = o.current[t];
|
|
578
579
|
r?.focus(), r?.select();
|
|
579
580
|
}, [n]);
|
|
580
|
-
|
|
581
|
+
k(() => {
|
|
581
582
|
i && !a && d(0);
|
|
582
583
|
}, [
|
|
583
584
|
i,
|
|
584
585
|
a,
|
|
585
586
|
d
|
|
586
587
|
]);
|
|
587
|
-
let f =
|
|
588
|
+
let f = O((e, r) => {
|
|
588
589
|
let i = e.slice(0, n);
|
|
589
590
|
t(i), d(r), i.length === n && l.current?.(i);
|
|
590
591
|
}, [
|
|
@@ -652,13 +653,13 @@ var Y = ["levo-auth", "session"], Ce = () => {
|
|
|
652
653
|
role: "group",
|
|
653
654
|
"aria-label": `${n}-digit verification code`
|
|
654
655
|
},
|
|
655
|
-
clear:
|
|
656
|
+
clear: O(() => f("", 0), [f])
|
|
656
657
|
};
|
|
657
|
-
},
|
|
658
|
+
}, ot = D(() => import("./kbChat-L55effMi.js")), st = ({ site: e, path: t }) => {
|
|
658
659
|
let n = J(), r = e.workspace_id || void 0;
|
|
659
|
-
return !n || !r ? null : /* @__PURE__ */
|
|
660
|
+
return !n || !r ? null : /* @__PURE__ */ S(T, {
|
|
660
661
|
fallback: null,
|
|
661
|
-
children: /* @__PURE__ */
|
|
662
|
+
children: /* @__PURE__ */ S(ot, {
|
|
662
663
|
workspaceId: r,
|
|
663
664
|
siteName: e.name || void 0,
|
|
664
665
|
siteLogo: void 0,
|
|
@@ -668,67 +669,67 @@ var Y = ["levo-auth", "session"], Ce = () => {
|
|
|
668
669
|
path: t
|
|
669
670
|
})
|
|
670
671
|
});
|
|
671
|
-
},
|
|
672
|
+
}, ct = "(prefers-color-scheme: dark)", lt = (e) => {
|
|
672
673
|
try {
|
|
673
674
|
let t = localStorage.getItem(e);
|
|
674
675
|
return t === "light" || t === "dark" || t === "system" ? t : null;
|
|
675
676
|
} catch {
|
|
676
677
|
return null;
|
|
677
678
|
}
|
|
678
|
-
},
|
|
679
|
+
}, ut = (e, t) => {
|
|
679
680
|
try {
|
|
680
681
|
localStorage.setItem(e, t);
|
|
681
682
|
} catch {}
|
|
682
683
|
};
|
|
683
|
-
function
|
|
684
|
-
return `(function(){try{var t=localStorage.getItem(${JSON.stringify(e)});if(t!=='light'&&t!=='dark'&&t!=='system'){t=${JSON.stringify(t)}}var d=matchMedia('${
|
|
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){}})();`;
|
|
685
686
|
}
|
|
686
|
-
var
|
|
687
|
-
function
|
|
687
|
+
var ft = E(void 0), pt = (e) => e === "system" ? window.matchMedia(ct).matches ? "dark" : "light" : e;
|
|
688
|
+
function mt(e) {
|
|
688
689
|
let t = document.documentElement;
|
|
689
690
|
t.classList.remove("light", "dark"), t.classList.add(e), t.style.colorScheme = e;
|
|
690
691
|
}
|
|
691
|
-
var
|
|
692
|
-
let [r, i] =
|
|
693
|
-
return
|
|
694
|
-
i(
|
|
695
|
-
}, [t, n]),
|
|
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(() => {
|
|
696
697
|
if (!s) return;
|
|
697
|
-
let e =
|
|
698
|
-
|
|
699
|
-
}, [r, s]),
|
|
698
|
+
let e = pt(r);
|
|
699
|
+
mt(e), o(e);
|
|
700
|
+
}, [r, s]), k(() => {
|
|
700
701
|
if (!s || r !== "system") return;
|
|
701
|
-
let e = window.matchMedia(
|
|
702
|
+
let e = window.matchMedia(ct), t = () => {
|
|
702
703
|
let t = e.matches ? "dark" : "light";
|
|
703
|
-
|
|
704
|
+
mt(t), o(t);
|
|
704
705
|
};
|
|
705
706
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
706
|
-
}, [r, s]), /* @__PURE__ */
|
|
707
|
+
}, [r, s]), /* @__PURE__ */ C(ft.Provider, {
|
|
707
708
|
value: {
|
|
708
709
|
mode: r,
|
|
709
710
|
resolvedMode: a,
|
|
710
711
|
setMode: (e) => {
|
|
711
|
-
|
|
712
|
+
ut(n, e), i(e);
|
|
712
713
|
}
|
|
713
714
|
},
|
|
714
|
-
children: [/* @__PURE__ */
|
|
715
|
+
children: [/* @__PURE__ */ S(te, { children: dt(n, t) }), e]
|
|
715
716
|
});
|
|
716
717
|
};
|
|
717
|
-
function
|
|
718
|
-
let e =
|
|
718
|
+
function gt() {
|
|
719
|
+
let e = ee(ft);
|
|
719
720
|
if (e === void 0) throw Error("useColorMode must be used within a ColorModeProvider");
|
|
720
721
|
return e;
|
|
721
722
|
}
|
|
722
723
|
//#endregion
|
|
723
724
|
//#region src/form/LevoForm.tsx
|
|
724
|
-
var
|
|
725
|
-
let l = i(), { schema:
|
|
726
|
-
return l ? /* @__PURE__ */
|
|
727
|
-
...
|
|
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,
|
|
728
729
|
className: c,
|
|
729
|
-
children: /* @__PURE__ */
|
|
730
|
-
fetchedSchema:
|
|
731
|
-
isLoading:
|
|
730
|
+
children: /* @__PURE__ */ S(e, {
|
|
731
|
+
fetchedSchema: u,
|
|
732
|
+
isLoading: d,
|
|
732
733
|
submitButtonConfig: {
|
|
733
734
|
show: !0,
|
|
734
735
|
text: n
|
|
@@ -737,34 +738,34 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
737
738
|
hideFormHeading: !0,
|
|
738
739
|
hideSectionHeadings: !0
|
|
739
740
|
},
|
|
740
|
-
theme: { style:
|
|
741
|
+
theme: { style: p },
|
|
741
742
|
hiddenFields: r,
|
|
742
743
|
formVariant: a,
|
|
743
744
|
successConfig: o
|
|
744
745
|
})
|
|
745
746
|
}) : null;
|
|
746
|
-
},
|
|
747
|
+
}, vt = 1400, yt = 12 * 1024 * 1024, bt = new Set(["transparent", "rgba(0, 0, 0, 0)"]), xt = {
|
|
747
748
|
imagePlaceholder: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",
|
|
748
749
|
onImageErrorHandler: () => void 0
|
|
749
|
-
},
|
|
750
|
+
}, St = (e) => {
|
|
750
751
|
let t = getComputedStyle(e);
|
|
751
|
-
return !
|
|
752
|
-
},
|
|
752
|
+
return !bt.has(t.backgroundColor) || t.backgroundImage !== "none";
|
|
753
|
+
}, Ct = (e) => {
|
|
753
754
|
for (let t = e; t; t = t.parentElement) {
|
|
754
755
|
let e = getComputedStyle(t).backgroundColor;
|
|
755
|
-
if (!
|
|
756
|
+
if (!bt.has(e)) return e;
|
|
756
757
|
}
|
|
757
758
|
return "#ffffff";
|
|
758
|
-
},
|
|
759
|
-
let { toPng: n } = await import("./es-
|
|
760
|
-
...
|
|
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,
|
|
761
762
|
pixelRatio: a,
|
|
762
|
-
backgroundColor:
|
|
763
|
+
backgroundColor: Ct(e),
|
|
763
764
|
filter: (e) => !t.includes(e)
|
|
764
765
|
});
|
|
765
|
-
if (o.length >
|
|
766
|
+
if (o.length > yt) throw Error("capture too large");
|
|
766
767
|
return o;
|
|
767
|
-
},
|
|
768
|
+
}, Tt = 4, Et = 4e3, Dt = (e, t) => {
|
|
768
769
|
let n = document.elementFromPoint(e.x + e.width / 2, e.y + e.height / 2);
|
|
769
770
|
for (; n && t.includes(n);) n = n.parentElement;
|
|
770
771
|
let r = document.body;
|
|
@@ -775,8 +776,8 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
775
776
|
break;
|
|
776
777
|
}
|
|
777
778
|
}
|
|
778
|
-
let i = window.innerWidth * window.innerHeight *
|
|
779
|
-
for (; !
|
|
779
|
+
let i = window.innerWidth * window.innerHeight * Tt || 2 ** 53 - 1, a = r;
|
|
780
|
+
for (; !St(a);) {
|
|
780
781
|
let e = a.parentElement;
|
|
781
782
|
if (!e || e === document.documentElement) break;
|
|
782
783
|
let t = e.getBoundingClientRect();
|
|
@@ -784,13 +785,13 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
784
785
|
a = e;
|
|
785
786
|
}
|
|
786
787
|
return a;
|
|
787
|
-
},
|
|
788
|
-
let { toCanvas: n } = await import("./es-
|
|
789
|
-
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);
|
|
790
791
|
let c = await n(r, {
|
|
791
|
-
...
|
|
792
|
+
...xt,
|
|
792
793
|
pixelRatio: o,
|
|
793
|
-
backgroundColor:
|
|
794
|
+
backgroundColor: Ct(r),
|
|
794
795
|
filter: (e) => !t.includes(e)
|
|
795
796
|
}), l = document.createElement("canvas");
|
|
796
797
|
l.width = Math.max(1, Math.round(e.width * o)), l.height = Math.max(1, Math.round(e.height * o));
|
|
@@ -798,9 +799,9 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
798
799
|
if (!u) throw Error("no 2d context");
|
|
799
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);
|
|
800
801
|
let d = l.toDataURL("image/png");
|
|
801
|
-
if (d.length >
|
|
802
|
+
if (d.length > yt) throw Error("capture too large");
|
|
802
803
|
return d;
|
|
803
|
-
},
|
|
804
|
+
}, kt = {
|
|
804
805
|
ring: 99997,
|
|
805
806
|
overlay: 99998,
|
|
806
807
|
label: 99999
|
|
@@ -813,24 +814,24 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
813
814
|
}, Z = (e) => {
|
|
814
815
|
let t = e?.getAttribute("data-tsd-source");
|
|
815
816
|
return t ? t.replace(/^\//, "") : null;
|
|
816
|
-
},
|
|
817
|
-
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);
|
|
818
819
|
return n < 0 ? 0 : n;
|
|
819
|
-
},
|
|
820
|
-
let n =
|
|
820
|
+
}, Mt = (e, t = 0) => {
|
|
821
|
+
let n = At(e);
|
|
821
822
|
return n[t] ?? n[0] ?? null;
|
|
822
|
-
},
|
|
823
|
+
}, Nt = (e, t) => {
|
|
823
824
|
let n = (e.getAttribute("data-staged-key") || "").split(/\s+/).filter(Boolean);
|
|
824
825
|
n.includes(t) || e.setAttribute("data-staged-key", [...n, t].join(" "));
|
|
825
|
-
},
|
|
826
|
+
}, Pt = (e, t) => {
|
|
826
827
|
let n = (e.getAttribute("data-staged-key") || "").split(/\s+/).filter((e) => e && e !== t);
|
|
827
828
|
n.length ? e.setAttribute("data-staged-key", n.join(" ")) : e.removeAttribute("data-staged-key");
|
|
828
|
-
},
|
|
829
|
+
}, Ft = (e, t) => {
|
|
829
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("");
|
|
830
831
|
if (!n) return "";
|
|
831
832
|
let r = `[data-staged-key~="${CSS.escape(e)}"]{${n}}`, i = t.media?.replace(/[;{}]/g, "").trim();
|
|
832
833
|
return i ? `@media ${i}{${r}}` : r;
|
|
833
|
-
},
|
|
834
|
+
}, It = (e) => {
|
|
834
835
|
let t = e.tagName.toLowerCase();
|
|
835
836
|
return t === "input" ? {
|
|
836
837
|
checkbox: "Checkbox",
|
|
@@ -872,31 +873,31 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
872
873
|
aside: "Sidebar",
|
|
873
874
|
div: "Container"
|
|
874
875
|
}[t] || `${t.charAt(0).toUpperCase()}${t.slice(1)}`;
|
|
875
|
-
},
|
|
876
|
-
let t =
|
|
877
|
-
return n ? `${t} · ${n.length >
|
|
878
|
-
},
|
|
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) => {
|
|
879
880
|
let t = [], n = e;
|
|
880
881
|
for (; n && n.nodeType === 1 && n !== document.body && t.length < 8;) t.unshift(n.tagName.toLowerCase()), n = n.parentElement;
|
|
881
882
|
return t.join(" > ");
|
|
882
|
-
},
|
|
883
|
+
}, Bt = () => {
|
|
883
884
|
let e = document.createElement("div");
|
|
884
|
-
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`;
|
|
885
886
|
let t = document.createElement("div");
|
|
886
|
-
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`;
|
|
887
888
|
let n = document.createElement("div");
|
|
888
|
-
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`;
|
|
889
890
|
let r = document.createElement("div");
|
|
890
|
-
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`, {
|
|
891
892
|
overlay: e,
|
|
892
893
|
label: t,
|
|
893
894
|
ring: n,
|
|
894
895
|
ringLabel: r
|
|
895
896
|
};
|
|
896
|
-
},
|
|
897
|
+
}, Vt = (e, t, n) => {
|
|
897
898
|
let r = n.getBoundingClientRect();
|
|
898
|
-
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 =
|
|
899
|
-
},
|
|
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) => {
|
|
900
901
|
let t = (e instanceof Element ? e : null)?.closest("a[href]");
|
|
901
902
|
if (!t || t.target === "_blank") return null;
|
|
902
903
|
let n;
|
|
@@ -906,11 +907,11 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
906
907
|
return null;
|
|
907
908
|
}
|
|
908
909
|
return n.protocol !== "http:" && n.protocol !== "https:" || n.origin === location.origin ? null : n.href;
|
|
909
|
-
},
|
|
910
|
+
}, Ut = (e) => {
|
|
910
911
|
if (!e) return !1;
|
|
911
912
|
let t = e.tagName;
|
|
912
913
|
return t === "INPUT" || t === "TEXTAREA" || t === "SELECT" || e.isContentEditable === !0;
|
|
913
|
-
},
|
|
914
|
+
}, Wt = (e) => {
|
|
914
915
|
if (!e.childNodes.length) return !1;
|
|
915
916
|
let t = !1;
|
|
916
917
|
for (let n of e.childNodes) {
|
|
@@ -918,7 +919,7 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
918
919
|
(n.textContent ?? "").trim() && (t = !0);
|
|
919
920
|
}
|
|
920
921
|
return t;
|
|
921
|
-
},
|
|
922
|
+
}, Gt = 2e3, Kt = (e) => {
|
|
922
923
|
let t = [], n = e;
|
|
923
924
|
for (; n && n.nodeType === 1 && n !== document.body && t.length < 8;) {
|
|
924
925
|
let e = Z(n);
|
|
@@ -929,22 +930,22 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
929
930
|
}), n = n.parentElement;
|
|
930
931
|
}
|
|
931
932
|
return t;
|
|
932
|
-
},
|
|
933
|
-
let t = Z(e), n = 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);
|
|
934
935
|
return {
|
|
935
936
|
tag: e.tagName.toLowerCase(),
|
|
936
937
|
classes: typeof e.className == "string" ? e.className.trim() : "",
|
|
937
938
|
text: (e.innerText || "").trim().slice(0, 120),
|
|
938
|
-
label:
|
|
939
|
-
path:
|
|
939
|
+
label: Rt(e),
|
|
940
|
+
path: zt(e),
|
|
940
941
|
source: t,
|
|
941
942
|
index: r,
|
|
942
943
|
occurrences: n,
|
|
943
|
-
ancestors:
|
|
944
|
+
ancestors: Kt(e),
|
|
944
945
|
...i === void 0 ? {} : { fullText: i },
|
|
945
946
|
...a ? { sourceBinding: a } : {}
|
|
946
947
|
};
|
|
947
|
-
},
|
|
948
|
+
}, Jt = (e) => {
|
|
948
949
|
let t = e.closest("[data-levo-source]");
|
|
949
950
|
if (!t) return;
|
|
950
951
|
let n = t.getAttribute("data-levo-source") ?? "", r = Z(t), i;
|
|
@@ -957,11 +958,11 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
957
958
|
raw: n,
|
|
958
959
|
element: {
|
|
959
960
|
source: r ?? "",
|
|
960
|
-
index: r ?
|
|
961
|
+
index: r ? jt(t, r) : 0
|
|
961
962
|
},
|
|
962
963
|
...i === void 0 ? {} : { config: i }
|
|
963
964
|
};
|
|
964
|
-
},
|
|
965
|
+
}, Yt = () => Array.from(document.querySelectorAll("[data-levo-source]")).map((e) => {
|
|
965
966
|
let t = e.getAttribute("data-levo-source") ?? "", n = Z(e), r;
|
|
966
967
|
try {
|
|
967
968
|
r = JSON.parse(t);
|
|
@@ -972,18 +973,18 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
972
973
|
raw: t,
|
|
973
974
|
element: {
|
|
974
975
|
source: n ?? "",
|
|
975
|
-
index: n ?
|
|
976
|
+
index: n ? jt(e, n) : 0
|
|
976
977
|
},
|
|
977
978
|
tag: e.tagName.toLowerCase(),
|
|
978
|
-
label:
|
|
979
|
+
label: Rt(e),
|
|
979
980
|
...r === void 0 ? {} : { config: r }
|
|
980
981
|
};
|
|
981
|
-
}),
|
|
982
|
+
}), Xt = 14, Zt = 2e3, Qt = 100, $t = 48, en = new Set([
|
|
982
983
|
"script",
|
|
983
984
|
"style",
|
|
984
985
|
"template",
|
|
985
986
|
"noscript"
|
|
986
|
-
]),
|
|
987
|
+
]), tn = (e, t) => t.includes(e) || e.id === "studio-staged" || en.has(e.tagName.toLowerCase()), nn = (e) => {
|
|
987
988
|
let t = !1, n = 0, r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
988
989
|
for (let e of Array.from(document.querySelectorAll("[data-tsd-source]"))) {
|
|
989
990
|
let t = Z(e);
|
|
@@ -995,11 +996,11 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
995
996
|
for (let t of e.childNodes) {
|
|
996
997
|
if (t.nodeType !== 3) continue;
|
|
997
998
|
let e = (t.textContent ?? "").replace(/\s+/g, " ").trim();
|
|
998
|
-
if (e) return e.length >
|
|
999
|
+
if (e) return e.length > $t ? `${e.slice(0, $t).trimEnd()}…` : e;
|
|
999
1000
|
}
|
|
1000
1001
|
}, o = (i, s) => {
|
|
1001
1002
|
n++;
|
|
1002
|
-
let c = Z(i), l = a(i), u = Array.from(i.children).filter((t) => !
|
|
1003
|
+
let c = Z(i), l = a(i), u = Array.from(i.children).filter((t) => !tn(t, e)), d = {
|
|
1003
1004
|
tag: i.tagName.toLowerCase(),
|
|
1004
1005
|
...c ? {
|
|
1005
1006
|
source: c,
|
|
@@ -1010,9 +1011,9 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1010
1011
|
childCount: u.length,
|
|
1011
1012
|
children: []
|
|
1012
1013
|
};
|
|
1013
|
-
if (s >=
|
|
1014
|
+
if (s >= Xt) return u.length && (t = !0), d;
|
|
1014
1015
|
for (let e of u) {
|
|
1015
|
-
if (d.children.length >=
|
|
1016
|
+
if (d.children.length >= Qt || n >= Zt) {
|
|
1016
1017
|
t = !0;
|
|
1017
1018
|
break;
|
|
1018
1019
|
}
|
|
@@ -1024,7 +1025,7 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1024
1025
|
tree: o(document.body, 0),
|
|
1025
1026
|
truncated: t
|
|
1026
1027
|
};
|
|
1027
|
-
},
|
|
1028
|
+
}, rn = () => {
|
|
1028
1029
|
let e = null;
|
|
1029
1030
|
return {
|
|
1030
1031
|
send: (t) => {
|
|
@@ -1039,7 +1040,7 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1039
1040
|
return !0;
|
|
1040
1041
|
}
|
|
1041
1042
|
};
|
|
1042
|
-
},
|
|
1043
|
+
}, an = (e) => {
|
|
1043
1044
|
let t = location.pathname, n = () => {
|
|
1044
1045
|
location.pathname !== t && (t = location.pathname, e.onPathChange());
|
|
1045
1046
|
}, r = !1;
|
|
@@ -1059,7 +1060,7 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1059
1060
|
e.__inspectorPatched && e.__orig && (history.pushState = e.__orig), t.__inspectorPatched && t.__orig && (history.replaceState = t.__orig);
|
|
1060
1061
|
}
|
|
1061
1062
|
} };
|
|
1062
|
-
},
|
|
1063
|
+
}, on = (e) => {
|
|
1063
1064
|
let { channel: t, originals: n, staged: r } = e, i = t.send, a = null;
|
|
1064
1065
|
return { onMessage: (o) => {
|
|
1065
1066
|
let s = o.data;
|
|
@@ -1067,7 +1068,7 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1067
1068
|
if (s.type === "set-inspect") e.setInspect(s.enabled);
|
|
1068
1069
|
else if (s.type === "set-text-edit") e.setTextEdit(s.enabled);
|
|
1069
1070
|
else if (s.type === "revert-text") {
|
|
1070
|
-
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);
|
|
1071
1072
|
i && r != null && (i.textContent = r);
|
|
1072
1073
|
} else if (s.type === "stage-style") {
|
|
1073
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;
|
|
@@ -1126,7 +1127,7 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1126
1127
|
}
|
|
1127
1128
|
e.syncDomObserver();
|
|
1128
1129
|
} else if (s.type === "select-element") {
|
|
1129
|
-
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;
|
|
1130
1131
|
if (!r) {
|
|
1131
1132
|
i({
|
|
1132
1133
|
type: "select-miss",
|
|
@@ -1142,10 +1143,10 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1142
1143
|
behavior: "smooth"
|
|
1143
1144
|
}), i({
|
|
1144
1145
|
type: "element-selected",
|
|
1145
|
-
element:
|
|
1146
|
+
element: qt(r)
|
|
1146
1147
|
});
|
|
1147
1148
|
} else if (s.type === "edit-element") {
|
|
1148
|
-
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;
|
|
1149
1150
|
if (!r) {
|
|
1150
1151
|
i({
|
|
1151
1152
|
type: "select-miss",
|
|
@@ -1161,12 +1162,12 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1161
1162
|
behavior: "smooth"
|
|
1162
1163
|
}), i({
|
|
1163
1164
|
type: "element-selected",
|
|
1164
|
-
element:
|
|
1165
|
+
element: qt(r)
|
|
1165
1166
|
}), e.isTextEditing() || e.setTextEdit(!0);
|
|
1166
1167
|
let o = e.editableTarget(r);
|
|
1167
1168
|
o && e.startEditAtEnd(o);
|
|
1168
1169
|
} else if (s.type === "highlight-element") {
|
|
1169
|
-
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;
|
|
1170
1171
|
if (!r) a = null, e.hideTextHover(), i({
|
|
1171
1172
|
type: "highlight-miss",
|
|
1172
1173
|
element: {
|
|
@@ -1184,7 +1185,7 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1184
1185
|
}
|
|
1185
1186
|
} else if (s.type === "clear-highlight") a && (a = null, !e.isInspecting() && !e.editingNode() && e.hideTextHover());
|
|
1186
1187
|
else if (s.type === "request-layers") {
|
|
1187
|
-
let { tree: t, truncated: n } =
|
|
1188
|
+
let { tree: t, truncated: n } = nn(e.ownNodes);
|
|
1188
1189
|
i({
|
|
1189
1190
|
type: "layers-tree",
|
|
1190
1191
|
tree: t,
|
|
@@ -1192,7 +1193,7 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1192
1193
|
});
|
|
1193
1194
|
} else if (s.type === "request-sources") i({
|
|
1194
1195
|
type: "sources-list",
|
|
1195
|
-
sources:
|
|
1196
|
+
sources: Yt()
|
|
1196
1197
|
});
|
|
1197
1198
|
else if (s.type === "capture-selected") {
|
|
1198
1199
|
let t = String(s.requestId || "");
|
|
@@ -1207,7 +1208,7 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1207
1208
|
});
|
|
1208
1209
|
return;
|
|
1209
1210
|
}
|
|
1210
|
-
|
|
1211
|
+
wt(n, e.ownNodes).then((e) => {
|
|
1211
1212
|
console.info(`[levo-inspector] element capture ok <${n.tagName.toLowerCase()}> (${Math.round(e.length / 1024)}kB)`), i({
|
|
1212
1213
|
type: "capture-result",
|
|
1213
1214
|
requestId: t,
|
|
@@ -1228,7 +1229,7 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1228
1229
|
}
|
|
1229
1230
|
}
|
|
1230
1231
|
} };
|
|
1231
|
-
},
|
|
1232
|
+
}, sn = () => {
|
|
1232
1233
|
let e = /* @__PURE__ */ new Map(), t = () => {
|
|
1233
1234
|
if (e.size > 50) {
|
|
1234
1235
|
let t = e.keys().next().value;
|
|
@@ -1248,31 +1249,31 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1248
1249
|
return e.delete(t), n;
|
|
1249
1250
|
}
|
|
1250
1251
|
};
|
|
1251
|
-
},
|
|
1252
|
+
}, cn = 6, ln = 12, un = 12, dn = .6, fn = (e, t, n, r) => ({
|
|
1252
1253
|
x: Math.min(e, n),
|
|
1253
1254
|
y: Math.min(t, r),
|
|
1254
1255
|
width: Math.abs(n - e),
|
|
1255
1256
|
height: Math.abs(r - t)
|
|
1256
|
-
}),
|
|
1257
|
+
}), pn = (e, t) => {
|
|
1257
1258
|
let n = e.x + e.width, r = e.y + e.height, i = [];
|
|
1258
1259
|
for (let a of Array.from(document.querySelectorAll("[data-tsd-source]"))) {
|
|
1259
1260
|
if (t.includes(a)) continue;
|
|
1260
1261
|
let o = a.getBoundingClientRect(), s = o.width * o.height;
|
|
1261
|
-
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);
|
|
1262
1263
|
}
|
|
1263
1264
|
let a = new Set(i), o = i.filter((e) => {
|
|
1264
1265
|
for (let t = e.parentElement; t; t = t.parentElement) if (a.has(t)) return !1;
|
|
1265
1266
|
return !0;
|
|
1266
|
-
}), s = o.length >
|
|
1267
|
-
for (let e of o.slice(0,
|
|
1267
|
+
}), s = o.length > un, c = [], l = [];
|
|
1268
|
+
for (let e of o.slice(0, un)) {
|
|
1268
1269
|
let t = Z(e);
|
|
1269
1270
|
if (!t) continue;
|
|
1270
1271
|
let n = (e.innerText || "").replace(/\s+/g, " ").trim().slice(0, 80);
|
|
1271
1272
|
c.push({
|
|
1272
1273
|
source: t,
|
|
1273
|
-
index:
|
|
1274
|
+
index: jt(e, t),
|
|
1274
1275
|
tag: e.tagName.toLowerCase(),
|
|
1275
|
-
label:
|
|
1276
|
+
label: Rt(e),
|
|
1276
1277
|
...n ? { text: n } : {}
|
|
1277
1278
|
}), l.push(e);
|
|
1278
1279
|
}
|
|
@@ -1281,12 +1282,12 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1281
1282
|
nodes: l,
|
|
1282
1283
|
truncated: s
|
|
1283
1284
|
};
|
|
1284
|
-
},
|
|
1285
|
+
}, mn = () => Array.from({ length: un }, () => {
|
|
1285
1286
|
let e = document.createElement("div");
|
|
1286
|
-
return e.style.cssText = `position:fixed;pointer-events:none;z-index:${
|
|
1287
|
-
}),
|
|
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 = () => {
|
|
1288
1289
|
let e = document.createElement("div");
|
|
1289
|
-
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`;
|
|
1290
1291
|
let t = null, n = !1, r = 0, i = 0, a = () => {
|
|
1291
1292
|
e.style.display = "none";
|
|
1292
1293
|
};
|
|
@@ -1301,31 +1302,31 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1301
1302
|
pointerMove: (a, o) => {
|
|
1302
1303
|
if (!t) return;
|
|
1303
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) {
|
|
1304
|
-
if (Math.abs(a - t.x) <
|
|
1305
|
+
if (Math.abs(a - t.x) < cn && Math.abs(o - t.y) < cn) return;
|
|
1305
1306
|
n = !0;
|
|
1306
1307
|
}
|
|
1307
|
-
let s =
|
|
1308
|
+
let s = fn(t.x, t.y, a, o);
|
|
1308
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`;
|
|
1309
1310
|
},
|
|
1310
1311
|
pointerUp: () => {
|
|
1311
1312
|
let e = n, o = t;
|
|
1312
1313
|
if (t = null, n = !1, a(), !e || !o) return null;
|
|
1313
|
-
let s =
|
|
1314
|
-
return s.width <
|
|
1314
|
+
let s = fn(o.x, o.y, r, i);
|
|
1315
|
+
return s.width < ln || s.height < ln ? null : s;
|
|
1315
1316
|
},
|
|
1316
1317
|
cancel: () => {
|
|
1317
1318
|
t = null, n = !1, a();
|
|
1318
1319
|
},
|
|
1319
1320
|
isDragging: () => n
|
|
1320
1321
|
};
|
|
1321
|
-
},
|
|
1322
|
+
}, gn = (e) => {
|
|
1322
1323
|
let { originals: t, editingNode: n } = e, r = /* @__PURE__ */ new Map(), i = () => {
|
|
1323
1324
|
let e = document.getElementById("studio-staged");
|
|
1324
1325
|
return e || (e = document.createElement("style"), e.id = "studio-staged", document.head.appendChild(e)), e;
|
|
1325
1326
|
}, a = () => {
|
|
1326
1327
|
let e = [];
|
|
1327
1328
|
for (let [t, n] of r) if (n.kind === "style") {
|
|
1328
|
-
let r =
|
|
1329
|
+
let r = Ft(t, n);
|
|
1329
1330
|
r && e.push(r);
|
|
1330
1331
|
}
|
|
1331
1332
|
let t = e.join("\n");
|
|
@@ -1333,8 +1334,8 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1333
1334
|
let n = i();
|
|
1334
1335
|
n.textContent !== t && (n.textContent = t);
|
|
1335
1336
|
}, o = (e, r) => {
|
|
1336
|
-
let i =
|
|
1337
|
-
if (i) if (r.kind === "style")
|
|
1337
|
+
let i = Mt(r.source, r.index);
|
|
1338
|
+
if (i) if (r.kind === "style") Nt(i, e);
|
|
1338
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");
|
|
1339
1340
|
else {
|
|
1340
1341
|
if (i === n()) return;
|
|
@@ -1347,8 +1348,8 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1347
1348
|
let n = r.get(e);
|
|
1348
1349
|
if (!n) return;
|
|
1349
1350
|
r.delete(e);
|
|
1350
|
-
let i =
|
|
1351
|
-
if (n.kind === "style") i &&
|
|
1351
|
+
let i = Mt(n.source, n.index);
|
|
1352
|
+
if (n.kind === "style") i && Pt(i, e), a();
|
|
1352
1353
|
else if (n.kind === "image") {
|
|
1353
1354
|
let e = t.restore(`${n.source}#${n.index}:src`), r = t.restore(`${n.source}#${n.index}:srcset`);
|
|
1354
1355
|
i && (e != null && (e ? i.setAttribute("src", e) : i.removeAttribute("src")), r != null && (r ? i.setAttribute("srcset", r) : i.removeAttribute("srcset")));
|
|
@@ -1377,7 +1378,7 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1377
1378
|
for (let e of Array.from(document.querySelectorAll("[data-staged-key]"))) e.removeAttribute("data-staged-key");
|
|
1378
1379
|
}
|
|
1379
1380
|
};
|
|
1380
|
-
},
|
|
1381
|
+
}, _n = (e) => {
|
|
1381
1382
|
let { channel: t, originals: n, clearTextHover: r } = e, i = null, a = "", o = 0, s = (() => {
|
|
1382
1383
|
try {
|
|
1383
1384
|
let e = document.createElement("div");
|
|
@@ -1396,7 +1397,7 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1396
1397
|
n.selectNodeContents(e), n.collapse(!1), t.removeAllRanges(), t.addRange(n);
|
|
1397
1398
|
}, d = (e, t = !1) => {
|
|
1398
1399
|
if (i === e) return;
|
|
1399
|
-
i && p(i), i = e, a = Z(e) || "", o =
|
|
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");
|
|
1400
1401
|
let d = e;
|
|
1401
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);
|
|
1402
1403
|
}, f = (e) => {
|
|
@@ -1415,7 +1416,7 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1415
1416
|
tag: e.tagName.toLowerCase(),
|
|
1416
1417
|
value: c,
|
|
1417
1418
|
previous: s,
|
|
1418
|
-
occurrences: r ?
|
|
1419
|
+
occurrences: r ? At(r).length : 1
|
|
1419
1420
|
}
|
|
1420
1421
|
});
|
|
1421
1422
|
}, m = (e) => {
|
|
@@ -1434,16 +1435,16 @@ var it = ({ source: t, submitLabel: n = "Submit", hiddenFields: r, formVariant:
|
|
|
1434
1435
|
i && f(i);
|
|
1435
1436
|
}
|
|
1436
1437
|
};
|
|
1437
|
-
},
|
|
1438
|
-
function
|
|
1439
|
-
return
|
|
1438
|
+
}, vn = "2026-07-24g · element-capture + region-drag + region-highlights (stale-region guard)";
|
|
1439
|
+
function yn() {
|
|
1440
|
+
return k(() => bn(), []), null;
|
|
1440
1441
|
}
|
|
1441
|
-
function
|
|
1442
|
-
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();
|
|
1443
1444
|
document.body.append(s, c, l, u);
|
|
1444
|
-
let d =
|
|
1445
|
+
let d = hn();
|
|
1445
1446
|
document.body.append(d.node);
|
|
1446
|
-
let f =
|
|
1447
|
+
let f = mn();
|
|
1447
1448
|
document.body.append(...f);
|
|
1448
1449
|
let p = [
|
|
1449
1450
|
s,
|
|
@@ -1473,14 +1474,14 @@ function sn() {
|
|
|
1473
1474
|
}, S = (e) => !e || p.includes(e) || e === document.body || e === document.documentElement, C = (e) => {
|
|
1474
1475
|
if (!e || S(e)) return null;
|
|
1475
1476
|
let t = Z(e) ? e : e.closest("[data-tsd-source]");
|
|
1476
|
-
return !t || S(t) || !
|
|
1477
|
-
}, w = (e) =>
|
|
1477
|
+
return !t || S(t) || !Wt(t) ? null : t;
|
|
1478
|
+
}, w = (e) => Vt(s, c, e), T = () => {
|
|
1478
1479
|
if (n) {
|
|
1479
1480
|
if (!n.isConnected) {
|
|
1480
|
-
|
|
1481
|
+
N();
|
|
1481
1482
|
return;
|
|
1482
1483
|
}
|
|
1483
|
-
|
|
1484
|
+
Vt(l, u, n);
|
|
1484
1485
|
}
|
|
1485
1486
|
}, E = 0, D = () => {
|
|
1486
1487
|
E || !n || r || (E = requestAnimationFrame(() => {
|
|
@@ -1490,106 +1491,106 @@ function sn() {
|
|
|
1490
1491
|
for (let t of e) {
|
|
1491
1492
|
let e = t.target;
|
|
1492
1493
|
if (!p.some((t) => t === e) && !(t.type === "attributes" && t.attributeName === "data-staged-key")) {
|
|
1493
|
-
D(),
|
|
1494
|
+
D(), L.scheduleReapply();
|
|
1494
1495
|
return;
|
|
1495
1496
|
}
|
|
1496
1497
|
}
|
|
1497
|
-
}), k = !1,
|
|
1498
|
+
}), k = !1, A = () => {
|
|
1498
1499
|
k ||= (ee.observe(document.documentElement, {
|
|
1499
1500
|
attributes: !0,
|
|
1500
1501
|
childList: !0,
|
|
1501
1502
|
characterData: !0,
|
|
1502
1503
|
subtree: !0
|
|
1503
1504
|
}), !0);
|
|
1504
|
-
}, A = () => {
|
|
1505
|
-
k &&= (ee.disconnect(), !1);
|
|
1506
|
-
}, ne = () => {
|
|
1507
|
-
O.disconnect(), n?.isConnected && (O.observe(n), te());
|
|
1508
1505
|
}, j = () => {
|
|
1509
|
-
|
|
1510
|
-
},
|
|
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 = () => {
|
|
1511
1512
|
s.style.display = "none", c.style.display = "none";
|
|
1512
|
-
},
|
|
1513
|
+
}, I = _n({
|
|
1513
1514
|
channel: o,
|
|
1514
1515
|
originals: a,
|
|
1515
1516
|
clearTextHover: () => {
|
|
1516
|
-
i = null,
|
|
1517
|
+
i = null, F();
|
|
1517
1518
|
}
|
|
1518
|
-
}),
|
|
1519
|
+
}), L = gn({
|
|
1519
1520
|
originals: a,
|
|
1520
|
-
editingNode:
|
|
1521
|
-
}),
|
|
1522
|
-
n?.isConnected ||
|
|
1523
|
-
},
|
|
1524
|
-
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({
|
|
1525
1526
|
type: "inspect-state",
|
|
1526
1527
|
enabled: e
|
|
1527
1528
|
});
|
|
1528
|
-
},
|
|
1529
|
+
}, z = (t) => {
|
|
1529
1530
|
if (r = !!t, r) {
|
|
1530
|
-
e &&
|
|
1531
|
+
e && R(!1), l.style.display = "none", u.style.display = "none";
|
|
1531
1532
|
for (let e of f) e.style.display = "none";
|
|
1532
|
-
} else
|
|
1533
|
+
} else I.commitIfEditing(), F(), document.documentElement.style.cursor = "", n && T(), m.length > 0 && _();
|
|
1533
1534
|
o.send({
|
|
1534
1535
|
type: "text-edit-state",
|
|
1535
1536
|
enabled: r
|
|
1536
1537
|
});
|
|
1537
|
-
},
|
|
1538
|
-
|
|
1539
|
-
let n = document.elementFromPoint(
|
|
1538
|
+
}, ne = 0, re = 0, ie = 0, ae = () => {
|
|
1539
|
+
ne = 0;
|
|
1540
|
+
let n = document.elementFromPoint(re, ie);
|
|
1540
1541
|
if (!S(n)) {
|
|
1541
1542
|
if (r) {
|
|
1542
1543
|
let e = C(n);
|
|
1543
|
-
if (e && e ===
|
|
1544
|
-
i = null,
|
|
1544
|
+
if (e && e === I.editingNode()) {
|
|
1545
|
+
i = null, F(), document.documentElement.style.cursor = "";
|
|
1545
1546
|
return;
|
|
1546
1547
|
}
|
|
1547
|
-
i = e, document.documentElement.style.cursor = e ? "text" : "", e ?
|
|
1548
|
+
i = e, document.documentElement.style.cursor = e ? "text" : "", e ? P(e) : F();
|
|
1548
1549
|
return;
|
|
1549
1550
|
}
|
|
1550
1551
|
e && (d.isDragging() || (t = n, n && w(n)));
|
|
1551
1552
|
}
|
|
1552
|
-
},
|
|
1553
|
-
!e && !r || (
|
|
1554
|
-
},
|
|
1555
|
-
|
|
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 && _();
|
|
1556
1557
|
}, se = () => {
|
|
1557
|
-
|
|
1558
|
-
},
|
|
1559
|
-
n.relatedTarget || (e ? (t = null, s.style.display = "none", c.style.display = "none") : r && !
|
|
1560
|
-
},
|
|
1561
|
-
if (
|
|
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) {
|
|
1562
1563
|
try {
|
|
1563
|
-
document.documentElement.releasePointerCapture(
|
|
1564
|
+
document.documentElement.releasePointerCapture(le);
|
|
1564
1565
|
} catch {}
|
|
1565
|
-
|
|
1566
|
+
le = null;
|
|
1566
1567
|
}
|
|
1567
|
-
},
|
|
1568
|
-
|
|
1569
|
-
},
|
|
1570
|
-
!e || t.button !== 0 || !t.isPrimary || (
|
|
1571
|
-
},
|
|
1568
|
+
}, W = () => {
|
|
1569
|
+
U(), d.cancel();
|
|
1570
|
+
}, ue = (t) => {
|
|
1571
|
+
!e || t.button !== 0 || !t.isPrimary || (H = !1, d.pointerDown(t.clientX, t.clientY));
|
|
1572
|
+
}, de = (n) => {
|
|
1572
1573
|
if (!e || !n.isPrimary) return;
|
|
1573
1574
|
let r = d.isDragging();
|
|
1574
1575
|
if (d.pointerMove(n.clientX, n.clientY), d.isDragging()) {
|
|
1575
1576
|
if (!r) {
|
|
1576
|
-
|
|
1577
|
+
le = n.pointerId;
|
|
1577
1578
|
try {
|
|
1578
1579
|
document.documentElement.setPointerCapture(n.pointerId);
|
|
1579
1580
|
} catch {}
|
|
1580
1581
|
}
|
|
1581
1582
|
t = null, s.style.display = "none", c.style.display = "none";
|
|
1582
1583
|
}
|
|
1583
|
-
},
|
|
1584
|
+
}, G = (t) => {
|
|
1584
1585
|
if (!e || !t.isPrimary) return;
|
|
1585
|
-
|
|
1586
|
+
U();
|
|
1586
1587
|
let n = d.pointerUp();
|
|
1587
1588
|
if (!n) return;
|
|
1588
|
-
|
|
1589
|
-
let { elements: r, nodes: i, truncated: a } =
|
|
1589
|
+
H = !0, N();
|
|
1590
|
+
let { elements: r, nodes: i, truncated: a } = pn(n, p);
|
|
1590
1591
|
console.info(`[levo-inspector] region drag: ${Math.round(n.width)}×${Math.round(n.height)} — ${r.length} element(s)${a ? " (truncated)" : ""}`), v(i);
|
|
1591
1592
|
let s = ++h;
|
|
1592
|
-
|
|
1593
|
+
Ot(n, p).then((e) => {
|
|
1593
1594
|
s === h && (console.info(`[levo-inspector] region capture ok (${Math.round(e.length / 1024)}kB)`), o.send({
|
|
1594
1595
|
type: "region-selected",
|
|
1595
1596
|
rect: n,
|
|
@@ -1606,57 +1607,57 @@ function sn() {
|
|
|
1606
1607
|
dataUrl: null
|
|
1607
1608
|
}));
|
|
1608
1609
|
});
|
|
1609
|
-
},
|
|
1610
|
-
let t =
|
|
1610
|
+
}, K = () => W(), fe = (e) => {
|
|
1611
|
+
let t = Ht(e.target);
|
|
1611
1612
|
return t ? (e.preventDefault(), e.stopPropagation(), window.open(t, "_blank", "noopener,noreferrer"), !0) : !1;
|
|
1612
|
-
},
|
|
1613
|
-
if (
|
|
1614
|
-
|
|
1613
|
+
}, pe = (i) => {
|
|
1614
|
+
if (H) {
|
|
1615
|
+
H = !1, i.preventDefault(), i.stopPropagation(), i.stopImmediatePropagation();
|
|
1615
1616
|
return;
|
|
1616
1617
|
}
|
|
1617
1618
|
if (r) {
|
|
1618
1619
|
let e = C(document.elementFromPoint(i.clientX, i.clientY) || i.target);
|
|
1619
|
-
if (!e || e ===
|
|
1620
|
-
|
|
1620
|
+
if (!e || e === I.editingNode()) {
|
|
1621
|
+
fe(i);
|
|
1621
1622
|
return;
|
|
1622
1623
|
}
|
|
1623
|
-
i.preventDefault(), i.stopPropagation(), i.stopImmediatePropagation(),
|
|
1624
|
+
i.preventDefault(), i.stopPropagation(), i.stopImmediatePropagation(), I.startEdit(e);
|
|
1624
1625
|
return;
|
|
1625
1626
|
}
|
|
1626
1627
|
if (!e) {
|
|
1627
|
-
|
|
1628
|
+
fe(i);
|
|
1628
1629
|
return;
|
|
1629
1630
|
}
|
|
1630
1631
|
i.preventDefault(), i.stopPropagation(), i.stopImmediatePropagation();
|
|
1631
1632
|
let a = t || i.target;
|
|
1632
1633
|
if (S(a)) return;
|
|
1633
1634
|
let s = a.closest("[data-tsd-source]") || a;
|
|
1634
|
-
y(), g(), n = s, T(),
|
|
1635
|
+
y(), g(), n = s, T(), M(), o.send({
|
|
1635
1636
|
type: "element-selected",
|
|
1636
|
-
element:
|
|
1637
|
+
element: qt(s)
|
|
1637
1638
|
});
|
|
1638
|
-
},
|
|
1639
|
+
}, me = on({
|
|
1639
1640
|
channel: o,
|
|
1640
1641
|
originals: a,
|
|
1641
|
-
staged:
|
|
1642
|
-
setInspect:
|
|
1643
|
-
setTextEdit:
|
|
1642
|
+
staged: L,
|
|
1643
|
+
setInspect: R,
|
|
1644
|
+
setTextEdit: z,
|
|
1644
1645
|
isInspecting: () => e,
|
|
1645
1646
|
isTextEditing: () => r,
|
|
1646
|
-
editingNode:
|
|
1647
|
+
editingNode: I.editingNode,
|
|
1647
1648
|
setSelected: (e) => {
|
|
1648
|
-
y(), g(), n = e,
|
|
1649
|
+
y(), g(), n = e, M();
|
|
1649
1650
|
},
|
|
1650
1651
|
selectedNode: () => n,
|
|
1651
1652
|
positionSelected: T,
|
|
1652
|
-
clearSelection:
|
|
1653
|
-
syncDomObserver:
|
|
1653
|
+
clearSelection: N,
|
|
1654
|
+
syncDomObserver: te,
|
|
1654
1655
|
positionHover: w,
|
|
1655
|
-
hideTextHover:
|
|
1656
|
-
startEditAtEnd: (e) =>
|
|
1656
|
+
hideTextHover: F,
|
|
1657
|
+
startEditAtEnd: (e) => I.startEdit(e, !0),
|
|
1657
1658
|
editableTarget: C,
|
|
1658
1659
|
ownNodes: p
|
|
1659
|
-
}),
|
|
1660
|
+
}), he = [
|
|
1660
1661
|
"mousedown",
|
|
1661
1662
|
"mouseup",
|
|
1662
1663
|
"dblclick",
|
|
@@ -1674,98 +1675,239 @@ function sn() {
|
|
|
1674
1675
|
"touchstart",
|
|
1675
1676
|
"touchend",
|
|
1676
1677
|
"submit"
|
|
1677
|
-
],
|
|
1678
|
+
], ge = (t) => {
|
|
1678
1679
|
e && (t.cancelable && t.preventDefault(), t.stopPropagation(), t.stopImmediatePropagation());
|
|
1679
|
-
}, ge = () => {
|
|
1680
|
-
n && !r && T(), m.length > 0 && !r && _();
|
|
1681
1680
|
}, _e = () => {
|
|
1681
|
+
n && !r && T(), m.length > 0 && !r && _();
|
|
1682
|
+
}, ve = () => {
|
|
1682
1683
|
let e = location.pathname.replace(/\/$/, "") || "/";
|
|
1683
1684
|
o.send({
|
|
1684
1685
|
type: "route",
|
|
1685
1686
|
route: e
|
|
1686
1687
|
});
|
|
1687
|
-
},
|
|
1688
|
-
|
|
1689
|
-
} }),
|
|
1690
|
-
if (
|
|
1688
|
+
}, ye = an({ onPathChange: () => {
|
|
1689
|
+
N(), ve();
|
|
1690
|
+
} }), q = (t) => {
|
|
1691
|
+
if (I.editingNode()) return;
|
|
1691
1692
|
if (t.key === "Escape") {
|
|
1692
1693
|
if (e && d.isDragging()) {
|
|
1693
|
-
t.stopPropagation(),
|
|
1694
|
+
t.stopPropagation(), W();
|
|
1694
1695
|
return;
|
|
1695
1696
|
}
|
|
1696
|
-
r ? (t.stopPropagation(),
|
|
1697
|
+
r ? (t.stopPropagation(), z(!1)) : e && (t.stopPropagation(), R(!1));
|
|
1697
1698
|
return;
|
|
1698
1699
|
}
|
|
1699
|
-
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;
|
|
1700
1701
|
let n = t.key.toLowerCase();
|
|
1701
|
-
n === "s" ? (t.preventDefault(), t.stopPropagation(),
|
|
1702
|
+
n === "s" ? (t.preventDefault(), t.stopPropagation(), R(!e)) : n === "t" && (t.preventDefault(), t.stopPropagation(), z(!r));
|
|
1702
1703
|
};
|
|
1703
|
-
window.addEventListener("mousemove",
|
|
1704
|
-
for (let e of
|
|
1705
|
-
return console.info(`[levo-inspector] build ${
|
|
1706
|
-
window.removeEventListener("mousemove",
|
|
1707
|
-
for (let e of
|
|
1708
|
-
O.disconnect(), ee.disconnect(), E && cancelAnimationFrame(E),
|
|
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);
|
|
1705
|
+
for (let e of he) window.addEventListener(e, ge, !0);
|
|
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);
|
|
1708
|
+
for (let e of he) window.removeEventListener(e, ge, !0);
|
|
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();
|
|
1709
1710
|
for (let e of f) e.remove();
|
|
1710
1711
|
};
|
|
1711
1712
|
}
|
|
1712
1713
|
//#endregion
|
|
1713
1714
|
//#region src/pageId.ts
|
|
1714
|
-
var
|
|
1715
|
+
var xn = "levo:page-id", Sn = () => {
|
|
1715
1716
|
if (typeof document > "u") return null;
|
|
1716
|
-
let e = document.querySelectorAll(`meta[name="${
|
|
1717
|
+
let e = document.querySelectorAll(`meta[name="${xn}"]`);
|
|
1717
1718
|
return e[e.length - 1]?.getAttribute("content")?.trim() || null;
|
|
1718
|
-
},
|
|
1719
|
+
}, Cn = D(() => import("./dist-Rjs__H25.js").then((e) => e.n).then((e) => ({ default: e.PopupLoader }))), wn = ({ siteId: e, pageId: t }) => {
|
|
1719
1720
|
let n = J(), r = i();
|
|
1720
|
-
return !n || !r ? null : /* @__PURE__ */
|
|
1721
|
+
return !n || !r ? null : /* @__PURE__ */ S(T, {
|
|
1721
1722
|
fallback: null,
|
|
1722
|
-
children: /* @__PURE__ */
|
|
1723
|
+
children: /* @__PURE__ */ S(Cn, {
|
|
1723
1724
|
pageId: t,
|
|
1724
1725
|
siteId: e
|
|
1725
1726
|
})
|
|
1726
1727
|
});
|
|
1727
|
-
},
|
|
1728
|
-
let [n] =
|
|
1728
|
+
}, Tn = () => i(), En = () => n(), Dn = ({ site: e, children: t }) => {
|
|
1729
|
+
let [n] = N(() => {
|
|
1729
1730
|
if (!e) return null;
|
|
1730
|
-
let t =
|
|
1731
|
+
let t = Ce(e), n = Se(t);
|
|
1731
1732
|
return n ? {
|
|
1732
1733
|
client: n,
|
|
1733
|
-
insights:
|
|
1734
|
+
insights: ne(n, {
|
|
1734
1735
|
insightsUrl: t.insightsUrl || null,
|
|
1735
1736
|
site: t.siteId || null
|
|
1736
1737
|
}),
|
|
1737
1738
|
site: e
|
|
1738
1739
|
} : null;
|
|
1739
|
-
}), [i, a] =
|
|
1740
|
-
return
|
|
1740
|
+
}), [i, a] = N(null), o = z({ select: (e) => e.location.pathname });
|
|
1741
|
+
return k(() => {
|
|
1741
1742
|
n && (window.levo_client = n.client, window.levo_insights = n.insights);
|
|
1742
|
-
}, [n]),
|
|
1743
|
+
}, [n]), A(() => {
|
|
1743
1744
|
if (!n) return;
|
|
1744
|
-
let e =
|
|
1745
|
+
let e = Sn();
|
|
1745
1746
|
a(e), n.insights.init({ pageId: e });
|
|
1746
|
-
}, [n, o]), n ? /* @__PURE__ */
|
|
1747
|
+
}, [n, o]), n ? /* @__PURE__ */ C(r, {
|
|
1747
1748
|
client: n.client,
|
|
1748
1749
|
insights: n.insights,
|
|
1749
1750
|
children: [
|
|
1750
1751
|
t,
|
|
1751
|
-
/* @__PURE__ */
|
|
1752
|
+
/* @__PURE__ */ S(st, {
|
|
1752
1753
|
site: n.site,
|
|
1753
1754
|
path: o
|
|
1754
1755
|
}),
|
|
1755
|
-
/* @__PURE__ */
|
|
1756
|
+
/* @__PURE__ */ S(wn, {
|
|
1756
1757
|
pageId: i ?? void 0,
|
|
1757
1758
|
siteId: n.site.id
|
|
1758
1759
|
})
|
|
1759
1760
|
]
|
|
1760
|
-
}) : /* @__PURE__ */
|
|
1761
|
-
},
|
|
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) => {
|
|
1762
1904
|
let t = {}, n = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*("([^"]*)"|'([^']*)'|[^\s"'>]+))?/g;
|
|
1763
1905
|
for (let r = n.exec(e); r; r = n.exec(e)) {
|
|
1764
1906
|
let e = r[1];
|
|
1765
1907
|
!e || /^on/i.test(e) || (t[e] = r[3] ?? r[4] ?? (r[2] ? r[2] : ""));
|
|
1766
1908
|
}
|
|
1767
1909
|
return t;
|
|
1768
|
-
},
|
|
1910
|
+
}, Vn = (e) => {
|
|
1769
1911
|
let t = {
|
|
1770
1912
|
meta: [],
|
|
1771
1913
|
links: [],
|
|
@@ -1773,11 +1915,11 @@ var cn = "levo:page-id", ln = () => {
|
|
|
1773
1915
|
};
|
|
1774
1916
|
if (!e?.trim()) return t;
|
|
1775
1917
|
let n = e.replace(/<script\b([^>]*)>([\s\S]*?)<\/script\s*>/gi, (e, n, r) => {
|
|
1776
|
-
let i =
|
|
1918
|
+
let i = Bn(n), a = r.trim();
|
|
1777
1919
|
return a && (i.children = a), t.scripts.push(i), "";
|
|
1778
1920
|
});
|
|
1779
|
-
return n = n.replace(/<(meta|link)\b([^>]*?)\/?>/gi, (e, n, r) => ((n.toLowerCase() === "meta" ? t.meta : t.links).push(
|
|
1780
|
-
},
|
|
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 = {}) => {
|
|
1781
1923
|
let n = {
|
|
1782
1924
|
meta: [],
|
|
1783
1925
|
links: [],
|
|
@@ -1842,21 +1984,21 @@ var cn = "levo:page-id", ln = () => {
|
|
|
1842
1984
|
let y = e.ldJson ? Array.isArray(e.ldJson) ? e.ldJson : [e.ldJson] : [];
|
|
1843
1985
|
for (let e of y) n.scripts.push({
|
|
1844
1986
|
type: "application/ld+json",
|
|
1845
|
-
children:
|
|
1987
|
+
children: zn(e)
|
|
1846
1988
|
});
|
|
1847
1989
|
for (let r of [t.customHead, e.customHead]) {
|
|
1848
1990
|
if (!r) continue;
|
|
1849
|
-
let e =
|
|
1991
|
+
let e = Vn(r);
|
|
1850
1992
|
n.meta.push(...e.meta), n.links.push(...e.links), n.scripts.push(...e.scripts);
|
|
1851
1993
|
}
|
|
1852
1994
|
return n;
|
|
1853
1995
|
};
|
|
1854
|
-
function
|
|
1855
|
-
let n =
|
|
1856
|
-
return /* @__PURE__ */
|
|
1857
|
-
n.meta.map((e, t) => e.title === void 0 ? /* @__PURE__ */
|
|
1858
|
-
n.links.map((e, t) => /* @__PURE__ */
|
|
1859
|
-
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", {
|
|
1860
2002
|
...t,
|
|
1861
2003
|
dangerouslySetInnerHTML: { __html: e }
|
|
1862
2004
|
}, `s${n}`))
|
|
@@ -1864,25 +2006,25 @@ function yn({ meta: e, site: t }) {
|
|
|
1864
2006
|
}
|
|
1865
2007
|
//#endregion
|
|
1866
2008
|
//#region src/registration/ui.tsx
|
|
1867
|
-
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", {
|
|
1868
2010
|
ref: o,
|
|
1869
2011
|
type: i,
|
|
1870
|
-
className:
|
|
2012
|
+
className: Wn("inline-flex items-center justify-center", e),
|
|
1871
2013
|
...a,
|
|
1872
|
-
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
|
|
1873
2015
|
}));
|
|
1874
2016
|
Q.displayName = "Btn";
|
|
1875
2017
|
//#endregion
|
|
1876
2018
|
//#region src/registration/AttendeeForm.tsx
|
|
1877
|
-
var
|
|
2019
|
+
var Gn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, registerLoading: i, onBack: a, submitLabel: o, showBusinessBilling: s = !0 }) => /* @__PURE__ */ C("form", {
|
|
1878
2020
|
onSubmit: r,
|
|
1879
2021
|
className: "flex flex-col gap-4",
|
|
1880
2022
|
children: [
|
|
1881
|
-
/* @__PURE__ */
|
|
2023
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
1882
2024
|
htmlFor: "name",
|
|
1883
2025
|
className: "font-medium text-sm",
|
|
1884
2026
|
children: "Name"
|
|
1885
|
-
}), /* @__PURE__ */
|
|
2027
|
+
}), /* @__PURE__ */ S("input", {
|
|
1886
2028
|
className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
1887
2029
|
placeholder: "Name",
|
|
1888
2030
|
name: "name",
|
|
@@ -1891,11 +2033,11 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1891
2033
|
onBlur: n,
|
|
1892
2034
|
required: !0
|
|
1893
2035
|
})] }),
|
|
1894
|
-
/* @__PURE__ */
|
|
2036
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
1895
2037
|
htmlFor: "email",
|
|
1896
2038
|
className: "font-medium text-sm",
|
|
1897
2039
|
children: "Email"
|
|
1898
|
-
}), /* @__PURE__ */
|
|
2040
|
+
}), /* @__PURE__ */ S("input", {
|
|
1899
2041
|
className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
1900
2042
|
placeholder: "Email",
|
|
1901
2043
|
name: "email",
|
|
@@ -1905,32 +2047,32 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1905
2047
|
type: "email",
|
|
1906
2048
|
required: !0
|
|
1907
2049
|
})] }),
|
|
1908
|
-
s && /* @__PURE__ */
|
|
2050
|
+
s && /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
|
|
1909
2051
|
htmlFor: "is_business_purchase",
|
|
1910
2052
|
className: "flex items-center gap-2 text-sm",
|
|
1911
|
-
children: [/* @__PURE__ */
|
|
2053
|
+
children: [/* @__PURE__ */ S("input", {
|
|
1912
2054
|
type: "checkbox",
|
|
1913
2055
|
name: "is_business_purchase",
|
|
1914
2056
|
checked: e.is_business_purchase || !1,
|
|
1915
2057
|
onChange: t,
|
|
1916
2058
|
className: "rounded border-gray-300"
|
|
1917
|
-
}), /* @__PURE__ */
|
|
2059
|
+
}), /* @__PURE__ */ S("span", {
|
|
1918
2060
|
className: "font-medium",
|
|
1919
2061
|
children: "Tax for Business"
|
|
1920
2062
|
})]
|
|
1921
|
-
}), /* @__PURE__ */
|
|
2063
|
+
}), /* @__PURE__ */ S("p", {
|
|
1922
2064
|
className: "mt-1 text-gray-500 text-xs",
|
|
1923
2065
|
children: "Check this if you're purchasing for a business and need a tax-compliant invoice"
|
|
1924
2066
|
})] }),
|
|
1925
|
-
s && e.is_business_purchase && /* @__PURE__ */
|
|
1926
|
-
/* @__PURE__ */
|
|
2067
|
+
s && e.is_business_purchase && /* @__PURE__ */ C(x, { children: [
|
|
2068
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
|
|
1927
2069
|
htmlFor: "business_name",
|
|
1928
2070
|
className: "font-medium text-sm",
|
|
1929
|
-
children: ["Company Name ", /* @__PURE__ */
|
|
2071
|
+
children: ["Company Name ", /* @__PURE__ */ S("span", {
|
|
1930
2072
|
className: "text-red-500",
|
|
1931
2073
|
children: "*"
|
|
1932
2074
|
})]
|
|
1933
|
-
}), /* @__PURE__ */
|
|
2075
|
+
}), /* @__PURE__ */ S("input", {
|
|
1934
2076
|
className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
1935
2077
|
placeholder: "Acme Corporation",
|
|
1936
2078
|
name: "billing_details.name",
|
|
@@ -1939,14 +2081,14 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1939
2081
|
onBlur: n,
|
|
1940
2082
|
required: e.is_business_purchase
|
|
1941
2083
|
})] }),
|
|
1942
|
-
/* @__PURE__ */
|
|
2084
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
|
|
1943
2085
|
htmlFor: "business_tax_id",
|
|
1944
2086
|
className: "font-medium text-sm",
|
|
1945
|
-
children: ["Tax ID / GST Number ", /* @__PURE__ */
|
|
2087
|
+
children: ["Tax ID / GST Number ", /* @__PURE__ */ S("span", {
|
|
1946
2088
|
className: "text-red-500",
|
|
1947
2089
|
children: "*"
|
|
1948
2090
|
})]
|
|
1949
|
-
}), /* @__PURE__ */
|
|
2091
|
+
}), /* @__PURE__ */ S("input", {
|
|
1950
2092
|
className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
1951
2093
|
placeholder: "GST123456789",
|
|
1952
2094
|
name: "billing_details.tax_id",
|
|
@@ -1955,15 +2097,15 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1955
2097
|
onBlur: n,
|
|
1956
2098
|
required: e.is_business_purchase
|
|
1957
2099
|
})] }),
|
|
1958
|
-
/* @__PURE__ */
|
|
1959
|
-
/* @__PURE__ */
|
|
2100
|
+
/* @__PURE__ */ C("div", { children: [
|
|
2101
|
+
/* @__PURE__ */ C("p", {
|
|
1960
2102
|
className: "mb-1 font-medium text-sm",
|
|
1961
|
-
children: ["Business Address ", /* @__PURE__ */
|
|
2103
|
+
children: ["Business Address ", /* @__PURE__ */ S("span", {
|
|
1962
2104
|
className: "text-red-500",
|
|
1963
2105
|
children: "*"
|
|
1964
2106
|
})]
|
|
1965
2107
|
}),
|
|
1966
|
-
/* @__PURE__ */
|
|
2108
|
+
/* @__PURE__ */ S("input", {
|
|
1967
2109
|
className: "mb-2 w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
1968
2110
|
placeholder: "Street Address Line 1",
|
|
1969
2111
|
name: "billing_details.address.line1",
|
|
@@ -1972,7 +2114,7 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1972
2114
|
onBlur: n,
|
|
1973
2115
|
required: e.is_business_purchase
|
|
1974
2116
|
}),
|
|
1975
|
-
/* @__PURE__ */
|
|
2117
|
+
/* @__PURE__ */ S("input", {
|
|
1976
2118
|
className: "mb-2 w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
1977
2119
|
placeholder: "Street Address Line 2 (Optional)",
|
|
1978
2120
|
name: "billing_details.address.line2",
|
|
@@ -1980,9 +2122,9 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1980
2122
|
onChange: t,
|
|
1981
2123
|
onBlur: n
|
|
1982
2124
|
}),
|
|
1983
|
-
/* @__PURE__ */
|
|
2125
|
+
/* @__PURE__ */ C("div", {
|
|
1984
2126
|
className: "grid grid-cols-2 gap-2",
|
|
1985
|
-
children: [/* @__PURE__ */
|
|
2127
|
+
children: [/* @__PURE__ */ S("input", {
|
|
1986
2128
|
className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
1987
2129
|
placeholder: "City",
|
|
1988
2130
|
name: "billing_details.address.city",
|
|
@@ -1990,7 +2132,7 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
1990
2132
|
onChange: t,
|
|
1991
2133
|
onBlur: n,
|
|
1992
2134
|
required: e.is_business_purchase
|
|
1993
|
-
}), /* @__PURE__ */
|
|
2135
|
+
}), /* @__PURE__ */ S("input", {
|
|
1994
2136
|
className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
1995
2137
|
placeholder: "State/Province",
|
|
1996
2138
|
name: "billing_details.address.state",
|
|
@@ -2000,9 +2142,9 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2000
2142
|
required: e.is_business_purchase
|
|
2001
2143
|
})]
|
|
2002
2144
|
}),
|
|
2003
|
-
/* @__PURE__ */
|
|
2145
|
+
/* @__PURE__ */ C("div", {
|
|
2004
2146
|
className: "mt-2 grid grid-cols-2 gap-2",
|
|
2005
|
-
children: [/* @__PURE__ */
|
|
2147
|
+
children: [/* @__PURE__ */ S("input", {
|
|
2006
2148
|
className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
2007
2149
|
placeholder: "Postal Code",
|
|
2008
2150
|
name: "billing_details.address.postal_code",
|
|
@@ -2010,7 +2152,7 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2010
2152
|
onChange: t,
|
|
2011
2153
|
onBlur: n,
|
|
2012
2154
|
required: e.is_business_purchase
|
|
2013
|
-
}), /* @__PURE__ */
|
|
2155
|
+
}), /* @__PURE__ */ S("input", {
|
|
2014
2156
|
className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
|
|
2015
2157
|
placeholder: "Country",
|
|
2016
2158
|
name: "billing_details.address.country",
|
|
@@ -2022,15 +2164,15 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2022
2164
|
})
|
|
2023
2165
|
] })
|
|
2024
2166
|
] }),
|
|
2025
|
-
/* @__PURE__ */
|
|
2167
|
+
/* @__PURE__ */ C("div", {
|
|
2026
2168
|
className: "flex flex-col-reverse justify-end gap-4 md:flex-row",
|
|
2027
|
-
children: [/* @__PURE__ */
|
|
2169
|
+
children: [/* @__PURE__ */ S(Q, {
|
|
2028
2170
|
className: "rounded-lg bg-gray-100 px-6 py-2 font-semibold text-black hover:bg-gray-200",
|
|
2029
2171
|
type: "button",
|
|
2030
2172
|
onClick: a,
|
|
2031
2173
|
disabled: i,
|
|
2032
2174
|
children: "Back"
|
|
2033
|
-
}), /* @__PURE__ */
|
|
2175
|
+
}), /* @__PURE__ */ S(Q, {
|
|
2034
2176
|
className: "rounded-lg bg-brand px-6 py-2 font-semibold text-brand-foreground hover:opacity-90",
|
|
2035
2177
|
type: "submit",
|
|
2036
2178
|
isLoading: i,
|
|
@@ -2039,57 +2181,57 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2039
2181
|
})]
|
|
2040
2182
|
})
|
|
2041
2183
|
]
|
|
2042
|
-
}),
|
|
2184
|
+
}), Kn = {
|
|
2043
2185
|
USD: "$",
|
|
2044
2186
|
EUR: "€",
|
|
2045
2187
|
GBP: "£",
|
|
2046
2188
|
INR: "₹"
|
|
2047
|
-
}, $ = (e) => e?.unit_amount ? `${
|
|
2189
|
+
}, $ = (e) => e?.unit_amount ? `${Kn[e.currency ?? "INR"]} ${(e.unit_amount ?? 0) / 100}` : "Free", qn = (e) => {
|
|
2048
2190
|
if (!e) return null;
|
|
2049
2191
|
let t = e.tax_enabled ?? !1, n = e.tax_inclusive ?? !1, r = e.taxes ?? [];
|
|
2050
2192
|
return !t || r.length === 0 ? null : n ? "(inclusive of taxes)" : "+ taxes";
|
|
2051
|
-
},
|
|
2193
|
+
}, Jn = (e) => !!(e?.taxes && e.taxes.length > 0 && e.tax_amount !== void 0), Yn = (e) => {
|
|
2052
2194
|
if (!e) return !1;
|
|
2053
2195
|
let t = e;
|
|
2054
2196
|
return t.tax_enabled === !0 && t.taxes !== void 0 && t.taxes.length > 0 && t.subtotal !== void 0;
|
|
2055
|
-
},
|
|
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 }) => {
|
|
2056
2198
|
let c = [...a].sort((e, t) => {
|
|
2057
|
-
let n =
|
|
2199
|
+
let n = Zn(e, s?._id), r = Zn(t, s?._id);
|
|
2058
2200
|
return n && !r ? -1 : !n && r ? 1 : 0;
|
|
2059
2201
|
});
|
|
2060
|
-
return /* @__PURE__ */
|
|
2061
|
-
/* @__PURE__ */
|
|
2202
|
+
return /* @__PURE__ */ C("div", { children: [
|
|
2203
|
+
/* @__PURE__ */ C("div", {
|
|
2062
2204
|
className: "flex items-center justify-between text-center",
|
|
2063
2205
|
children: [
|
|
2064
|
-
/* @__PURE__ */
|
|
2206
|
+
/* @__PURE__ */ S("button", {
|
|
2065
2207
|
type: "button",
|
|
2066
2208
|
className: "rounded-md p-2 hover:bg-gray-50 focus:outline-none",
|
|
2067
2209
|
"aria-label": "Back",
|
|
2068
2210
|
onClick: o,
|
|
2069
|
-
children: /* @__PURE__ */
|
|
2211
|
+
children: /* @__PURE__ */ S(ie, { className: "size-4" })
|
|
2070
2212
|
}),
|
|
2071
|
-
/* @__PURE__ */
|
|
2213
|
+
/* @__PURE__ */ C("p", {
|
|
2072
2214
|
className: "font-semibold text-md",
|
|
2073
2215
|
children: ["Apply Coupon for ", s?.title]
|
|
2074
2216
|
}),
|
|
2075
|
-
/* @__PURE__ */
|
|
2217
|
+
/* @__PURE__ */ S("div", { className: "w-4" })
|
|
2076
2218
|
]
|
|
2077
2219
|
}),
|
|
2078
|
-
/* @__PURE__ */
|
|
2220
|
+
/* @__PURE__ */ C("div", {
|
|
2079
2221
|
className: "mt-2 flex gap-4",
|
|
2080
|
-
children: [/* @__PURE__ */
|
|
2222
|
+
children: [/* @__PURE__ */ C("div", {
|
|
2081
2223
|
className: "w-full",
|
|
2082
|
-
children: [/* @__PURE__ */
|
|
2224
|
+
children: [/* @__PURE__ */ S("input", {
|
|
2083
2225
|
className: "w-full rounded border border-gray-300 px-3 py-2 focus:border-brand focus:outline-none",
|
|
2084
2226
|
type: "text",
|
|
2085
2227
|
placeholder: "Enter Coupon Code",
|
|
2086
2228
|
value: e,
|
|
2087
2229
|
onChange: (e) => t(e.target.value)
|
|
2088
|
-
}), n && /* @__PURE__ */
|
|
2230
|
+
}), n && /* @__PURE__ */ S("p", {
|
|
2089
2231
|
className: "mt-1 text-red-400 text-xs",
|
|
2090
2232
|
children: n
|
|
2091
2233
|
})]
|
|
2092
|
-
}), /* @__PURE__ */
|
|
2234
|
+
}), /* @__PURE__ */ S(Q, {
|
|
2093
2235
|
"aria-label": "Apply Coupon",
|
|
2094
2236
|
onClick: () => i(),
|
|
2095
2237
|
className: "rounded-lg bg-brand px-3 text-brand-foreground hover:opacity-90",
|
|
@@ -2098,55 +2240,55 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2098
2240
|
zIndex: e ? 1 : -1
|
|
2099
2241
|
},
|
|
2100
2242
|
isLoading: r,
|
|
2101
|
-
children: /* @__PURE__ */
|
|
2243
|
+
children: /* @__PURE__ */ S(re, { className: "h-fit" })
|
|
2102
2244
|
})]
|
|
2103
2245
|
}),
|
|
2104
|
-
c.length > 0 && /* @__PURE__ */
|
|
2246
|
+
c.length > 0 && /* @__PURE__ */ C("div", {
|
|
2105
2247
|
className: "mt-4 flex flex-col gap-4",
|
|
2106
|
-
children: [c.filter((e) =>
|
|
2248
|
+
children: [c.filter((e) => Zn(e, s?._id)).length > 0 && /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
2107
2249
|
className: "mb-2 text-gray-600 text-sm",
|
|
2108
2250
|
children: "Available Coupons"
|
|
2109
|
-
}), /* @__PURE__ */
|
|
2251
|
+
}), /* @__PURE__ */ S("div", {
|
|
2110
2252
|
className: "flex flex-col gap-2",
|
|
2111
|
-
children: c.filter((e) =>
|
|
2253
|
+
children: c.filter((e) => Zn(e, s?._id)).map((e) => /* @__PURE__ */ C("button", {
|
|
2112
2254
|
type: "button",
|
|
2113
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",
|
|
2114
2256
|
onClick: () => {
|
|
2115
2257
|
i(e.code), t(e.code);
|
|
2116
2258
|
},
|
|
2117
|
-
children: [/* @__PURE__ */
|
|
2259
|
+
children: [/* @__PURE__ */ C("div", {
|
|
2118
2260
|
className: "flex w-full items-center justify-between",
|
|
2119
|
-
children: [/* @__PURE__ */
|
|
2261
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2120
2262
|
className: "font-medium",
|
|
2121
2263
|
children: e.code
|
|
2122
|
-
}), /* @__PURE__ */
|
|
2264
|
+
}), /* @__PURE__ */ S("span", {
|
|
2123
2265
|
className: "text-gray-500 text-sm",
|
|
2124
|
-
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`
|
|
2125
2267
|
})]
|
|
2126
|
-
}), e.description && /* @__PURE__ */
|
|
2268
|
+
}), e.description && /* @__PURE__ */ S("span", {
|
|
2127
2269
|
className: "text-gray-500 text-xs",
|
|
2128
2270
|
children: e.description
|
|
2129
2271
|
})]
|
|
2130
2272
|
}, e._id))
|
|
2131
|
-
})] }), c.filter((e) => !
|
|
2273
|
+
})] }), c.filter((e) => !Zn(e, s?._id)).length > 0 && /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
2132
2274
|
className: "mb-2 text-gray-400 text-sm",
|
|
2133
2275
|
children: "Not Applicable"
|
|
2134
|
-
}), /* @__PURE__ */
|
|
2276
|
+
}), /* @__PURE__ */ S("div", {
|
|
2135
2277
|
className: "flex flex-col gap-2",
|
|
2136
|
-
children: c.filter((e) => !
|
|
2278
|
+
children: c.filter((e) => !Zn(e, s?._id)).map((e) => /* @__PURE__ */ C("button", {
|
|
2137
2279
|
type: "button",
|
|
2138
2280
|
disabled: !0,
|
|
2139
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",
|
|
2140
|
-
children: [/* @__PURE__ */
|
|
2282
|
+
children: [/* @__PURE__ */ C("div", {
|
|
2141
2283
|
className: "flex w-full items-center justify-between",
|
|
2142
|
-
children: [/* @__PURE__ */
|
|
2284
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2143
2285
|
className: "font-medium",
|
|
2144
2286
|
children: e.code
|
|
2145
|
-
}), /* @__PURE__ */
|
|
2287
|
+
}), /* @__PURE__ */ S("span", {
|
|
2146
2288
|
className: "text-gray-500 text-sm",
|
|
2147
|
-
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`
|
|
2148
2290
|
})]
|
|
2149
|
-
}), e.description && /* @__PURE__ */
|
|
2291
|
+
}), e.description && /* @__PURE__ */ S("span", {
|
|
2150
2292
|
className: "text-gray-500 text-xs",
|
|
2151
2293
|
children: e.description
|
|
2152
2294
|
})]
|
|
@@ -2154,7 +2296,7 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2154
2296
|
})] })]
|
|
2155
2297
|
})
|
|
2156
2298
|
] });
|
|
2157
|
-
},
|
|
2299
|
+
}, $n = (e) => {
|
|
2158
2300
|
let t = new Date(e);
|
|
2159
2301
|
return `${new Intl.DateTimeFormat("en-GB", {
|
|
2160
2302
|
day: "numeric",
|
|
@@ -2165,24 +2307,24 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2165
2307
|
minute: "2-digit",
|
|
2166
2308
|
hour12: !0
|
|
2167
2309
|
}).format(t)}`;
|
|
2168
|
-
},
|
|
2169
|
-
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", {
|
|
2170
2312
|
style: "currency",
|
|
2171
2313
|
currency: t.currency || "INR",
|
|
2172
2314
|
minimumFractionDigits: 0
|
|
2173
2315
|
}).format(e);
|
|
2174
|
-
return /* @__PURE__ */
|
|
2316
|
+
return /* @__PURE__ */ S(P.Root, {
|
|
2175
2317
|
open: r,
|
|
2176
2318
|
onOpenChange: (e) => i(e),
|
|
2177
|
-
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, {
|
|
2178
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",
|
|
2179
2321
|
children: [
|
|
2180
|
-
/* @__PURE__ */
|
|
2322
|
+
/* @__PURE__ */ C("div", {
|
|
2181
2323
|
className: "bg-gradient-to-br from-green-50 to-emerald-50 px-6 py-6 text-center",
|
|
2182
2324
|
children: [
|
|
2183
|
-
/* @__PURE__ */
|
|
2325
|
+
/* @__PURE__ */ S("div", {
|
|
2184
2326
|
className: "mx-auto mb-3 flex size-14 items-center justify-center rounded-full bg-green-100 ring-4 ring-green-50",
|
|
2185
|
-
children: /* @__PURE__ */
|
|
2327
|
+
children: /* @__PURE__ */ C("svg", {
|
|
2186
2328
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2187
2329
|
width: "28",
|
|
2188
2330
|
height: "28",
|
|
@@ -2194,72 +2336,72 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2194
2336
|
strokeLinejoin: "round",
|
|
2195
2337
|
className: "text-green-600",
|
|
2196
2338
|
"aria-hidden": "true",
|
|
2197
|
-
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" })]
|
|
2198
2340
|
})
|
|
2199
2341
|
}),
|
|
2200
|
-
/* @__PURE__ */
|
|
2342
|
+
/* @__PURE__ */ S(P.Title, {
|
|
2201
2343
|
className: "font-bold text-gray-900 text-lg",
|
|
2202
2344
|
children: n === "view" ? "Booking Details" : "Tickets Confirmed!"
|
|
2203
2345
|
}),
|
|
2204
|
-
/* @__PURE__ */
|
|
2346
|
+
/* @__PURE__ */ S(P.Description, {
|
|
2205
2347
|
className: "mt-1 text-gray-600 text-sm",
|
|
2206
2348
|
children: n === "confirm" ? "Your tickets have been confirmed. A confirmation email is on its way." : "Here are the details about your booking."
|
|
2207
2349
|
})
|
|
2208
2350
|
]
|
|
2209
2351
|
}),
|
|
2210
|
-
/* @__PURE__ */
|
|
2352
|
+
/* @__PURE__ */ C("div", {
|
|
2211
2353
|
className: "px-6 py-5",
|
|
2212
|
-
children: [/* @__PURE__ */
|
|
2354
|
+
children: [/* @__PURE__ */ C("div", {
|
|
2213
2355
|
className: "relative overflow-hidden rounded-xl border border-gray-200 bg-white",
|
|
2214
2356
|
children: [
|
|
2215
|
-
/* @__PURE__ */
|
|
2216
|
-
/* @__PURE__ */
|
|
2217
|
-
/* @__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", {
|
|
2218
2360
|
className: "px-5 py-4",
|
|
2219
2361
|
children: [
|
|
2220
|
-
t.qr_image && /* @__PURE__ */
|
|
2362
|
+
t.qr_image && /* @__PURE__ */ S("div", {
|
|
2221
2363
|
className: "mb-4 flex flex-col items-center",
|
|
2222
|
-
children: /* @__PURE__ */
|
|
2364
|
+
children: /* @__PURE__ */ S("div", {
|
|
2223
2365
|
className: "rounded-lg border border-gray-200 bg-white p-2",
|
|
2224
|
-
children: /* @__PURE__ */
|
|
2366
|
+
children: /* @__PURE__ */ S("img", {
|
|
2225
2367
|
src: t.qr_image.location,
|
|
2226
2368
|
alt: "Booking QR Code",
|
|
2227
2369
|
className: "size-24"
|
|
2228
2370
|
})
|
|
2229
2371
|
})
|
|
2230
2372
|
}),
|
|
2231
|
-
/* @__PURE__ */
|
|
2373
|
+
/* @__PURE__ */ C("div", {
|
|
2232
2374
|
className: "mb-4 flex items-center justify-between rounded-lg bg-gray-50 px-3 py-2.5",
|
|
2233
|
-
children: [/* @__PURE__ */
|
|
2375
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2234
2376
|
className: "font-medium text-gray-500 text-xs uppercase tracking-wide",
|
|
2235
2377
|
children: "Booking ID"
|
|
2236
|
-
}), /* @__PURE__ */
|
|
2378
|
+
}), /* @__PURE__ */ S("span", {
|
|
2237
2379
|
className: "font-mono font-semibold text-gray-900 text-sm",
|
|
2238
2380
|
children: t._id
|
|
2239
2381
|
})]
|
|
2240
2382
|
}),
|
|
2241
|
-
/* @__PURE__ */
|
|
2242
|
-
/* @__PURE__ */
|
|
2383
|
+
/* @__PURE__ */ S("div", { className: "my-4 border-gray-200 border-t border-dashed" }),
|
|
2384
|
+
/* @__PURE__ */ S("div", {
|
|
2243
2385
|
className: "space-y-3",
|
|
2244
2386
|
children: t.attendees.map((t) => {
|
|
2245
2387
|
let n = e.find((e) => e._id === t.ticket._id);
|
|
2246
|
-
return n ? /* @__PURE__ */
|
|
2388
|
+
return n ? /* @__PURE__ */ C("div", {
|
|
2247
2389
|
className: "flex items-center justify-between",
|
|
2248
|
-
children: [/* @__PURE__ */
|
|
2390
|
+
children: [/* @__PURE__ */ C("div", {
|
|
2249
2391
|
className: "min-w-0 flex-1",
|
|
2250
|
-
children: [/* @__PURE__ */
|
|
2392
|
+
children: [/* @__PURE__ */ S("p", {
|
|
2251
2393
|
className: "truncate font-medium text-gray-900 text-sm",
|
|
2252
2394
|
children: t.name
|
|
2253
|
-
}), /* @__PURE__ */
|
|
2395
|
+
}), /* @__PURE__ */ S("p", {
|
|
2254
2396
|
className: "truncate text-gray-500 text-xs",
|
|
2255
2397
|
children: t.email
|
|
2256
2398
|
})]
|
|
2257
|
-
}), /* @__PURE__ */
|
|
2399
|
+
}), /* @__PURE__ */ C("div", {
|
|
2258
2400
|
className: "ml-3 shrink-0 text-right",
|
|
2259
|
-
children: [/* @__PURE__ */
|
|
2401
|
+
children: [/* @__PURE__ */ S("p", {
|
|
2260
2402
|
className: "font-medium text-gray-900 text-sm",
|
|
2261
2403
|
children: n.title
|
|
2262
|
-
}), /* @__PURE__ */
|
|
2404
|
+
}), /* @__PURE__ */ S("p", {
|
|
2263
2405
|
className: "text-gray-500 text-xs",
|
|
2264
2406
|
children: s(t.ticket.unit_amount / 100)
|
|
2265
2407
|
})]
|
|
@@ -2267,63 +2409,63 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2267
2409
|
}, t._id) : null;
|
|
2268
2410
|
})
|
|
2269
2411
|
}),
|
|
2270
|
-
/* @__PURE__ */
|
|
2271
|
-
!o && /* @__PURE__ */
|
|
2412
|
+
/* @__PURE__ */ S("div", { className: "my-4 border-gray-200 border-t border-dashed" }),
|
|
2413
|
+
!o && /* @__PURE__ */ C("div", {
|
|
2272
2414
|
className: "space-y-1.5 text-sm",
|
|
2273
2415
|
children: [
|
|
2274
|
-
/* @__PURE__ */
|
|
2416
|
+
/* @__PURE__ */ C("div", {
|
|
2275
2417
|
className: "flex justify-between",
|
|
2276
|
-
children: [/* @__PURE__ */
|
|
2418
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2277
2419
|
className: "text-gray-500",
|
|
2278
2420
|
children: "Base Amount"
|
|
2279
|
-
}), /* @__PURE__ */
|
|
2421
|
+
}), /* @__PURE__ */ S("span", {
|
|
2280
2422
|
className: "font-medium text-gray-700",
|
|
2281
2423
|
children: s(t.unit_amount / 100)
|
|
2282
2424
|
})]
|
|
2283
2425
|
}),
|
|
2284
|
-
t.discount > 0 && /* @__PURE__ */
|
|
2426
|
+
t.discount > 0 && /* @__PURE__ */ C("div", {
|
|
2285
2427
|
className: "flex justify-between text-green-600",
|
|
2286
|
-
children: [/* @__PURE__ */
|
|
2428
|
+
children: [/* @__PURE__ */ S("span", { children: "Discount" }), /* @__PURE__ */ C("span", {
|
|
2287
2429
|
className: "font-medium",
|
|
2288
2430
|
children: ["- ", s(t.discount / 100)]
|
|
2289
2431
|
})]
|
|
2290
2432
|
}),
|
|
2291
|
-
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", {
|
|
2292
2434
|
className: "flex justify-between",
|
|
2293
|
-
children: [/* @__PURE__ */
|
|
2435
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2294
2436
|
className: "text-gray-500",
|
|
2295
2437
|
children: e.label
|
|
2296
|
-
}), /* @__PURE__ */
|
|
2438
|
+
}), /* @__PURE__ */ S("span", {
|
|
2297
2439
|
className: "font-medium text-gray-700",
|
|
2298
2440
|
children: s(e.amount / 100)
|
|
2299
2441
|
})]
|
|
2300
2442
|
}, t)),
|
|
2301
|
-
/* @__PURE__ */
|
|
2443
|
+
/* @__PURE__ */ C("div", {
|
|
2302
2444
|
className: "flex justify-between border-gray-200 border-t pt-2 font-semibold text-gray-900",
|
|
2303
|
-
children: [/* @__PURE__ */
|
|
2445
|
+
children: [/* @__PURE__ */ S("span", { children: "Total Paid" }), /* @__PURE__ */ S("span", { children: s(a) })]
|
|
2304
2446
|
})
|
|
2305
2447
|
]
|
|
2306
2448
|
}),
|
|
2307
|
-
o && /* @__PURE__ */
|
|
2449
|
+
o && /* @__PURE__ */ C("div", {
|
|
2308
2450
|
className: "flex items-center justify-between font-semibold text-gray-900",
|
|
2309
|
-
children: [/* @__PURE__ */
|
|
2451
|
+
children: [/* @__PURE__ */ S("span", { children: "Total" }), /* @__PURE__ */ S("span", { children: "Free" })]
|
|
2310
2452
|
})
|
|
2311
2453
|
]
|
|
2312
2454
|
})
|
|
2313
2455
|
]
|
|
2314
|
-
}), /* @__PURE__ */
|
|
2456
|
+
}), /* @__PURE__ */ S("p", {
|
|
2315
2457
|
className: "mt-3 text-center text-gray-400 text-xs",
|
|
2316
|
-
children:
|
|
2458
|
+
children: $n(t.created_at)
|
|
2317
2459
|
})]
|
|
2318
2460
|
}),
|
|
2319
|
-
/* @__PURE__ */
|
|
2461
|
+
/* @__PURE__ */ C("div", {
|
|
2320
2462
|
className: "flex flex-col gap-2 px-6 pb-5",
|
|
2321
|
-
children: [t.invoice?.location && /* @__PURE__ */
|
|
2463
|
+
children: [t.invoice?.location && /* @__PURE__ */ C("a", {
|
|
2322
2464
|
href: t.invoice.location,
|
|
2323
2465
|
target: "_blank",
|
|
2324
2466
|
rel: "noopener noreferrer",
|
|
2325
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",
|
|
2326
|
-
children: [/* @__PURE__ */
|
|
2468
|
+
children: [/* @__PURE__ */ C("svg", {
|
|
2327
2469
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2328
2470
|
width: "16",
|
|
2329
2471
|
height: "16",
|
|
@@ -2335,9 +2477,9 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2335
2477
|
strokeLinejoin: "round",
|
|
2336
2478
|
"aria-hidden": "true",
|
|
2337
2479
|
children: [
|
|
2338
|
-
/* @__PURE__ */
|
|
2339
|
-
/* @__PURE__ */
|
|
2340
|
-
/* @__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", {
|
|
2341
2483
|
x1: "12",
|
|
2342
2484
|
x2: "12",
|
|
2343
2485
|
y1: "15",
|
|
@@ -2345,7 +2487,7 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2345
2487
|
})
|
|
2346
2488
|
]
|
|
2347
2489
|
}), "Download Invoice"]
|
|
2348
|
-
}), /* @__PURE__ */
|
|
2490
|
+
}), /* @__PURE__ */ S(P.Close, {
|
|
2349
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",
|
|
2350
2492
|
children: "Done"
|
|
2351
2493
|
})]
|
|
@@ -2353,83 +2495,83 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2353
2495
|
]
|
|
2354
2496
|
})] })
|
|
2355
2497
|
});
|
|
2356
|
-
},
|
|
2498
|
+
}, tr = ({ isOpen: e, onClose: t, stripePromise: n, clientSecret: r, onComplete: i }) => !n || !r ? null : /* @__PURE__ */ S(P.Root, {
|
|
2357
2499
|
open: e,
|
|
2358
2500
|
onOpenChange: (e) => {
|
|
2359
2501
|
e || t();
|
|
2360
2502
|
},
|
|
2361
|
-
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, {
|
|
2362
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]",
|
|
2363
|
-
children: [/* @__PURE__ */
|
|
2505
|
+
children: [/* @__PURE__ */ S(P.Close, {
|
|
2364
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",
|
|
2365
|
-
children: /* @__PURE__ */
|
|
2366
|
-
}), /* @__PURE__ */
|
|
2507
|
+
children: /* @__PURE__ */ S(se, { className: "size-5" })
|
|
2508
|
+
}), /* @__PURE__ */ S("div", {
|
|
2367
2509
|
className: "flex-1 overflow-y-auto rounded-2xl py-6",
|
|
2368
|
-
children: /* @__PURE__ */
|
|
2510
|
+
children: /* @__PURE__ */ S(le, {
|
|
2369
2511
|
stripe: n,
|
|
2370
2512
|
options: {
|
|
2371
2513
|
clientSecret: r,
|
|
2372
2514
|
onComplete: i
|
|
2373
2515
|
},
|
|
2374
|
-
children: /* @__PURE__ */
|
|
2516
|
+
children: /* @__PURE__ */ S(H, { className: "stripe-embedded-checkout h-full" })
|
|
2375
2517
|
})
|
|
2376
2518
|
})]
|
|
2377
2519
|
})] })
|
|
2378
|
-
}),
|
|
2379
|
-
let l =
|
|
2380
|
-
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", {
|
|
2381
2523
|
className: "flex max-h-[64dvh] w-full flex-col justify-between gap-6 overflow-y-auto md:max-h-[unset] md:flex-row",
|
|
2382
|
-
children: [/* @__PURE__ */
|
|
2524
|
+
children: [/* @__PURE__ */ S("div", {
|
|
2383
2525
|
className: "flex w-full flex-col gap-3 md:w-[55%]",
|
|
2384
|
-
children: e.map((e) => /* @__PURE__ */
|
|
2385
|
-
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" : ""),
|
|
2386
2528
|
onClick: () => n(e),
|
|
2387
|
-
children: /* @__PURE__ */
|
|
2388
|
-
/* @__PURE__ */
|
|
2529
|
+
children: /* @__PURE__ */ C("div", { children: [
|
|
2530
|
+
/* @__PURE__ */ S("p", {
|
|
2389
2531
|
className: "text-md",
|
|
2390
2532
|
children: e.title
|
|
2391
2533
|
}),
|
|
2392
|
-
/* @__PURE__ */
|
|
2534
|
+
/* @__PURE__ */ S("p", {
|
|
2393
2535
|
className: "-mt-[2px] mb-1 text-gray-600 text-xs",
|
|
2394
2536
|
children: e.description
|
|
2395
2537
|
}),
|
|
2396
|
-
/* @__PURE__ */
|
|
2538
|
+
/* @__PURE__ */ C("p", {
|
|
2397
2539
|
className: "text-md",
|
|
2398
|
-
children: [$(e),
|
|
2540
|
+
children: [$(e), qn(e) && /* @__PURE__ */ C("span", {
|
|
2399
2541
|
className: "text-gray-500 text-sm",
|
|
2400
|
-
children: [" ",
|
|
2542
|
+
children: [" ", qn(e)]
|
|
2401
2543
|
})]
|
|
2402
2544
|
})
|
|
2403
2545
|
] })
|
|
2404
2546
|
}, e._id))
|
|
2405
|
-
}), /* @__PURE__ */
|
|
2547
|
+
}), /* @__PURE__ */ C("div", {
|
|
2406
2548
|
className: "w-full md:w-[45%]",
|
|
2407
|
-
children: [/* @__PURE__ */
|
|
2549
|
+
children: [/* @__PURE__ */ C("div", {
|
|
2408
2550
|
className: "mt-4 flex min-h-[250px] flex-col justify-between rounded-md border border-gray-300 p-4 md:mt-0",
|
|
2409
|
-
children: [/* @__PURE__ */
|
|
2551
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
2410
2552
|
className: "border-b border-b-gray-200 pb-1 text-md",
|
|
2411
2553
|
children: "Confirm Details"
|
|
2412
|
-
}), /* @__PURE__ */
|
|
2554
|
+
}), /* @__PURE__ */ S("div", {
|
|
2413
2555
|
className: "mt-2 flex flex-col gap-2",
|
|
2414
|
-
children: t && /* @__PURE__ */
|
|
2556
|
+
children: t && /* @__PURE__ */ C("div", {
|
|
2415
2557
|
className: "flex justify-between",
|
|
2416
|
-
children: [/* @__PURE__ */
|
|
2558
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2417
2559
|
className: "text-md",
|
|
2418
2560
|
children: t.title
|
|
2419
|
-
}), /* @__PURE__ */
|
|
2561
|
+
}), /* @__PURE__ */ S("span", { children: $({
|
|
2420
2562
|
unit_amount: l ? t.subtotal : t.unit_amount,
|
|
2421
2563
|
currency: t.currency
|
|
2422
2564
|
}) })]
|
|
2423
2565
|
})
|
|
2424
|
-
})] }), r &&
|
|
2566
|
+
})] }), r && u ? /* @__PURE__ */ C("div", {
|
|
2425
2567
|
className: "mt-2",
|
|
2426
2568
|
children: [
|
|
2427
|
-
/* @__PURE__ */
|
|
2569
|
+
/* @__PURE__ */ C("div", {
|
|
2428
2570
|
className: "flex items-center justify-between",
|
|
2429
|
-
children: [/* @__PURE__ */
|
|
2571
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2430
2572
|
className: "text-md",
|
|
2431
2573
|
children: "Subtotal"
|
|
2432
|
-
}), /* @__PURE__ */
|
|
2574
|
+
}), /* @__PURE__ */ S("span", {
|
|
2433
2575
|
className: "text-md",
|
|
2434
2576
|
children: $({
|
|
2435
2577
|
unit_amount: r.base_amount,
|
|
@@ -2437,12 +2579,12 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2437
2579
|
})
|
|
2438
2580
|
})]
|
|
2439
2581
|
}),
|
|
2440
|
-
/* @__PURE__ */
|
|
2582
|
+
/* @__PURE__ */ C("div", {
|
|
2441
2583
|
className: "flex items-center justify-between text-green-600",
|
|
2442
|
-
children: [/* @__PURE__ */
|
|
2584
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2443
2585
|
className: "text-md",
|
|
2444
2586
|
children: "Discount"
|
|
2445
|
-
}), /* @__PURE__ */
|
|
2587
|
+
}), /* @__PURE__ */ C("span", {
|
|
2446
2588
|
className: "text-md",
|
|
2447
2589
|
children: [
|
|
2448
2590
|
"-",
|
|
@@ -2454,12 +2596,12 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2454
2596
|
]
|
|
2455
2597
|
})]
|
|
2456
2598
|
}),
|
|
2457
|
-
/* @__PURE__ */
|
|
2599
|
+
/* @__PURE__ */ C("div", {
|
|
2458
2600
|
className: "flex items-center justify-between border-t border-t-gray-200 pt-1",
|
|
2459
|
-
children: [/* @__PURE__ */
|
|
2601
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2460
2602
|
className: "text-md",
|
|
2461
2603
|
children: "Taxable Amount"
|
|
2462
|
-
}), /* @__PURE__ */
|
|
2604
|
+
}), /* @__PURE__ */ S("span", {
|
|
2463
2605
|
className: "text-md",
|
|
2464
2606
|
children: $({
|
|
2465
2607
|
unit_amount: r.taxable_amount,
|
|
@@ -2467,9 +2609,9 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2467
2609
|
})
|
|
2468
2610
|
})]
|
|
2469
2611
|
}),
|
|
2470
|
-
r.taxes?.map((e, n) => /* @__PURE__ */
|
|
2612
|
+
r.taxes?.map((e, n) => /* @__PURE__ */ C("div", {
|
|
2471
2613
|
className: "flex items-center justify-between text-gray-600",
|
|
2472
|
-
children: [/* @__PURE__ */
|
|
2614
|
+
children: [/* @__PURE__ */ C("span", {
|
|
2473
2615
|
className: "text-sm",
|
|
2474
2616
|
children: [
|
|
2475
2617
|
e.label,
|
|
@@ -2477,7 +2619,7 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2477
2619
|
e.percentage,
|
|
2478
2620
|
"%)"
|
|
2479
2621
|
]
|
|
2480
|
-
}), /* @__PURE__ */
|
|
2622
|
+
}), /* @__PURE__ */ S("span", {
|
|
2481
2623
|
className: "text-sm",
|
|
2482
2624
|
children: $({
|
|
2483
2625
|
unit_amount: e.amount,
|
|
@@ -2485,12 +2627,12 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2485
2627
|
})
|
|
2486
2628
|
})]
|
|
2487
2629
|
}, e.id || e._id || n)),
|
|
2488
|
-
/* @__PURE__ */
|
|
2630
|
+
/* @__PURE__ */ C("div", {
|
|
2489
2631
|
className: "mt-1 flex items-center justify-between border-t border-t-gray-200 pt-1 font-medium",
|
|
2490
|
-
children: [/* @__PURE__ */
|
|
2632
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2491
2633
|
className: "text-md",
|
|
2492
2634
|
children: "Payable"
|
|
2493
|
-
}), /* @__PURE__ */
|
|
2635
|
+
}), /* @__PURE__ */ S("span", {
|
|
2494
2636
|
className: "text-md",
|
|
2495
2637
|
children: $({
|
|
2496
2638
|
unit_amount: r.total_amount,
|
|
@@ -2499,15 +2641,15 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2499
2641
|
})]
|
|
2500
2642
|
})
|
|
2501
2643
|
]
|
|
2502
|
-
}) : r ? /* @__PURE__ */
|
|
2644
|
+
}) : r ? /* @__PURE__ */ C("div", {
|
|
2503
2645
|
className: "mt-2",
|
|
2504
2646
|
children: [
|
|
2505
|
-
/* @__PURE__ */
|
|
2647
|
+
/* @__PURE__ */ C("div", {
|
|
2506
2648
|
className: "flex items-center justify-between",
|
|
2507
|
-
children: [/* @__PURE__ */
|
|
2649
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2508
2650
|
className: "text-md",
|
|
2509
2651
|
children: "Subtotal"
|
|
2510
|
-
}), /* @__PURE__ */
|
|
2652
|
+
}), /* @__PURE__ */ S("span", {
|
|
2511
2653
|
className: "text-md",
|
|
2512
2654
|
children: $({
|
|
2513
2655
|
unit_amount: r.base_amount,
|
|
@@ -2515,12 +2657,12 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2515
2657
|
})
|
|
2516
2658
|
})]
|
|
2517
2659
|
}),
|
|
2518
|
-
/* @__PURE__ */
|
|
2660
|
+
/* @__PURE__ */ C("div", {
|
|
2519
2661
|
className: "flex items-center justify-between text-green-600",
|
|
2520
|
-
children: [/* @__PURE__ */
|
|
2662
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2521
2663
|
className: "text-md",
|
|
2522
2664
|
children: "Discount"
|
|
2523
|
-
}), /* @__PURE__ */
|
|
2665
|
+
}), /* @__PURE__ */ C("span", {
|
|
2524
2666
|
className: "text-md",
|
|
2525
2667
|
children: [
|
|
2526
2668
|
"-",
|
|
@@ -2532,12 +2674,12 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2532
2674
|
]
|
|
2533
2675
|
})]
|
|
2534
2676
|
}),
|
|
2535
|
-
/* @__PURE__ */
|
|
2677
|
+
/* @__PURE__ */ C("div", {
|
|
2536
2678
|
className: "mt-1 flex items-center justify-between border-t border-t-gray-200 pt-1 font-medium",
|
|
2537
|
-
children: [/* @__PURE__ */
|
|
2679
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2538
2680
|
className: "text-md",
|
|
2539
2681
|
children: "Payable"
|
|
2540
|
-
}), /* @__PURE__ */
|
|
2682
|
+
}), /* @__PURE__ */ S("span", {
|
|
2541
2683
|
className: "text-md",
|
|
2542
2684
|
children: $({
|
|
2543
2685
|
unit_amount: r.sale_amount,
|
|
@@ -2546,15 +2688,15 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2546
2688
|
})]
|
|
2547
2689
|
})
|
|
2548
2690
|
]
|
|
2549
|
-
}) : l ? /* @__PURE__ */
|
|
2691
|
+
}) : l ? /* @__PURE__ */ C("div", {
|
|
2550
2692
|
className: "mt-2",
|
|
2551
2693
|
children: [
|
|
2552
|
-
/* @__PURE__ */
|
|
2694
|
+
/* @__PURE__ */ C("div", {
|
|
2553
2695
|
className: "flex items-center justify-between",
|
|
2554
|
-
children: [/* @__PURE__ */
|
|
2696
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2555
2697
|
className: "text-md",
|
|
2556
2698
|
children: "Subtotal"
|
|
2557
|
-
}), /* @__PURE__ */
|
|
2699
|
+
}), /* @__PURE__ */ S("span", {
|
|
2558
2700
|
className: "text-md",
|
|
2559
2701
|
children: $({
|
|
2560
2702
|
unit_amount: t.subtotal,
|
|
@@ -2562,9 +2704,9 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2562
2704
|
})
|
|
2563
2705
|
})]
|
|
2564
2706
|
}),
|
|
2565
|
-
t.taxes.map((e, n) => /* @__PURE__ */
|
|
2707
|
+
t.taxes.map((e, n) => /* @__PURE__ */ C("div", {
|
|
2566
2708
|
className: "flex items-center justify-between text-gray-600",
|
|
2567
|
-
children: [/* @__PURE__ */
|
|
2709
|
+
children: [/* @__PURE__ */ C("span", {
|
|
2568
2710
|
className: "text-sm",
|
|
2569
2711
|
children: [
|
|
2570
2712
|
e.label,
|
|
@@ -2572,7 +2714,7 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2572
2714
|
e.percentage,
|
|
2573
2715
|
"%)"
|
|
2574
2716
|
]
|
|
2575
|
-
}), /* @__PURE__ */
|
|
2717
|
+
}), /* @__PURE__ */ S("span", {
|
|
2576
2718
|
className: "text-sm",
|
|
2577
2719
|
children: $({
|
|
2578
2720
|
unit_amount: e.amount,
|
|
@@ -2580,12 +2722,12 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2580
2722
|
})
|
|
2581
2723
|
})]
|
|
2582
2724
|
}, e.id || e._id || n)),
|
|
2583
|
-
/* @__PURE__ */
|
|
2725
|
+
/* @__PURE__ */ C("div", {
|
|
2584
2726
|
className: "mt-1 flex items-center justify-between border-t border-t-gray-200 pt-1 font-medium",
|
|
2585
|
-
children: [/* @__PURE__ */
|
|
2727
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2586
2728
|
className: "text-md",
|
|
2587
2729
|
children: "Payable"
|
|
2588
|
-
}), /* @__PURE__ */
|
|
2730
|
+
}), /* @__PURE__ */ S("span", {
|
|
2589
2731
|
className: "text-md",
|
|
2590
2732
|
children: $({
|
|
2591
2733
|
unit_amount: t.total,
|
|
@@ -2593,58 +2735,58 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2593
2735
|
})
|
|
2594
2736
|
})]
|
|
2595
2737
|
}),
|
|
2596
|
-
t.tax_inclusive && /* @__PURE__ */
|
|
2738
|
+
t.tax_inclusive && /* @__PURE__ */ S("p", {
|
|
2597
2739
|
className: "mt-1 text-gray-500 text-xs",
|
|
2598
2740
|
children: "* Price is inclusive of taxes"
|
|
2599
2741
|
})
|
|
2600
2742
|
]
|
|
2601
|
-
}) : /* @__PURE__ */
|
|
2743
|
+
}) : /* @__PURE__ */ S("div", {
|
|
2602
2744
|
className: "mt-2",
|
|
2603
|
-
children: /* @__PURE__ */
|
|
2745
|
+
children: /* @__PURE__ */ C("div", {
|
|
2604
2746
|
className: "flex items-center justify-between font-medium",
|
|
2605
|
-
children: [/* @__PURE__ */
|
|
2747
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2606
2748
|
className: "text-md",
|
|
2607
2749
|
children: "Payable"
|
|
2608
|
-
}), /* @__PURE__ */
|
|
2750
|
+
}), /* @__PURE__ */ S("span", {
|
|
2609
2751
|
className: "text-md",
|
|
2610
2752
|
children: $(t)
|
|
2611
2753
|
})]
|
|
2612
2754
|
})
|
|
2613
2755
|
})]
|
|
2614
|
-
}), r ? /* @__PURE__ */
|
|
2756
|
+
}), r ? /* @__PURE__ */ S("div", {
|
|
2615
2757
|
className: "flex flex-col justify-between gap-1 py-2",
|
|
2616
|
-
children: /* @__PURE__ */
|
|
2758
|
+
children: /* @__PURE__ */ C("div", {
|
|
2617
2759
|
className: "mt-2 mb-1 space-y-1 rounded-lg border border-green-200 bg-green-50 px-3 py-3",
|
|
2618
|
-
children: [/* @__PURE__ */
|
|
2760
|
+
children: [/* @__PURE__ */ C("div", {
|
|
2619
2761
|
className: "flex items-start justify-between gap-2",
|
|
2620
|
-
children: [/* @__PURE__ */
|
|
2762
|
+
children: [/* @__PURE__ */ C("div", {
|
|
2621
2763
|
className: "flex max-w-16 items-center gap-2",
|
|
2622
|
-
children: [/* @__PURE__ */
|
|
2764
|
+
children: [/* @__PURE__ */ S("div", {
|
|
2623
2765
|
className: "rounded bg-green-500 p-2",
|
|
2624
|
-
children: /* @__PURE__ */
|
|
2766
|
+
children: /* @__PURE__ */ S(V, {
|
|
2625
2767
|
size: 16,
|
|
2626
2768
|
className: "text-white"
|
|
2627
2769
|
})
|
|
2628
|
-
}), /* @__PURE__ */
|
|
2770
|
+
}), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("div", {
|
|
2629
2771
|
className: "font-medium text-green-700 text-xs uppercase opacity-60",
|
|
2630
2772
|
children: "Coupon Applied"
|
|
2631
|
-
}), /* @__PURE__ */
|
|
2773
|
+
}), /* @__PURE__ */ S("div", {
|
|
2632
2774
|
className: "-mt-0.5 max-w-32 truncate font-bold text-green-900 text-sm tracking-wide",
|
|
2633
2775
|
children: i
|
|
2634
2776
|
})] })]
|
|
2635
|
-
}), /* @__PURE__ */
|
|
2777
|
+
}), /* @__PURE__ */ S("button", {
|
|
2636
2778
|
type: "button",
|
|
2637
2779
|
onClick: s,
|
|
2638
2780
|
className: "rounded-md p-1 text-green-600 transition-colors hover:bg-green-100 hover:text-green-800",
|
|
2639
2781
|
"aria-label": "Remove coupon",
|
|
2640
|
-
children: /* @__PURE__ */
|
|
2782
|
+
children: /* @__PURE__ */ S(oe, { size: 18 })
|
|
2641
2783
|
})]
|
|
2642
|
-
}), /* @__PURE__ */
|
|
2784
|
+
}), /* @__PURE__ */ C("div", {
|
|
2643
2785
|
className: "text-green-700 text-xs",
|
|
2644
2786
|
children: [
|
|
2645
2787
|
"You are saving",
|
|
2646
2788
|
" ",
|
|
2647
|
-
/* @__PURE__ */
|
|
2789
|
+
/* @__PURE__ */ S("span", {
|
|
2648
2790
|
className: "font-semibold",
|
|
2649
2791
|
children: $({
|
|
2650
2792
|
unit_amount: r.discount,
|
|
@@ -2654,33 +2796,33 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2654
2796
|
]
|
|
2655
2797
|
})]
|
|
2656
2798
|
})
|
|
2657
|
-
}) : /* @__PURE__ */
|
|
2658
|
-
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"),
|
|
2659
2801
|
onClick: () => t ? o() : null,
|
|
2660
|
-
children: [/* @__PURE__ */
|
|
2802
|
+
children: [/* @__PURE__ */ C("span", {
|
|
2661
2803
|
className: "flex items-center gap-2",
|
|
2662
|
-
children: ["Apply Coupon", a > 0 && /* @__PURE__ */
|
|
2804
|
+
children: ["Apply Coupon", a > 0 && /* @__PURE__ */ S("span", {
|
|
2663
2805
|
className: "rounded-full bg-gray-200 px-2 py-0.5 text-gray-600 text-xs",
|
|
2664
2806
|
children: a
|
|
2665
2807
|
})]
|
|
2666
|
-
}), /* @__PURE__ */
|
|
2808
|
+
}), /* @__PURE__ */ S("span", { children: /* @__PURE__ */ S(ae, {}) })]
|
|
2667
2809
|
})]
|
|
2668
2810
|
})]
|
|
2669
|
-
}), /* @__PURE__ */
|
|
2811
|
+
}), /* @__PURE__ */ S("div", {
|
|
2670
2812
|
className: "mt-3 flex justify-start",
|
|
2671
|
-
children: /* @__PURE__ */
|
|
2813
|
+
children: /* @__PURE__ */ S(Q, {
|
|
2672
2814
|
onClick: c,
|
|
2673
2815
|
className: "rounded-lg bg-brand px-6 py-2 font-semibold text-brand-foreground hover:opacity-90",
|
|
2674
2816
|
children: "Continue for Payment"
|
|
2675
2817
|
})
|
|
2676
2818
|
})] });
|
|
2677
|
-
},
|
|
2678
|
-
let [e, t] =
|
|
2819
|
+
}, rr = () => {
|
|
2820
|
+
let [e, t] = N(null), [n, r] = N(null), [i, a] = N(!1), [o, s] = N(null);
|
|
2679
2821
|
return {
|
|
2680
2822
|
stripePromise: e,
|
|
2681
2823
|
config: n,
|
|
2682
2824
|
isOpen: i,
|
|
2683
|
-
openStripeCheckout:
|
|
2825
|
+
openStripeCheckout: O(async (e) => {
|
|
2684
2826
|
try {
|
|
2685
2827
|
let { loadStripe: n } = await import("@stripe/stripe-js");
|
|
2686
2828
|
t(n(e.key)), r({ clientSecret: e.client_secret }), a(!0);
|
|
@@ -2688,17 +2830,17 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2688
2830
|
console.error("Failed to initialize Stripe checkout:", e);
|
|
2689
2831
|
}
|
|
2690
2832
|
}, []),
|
|
2691
|
-
closeStripeCheckout:
|
|
2833
|
+
closeStripeCheckout: O(() => {
|
|
2692
2834
|
a(!1), setTimeout(() => {
|
|
2693
2835
|
r(null), t(null);
|
|
2694
2836
|
}, 300);
|
|
2695
2837
|
}, []),
|
|
2696
2838
|
onComplete: o,
|
|
2697
|
-
setOnComplete:
|
|
2839
|
+
setOnComplete: O((e) => {
|
|
2698
2840
|
s(() => e);
|
|
2699
2841
|
}, [])
|
|
2700
2842
|
};
|
|
2701
|
-
},
|
|
2843
|
+
}, ir = {
|
|
2702
2844
|
name: "",
|
|
2703
2845
|
email: "",
|
|
2704
2846
|
is_business_purchase: !1,
|
|
@@ -2714,77 +2856,77 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2714
2856
|
country: ""
|
|
2715
2857
|
}
|
|
2716
2858
|
}
|
|
2717
|
-
},
|
|
2859
|
+
}, ar = (e, t, n) => {
|
|
2718
2860
|
let r = t.split("."), i = structuredClone(e), a = i, o = r.length - 1;
|
|
2719
2861
|
return r.forEach((e, t) => {
|
|
2720
2862
|
t === o ? a[e] = n : a = a[e];
|
|
2721
2863
|
}), i;
|
|
2722
|
-
},
|
|
2864
|
+
}, or = async (e, t) => {
|
|
2723
2865
|
try {
|
|
2724
2866
|
let n = new URLSearchParams();
|
|
2725
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;
|
|
2726
2868
|
} catch (t) {
|
|
2727
|
-
e.logger?.error("Failed to fetch event tickets", { exception:
|
|
2869
|
+
e.logger?.error("Failed to fetch event tickets", { exception: b(t) });
|
|
2728
2870
|
}
|
|
2729
|
-
},
|
|
2730
|
-
let a = i(), [o, s] =
|
|
2731
|
-
|
|
2732
|
-
}, { Razorpay:
|
|
2733
|
-
let e =
|
|
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 = () => {
|
|
2875
|
+
let e = B.current;
|
|
2734
2876
|
!e || !a || a.fetch?.url(`/v1/event/booking/${e.bookingId}/confirm-booking`)?.post({ session_id: e.sessionId })?.json().then((e) => {
|
|
2735
|
-
e?.content?.data &&
|
|
2877
|
+
e?.content?.data && _(e?.content?.data), de(), B.current = null;
|
|
2736
2878
|
}).catch((e) => {
|
|
2737
|
-
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;
|
|
2738
2880
|
});
|
|
2739
|
-
},
|
|
2881
|
+
}, fe = async () => {
|
|
2740
2882
|
if (!a) return;
|
|
2741
|
-
|
|
2742
|
-
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;
|
|
2743
2885
|
try {
|
|
2744
2886
|
let o = {
|
|
2745
2887
|
event: e,
|
|
2746
|
-
coupon:
|
|
2888
|
+
coupon: v,
|
|
2747
2889
|
attendees: [{
|
|
2748
2890
|
name: t,
|
|
2749
2891
|
email: n,
|
|
2750
|
-
ticket:
|
|
2892
|
+
ticket: m?._id,
|
|
2751
2893
|
details: {}
|
|
2752
2894
|
}]
|
|
2753
2895
|
};
|
|
2754
|
-
r && !
|
|
2896
|
+
r && !ae && (o.is_business_purchase = !0, o.billing_details = i);
|
|
2755
2897
|
let s = await a.fetch?.url(`/v1/event/event/${e}/booking/create-new-booking`)?.post(o).json();
|
|
2756
|
-
if (!s?.status)
|
|
2898
|
+
if (!s?.status) R("Booking failed. Please try again.");
|
|
2757
2899
|
else {
|
|
2758
|
-
|
|
2900
|
+
oe();
|
|
2759
2901
|
let e = s?.content?.meta;
|
|
2760
2902
|
if (e?.key) {
|
|
2761
2903
|
let t = s?.content.data?._id;
|
|
2762
|
-
e.provider === "stripe" && e.client_secret ? (
|
|
2904
|
+
e.provider === "stripe" && e.client_secret ? (B.current = t && e.session_id ? {
|
|
2763
2905
|
bookingId: t,
|
|
2764
2906
|
sessionId: e.session_id
|
|
2765
|
-
} : null,
|
|
2907
|
+
} : null, G(K), await ue({
|
|
2766
2908
|
key: e.key,
|
|
2767
2909
|
client_secret: e.client_secret,
|
|
2768
2910
|
amount: s?.content.data?.unit_amount || 0,
|
|
2769
2911
|
currency: e.currency || "USD",
|
|
2770
2912
|
provider: "stripe",
|
|
2771
2913
|
reference_id: e.reference_id || ""
|
|
2772
|
-
})) :
|
|
2914
|
+
})) : pe({
|
|
2773
2915
|
key: e.key,
|
|
2774
2916
|
amount: s?.content.data?.unit_amount,
|
|
2775
2917
|
currency: e.currency || "INR",
|
|
2776
2918
|
order_id: e.order_id,
|
|
2777
2919
|
booking_id: t
|
|
2778
2920
|
});
|
|
2779
|
-
} else
|
|
2921
|
+
} else _(s?.content.data);
|
|
2780
2922
|
}
|
|
2781
2923
|
} catch (e) {
|
|
2782
|
-
|
|
2924
|
+
R(b(e).message || "Something went wrong. Please try again.");
|
|
2783
2925
|
}
|
|
2784
|
-
|
|
2785
|
-
},
|
|
2926
|
+
p(!1);
|
|
2927
|
+
}, pe = async (e) => {
|
|
2786
2928
|
if (!a) return;
|
|
2787
|
-
let n = new
|
|
2929
|
+
let n = new H({
|
|
2788
2930
|
key: e.key,
|
|
2789
2931
|
amount: e.amount ?? 0,
|
|
2790
2932
|
currency: e.currency,
|
|
@@ -2797,9 +2939,9 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2797
2939
|
payment_id: t.razorpay_payment_id,
|
|
2798
2940
|
signature: t.razorpay_signature
|
|
2799
2941
|
})?.json().then((e) => {
|
|
2800
|
-
e?.content?.data?.status &&
|
|
2942
|
+
e?.content?.data?.status && _(e?.content?.data);
|
|
2801
2943
|
}).catch((e) => {
|
|
2802
|
-
a.logger?.error("Failed to confirm Razorpay booking", { exception:
|
|
2944
|
+
a.logger?.error("Failed to confirm Razorpay booking", { exception: b(e) });
|
|
2803
2945
|
});
|
|
2804
2946
|
},
|
|
2805
2947
|
prefill: {
|
|
@@ -2810,19 +2952,19 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2810
2952
|
theme: { color: "#FC751A" }
|
|
2811
2953
|
});
|
|
2812
2954
|
n.on("payment.failed", (e) => {
|
|
2813
|
-
a.logger?.error("Razorpay payment failed", { exception:
|
|
2955
|
+
a.logger?.error("Razorpay payment failed", { exception: b(e.error) });
|
|
2814
2956
|
}), n.open();
|
|
2815
|
-
},
|
|
2957
|
+
}, me = O(async () => {
|
|
2816
2958
|
if (a) try {
|
|
2817
2959
|
let t = await a.fetch?.url(`/v1/event/event/${e}/coupon/list-public-coupons`)?.get().json();
|
|
2818
|
-
t?.status && t?.content?.data &&
|
|
2960
|
+
t?.status && t?.content?.data && ne(t.content.data);
|
|
2819
2961
|
} catch (e) {
|
|
2820
|
-
a.logger?.error("Failed to fetch public coupons", { exception:
|
|
2962
|
+
a.logger?.error("Failed to fetch public coupons", { exception: b(e) });
|
|
2821
2963
|
}
|
|
2822
|
-
}, [a, e]),
|
|
2964
|
+
}, [a, e]), he = async (t) => {
|
|
2823
2965
|
if (!a) return;
|
|
2824
|
-
let n = t ??
|
|
2825
|
-
|
|
2966
|
+
let n = t ?? v;
|
|
2967
|
+
D(!0), A(null);
|
|
2826
2968
|
try {
|
|
2827
2969
|
let t = await a.fetch?.url(`/v1/event/event/${e}/coupon/validate-coupon-code`)?.post({
|
|
2828
2970
|
coupon: n,
|
|
@@ -2830,141 +2972,141 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2830
2972
|
attendees: [{
|
|
2831
2973
|
name: "",
|
|
2832
2974
|
email: "",
|
|
2833
|
-
ticket:
|
|
2975
|
+
ticket: m?._id
|
|
2834
2976
|
}]
|
|
2835
2977
|
}).json();
|
|
2836
|
-
t?.status && (
|
|
2978
|
+
t?.status && (T(t.content.data), y(n)), F(!1), D(!1);
|
|
2837
2979
|
} catch (e) {
|
|
2838
|
-
|
|
2980
|
+
A(b(e).message), D(!1);
|
|
2839
2981
|
}
|
|
2840
|
-
},
|
|
2841
|
-
|
|
2842
|
-
}, ge = () => {
|
|
2843
|
-
k(null), j(null), O("");
|
|
2982
|
+
}, ge = (e) => {
|
|
2983
|
+
y(""), T(null), A(null), D(!1), R(null), h(e);
|
|
2844
2984
|
}, _e = () => {
|
|
2845
|
-
|
|
2846
|
-
}, ve = (
|
|
2985
|
+
T(null), A(null), y("");
|
|
2986
|
+
}, ve = () => {
|
|
2987
|
+
A(null), D(!1), y(""), F(!1);
|
|
2988
|
+
}, ye = (e) => {
|
|
2847
2989
|
let { name: t, value: n, type: r, checked: i } = e.target;
|
|
2848
|
-
|
|
2849
|
-
},
|
|
2850
|
-
e?.preventDefault(),
|
|
2990
|
+
ie((e) => ar(e, t, r === "checkbox" ? i : n));
|
|
2991
|
+
}, q = () => {}, be = (e) => {
|
|
2992
|
+
e?.preventDefault(), fe();
|
|
2851
2993
|
};
|
|
2852
|
-
if (
|
|
2994
|
+
if (k(() => {
|
|
2853
2995
|
if (n) {
|
|
2854
|
-
|
|
2996
|
+
l(!1);
|
|
2855
2997
|
return;
|
|
2856
2998
|
}
|
|
2857
|
-
e && a && (
|
|
2858
|
-
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);
|
|
2859
3001
|
}));
|
|
2860
3002
|
}, [
|
|
2861
3003
|
e,
|
|
2862
3004
|
n,
|
|
2863
3005
|
a
|
|
2864
|
-
]),
|
|
2865
|
-
|
|
2866
|
-
}, [
|
|
2867
|
-
|
|
3006
|
+
]), k(() => {
|
|
3007
|
+
m?.unit_amount === 0 && o?.length === 1 && L(2);
|
|
3008
|
+
}, [m, o]), k(() => {
|
|
3009
|
+
u && e && me();
|
|
2868
3010
|
}, [
|
|
2869
|
-
|
|
3011
|
+
u,
|
|
2870
3012
|
e,
|
|
2871
|
-
|
|
2872
|
-
]), n) return /* @__PURE__ */
|
|
3013
|
+
me
|
|
3014
|
+
]), n) return /* @__PURE__ */ S("div", {
|
|
2873
3015
|
className: "my-2",
|
|
2874
|
-
children: /* @__PURE__ */
|
|
3016
|
+
children: /* @__PURE__ */ S(Q, {
|
|
2875
3017
|
className: "rounded-lg bg-brand px-4 py-3 font-semibold text-brand-foreground hover:opacity-90",
|
|
2876
3018
|
onClick: () => window.open(n, "_blank", "noopener,noreferrer"),
|
|
2877
3019
|
children: r
|
|
2878
3020
|
})
|
|
2879
3021
|
});
|
|
2880
|
-
if (
|
|
3022
|
+
if (c) return /* @__PURE__ */ S("div", {
|
|
2881
3023
|
className: "my-2",
|
|
2882
|
-
children: /* @__PURE__ */
|
|
3024
|
+
children: /* @__PURE__ */ S(Q, {
|
|
2883
3025
|
className: "rounded-lg bg-brand px-4 py-2 font-bold text-brand-foreground",
|
|
2884
3026
|
children: "Loading..."
|
|
2885
3027
|
})
|
|
2886
3028
|
});
|
|
2887
|
-
let xe =
|
|
2888
|
-
return /* @__PURE__ */
|
|
2889
|
-
/* @__PURE__ */
|
|
3029
|
+
let xe = ae ? "Complete Registration" : "Pay";
|
|
3030
|
+
return /* @__PURE__ */ C(x, { children: [
|
|
3031
|
+
/* @__PURE__ */ S("div", {
|
|
2890
3032
|
className: "my-2",
|
|
2891
|
-
children: o?.length ? /* @__PURE__ */
|
|
2892
|
-
onClick: () =>
|
|
3033
|
+
children: o?.length ? /* @__PURE__ */ S(Q, {
|
|
3034
|
+
onClick: () => d(!0),
|
|
2893
3035
|
className: "rounded-lg bg-brand px-4 py-3 font-semibold text-brand-foreground hover:opacity-90",
|
|
2894
3036
|
children: r
|
|
2895
|
-
}) : /* @__PURE__ */
|
|
3037
|
+
}) : /* @__PURE__ */ S("p", {
|
|
2896
3038
|
className: "text-red-500",
|
|
2897
3039
|
children: "No tickets available for this event."
|
|
2898
3040
|
})
|
|
2899
3041
|
}),
|
|
2900
|
-
/* @__PURE__ */
|
|
2901
|
-
open:
|
|
3042
|
+
/* @__PURE__ */ S(P.Root, {
|
|
3043
|
+
open: u,
|
|
2902
3044
|
onOpenChange: (e) => {
|
|
2903
|
-
e ||
|
|
3045
|
+
e || oe();
|
|
2904
3046
|
},
|
|
2905
|
-
children: /* @__PURE__ */
|
|
2906
|
-
className:
|
|
2907
|
-
children: [/* @__PURE__ */
|
|
2908
|
-
className: `mb-4 flex w-full items-start justify-between ${
|
|
2909
|
-
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, {
|
|
2910
3052
|
className: "font-semibold text-lg",
|
|
2911
3053
|
children: [
|
|
2912
3054
|
"Register for ",
|
|
2913
3055
|
t,
|
|
2914
3056
|
"!"
|
|
2915
3057
|
]
|
|
2916
|
-
}), /* @__PURE__ */
|
|
3058
|
+
}), /* @__PURE__ */ S(P.Close, {
|
|
2917
3059
|
className: "rounded-md p-2 hover:bg-gray-100 focus:outline-none",
|
|
2918
|
-
children: /* @__PURE__ */
|
|
3060
|
+
children: /* @__PURE__ */ S(se, { className: "size-4" })
|
|
2919
3061
|
})]
|
|
2920
|
-
}), /* @__PURE__ */
|
|
3062
|
+
}), /* @__PURE__ */ C("div", { children: [te && /* @__PURE__ */ S("div", {
|
|
2921
3063
|
className: "mb-4 rounded-md bg-red-50 p-3 text-red-600 text-sm",
|
|
2922
|
-
children:
|
|
2923
|
-
}),
|
|
2924
|
-
couponCode:
|
|
2925
|
-
onCouponCodeChange:
|
|
2926
|
-
couponError:
|
|
2927
|
-
couponLoading:
|
|
2928
|
-
onValidateCoupon:
|
|
2929
|
-
publicCoupons:
|
|
2930
|
-
onBack:
|
|
2931
|
-
selectedTicket:
|
|
2932
|
-
}) : /* @__PURE__ */
|
|
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,
|
|
3070
|
+
onValidateCoupon: he,
|
|
3071
|
+
publicCoupons: z,
|
|
3072
|
+
onBack: ve,
|
|
3073
|
+
selectedTicket: m
|
|
3074
|
+
}) : /* @__PURE__ */ S(nr, {
|
|
2933
3075
|
tickets: o,
|
|
2934
|
-
selectedTicket:
|
|
2935
|
-
onSelectTicket:
|
|
2936
|
-
discount:
|
|
2937
|
-
couponCode:
|
|
2938
|
-
publicCouponsCount:
|
|
2939
|
-
onApplyCouponClick: () =>
|
|
2940
|
-
onRemoveCoupon:
|
|
2941
|
-
onNext: () =>
|
|
2942
|
-
}) }) : /* @__PURE__ */
|
|
2943
|
-
values:
|
|
2944
|
-
handleChange:
|
|
2945
|
-
handleBlur:
|
|
3076
|
+
selectedTicket: m,
|
|
3077
|
+
onSelectTicket: ge,
|
|
3078
|
+
discount: w,
|
|
3079
|
+
couponCode: v,
|
|
3080
|
+
publicCouponsCount: z.length,
|
|
3081
|
+
onApplyCouponClick: () => F(!0),
|
|
3082
|
+
onRemoveCoupon: _e,
|
|
3083
|
+
onNext: () => L(2)
|
|
3084
|
+
}) }) : /* @__PURE__ */ S(Gn, {
|
|
3085
|
+
values: re,
|
|
3086
|
+
handleChange: ye,
|
|
3087
|
+
handleBlur: q,
|
|
2946
3088
|
handleSubmit: be,
|
|
2947
|
-
registerLoading:
|
|
2948
|
-
onBack: () =>
|
|
3089
|
+
registerLoading: f,
|
|
3090
|
+
onBack: () => L(1),
|
|
2949
3091
|
submitLabel: xe,
|
|
2950
|
-
showBusinessBilling: !
|
|
3092
|
+
showBusinessBilling: !ae
|
|
2951
3093
|
})] })]
|
|
2952
3094
|
})] })
|
|
2953
3095
|
}),
|
|
2954
|
-
|
|
2955
|
-
paymentData:
|
|
3096
|
+
g && /* @__PURE__ */ S(er, {
|
|
3097
|
+
paymentData: g,
|
|
2956
3098
|
ticketData: o,
|
|
2957
3099
|
type: "confirm"
|
|
2958
3100
|
}),
|
|
2959
|
-
|
|
2960
|
-
isOpen:
|
|
2961
|
-
onClose:
|
|
2962
|
-
stripePromise:
|
|
2963
|
-
clientSecret:
|
|
2964
|
-
onComplete:
|
|
3101
|
+
W && U && /* @__PURE__ */ S(tr, {
|
|
3102
|
+
isOpen: W,
|
|
3103
|
+
onClose: de,
|
|
3104
|
+
stripePromise: le,
|
|
3105
|
+
clientSecret: U.clientSecret,
|
|
3106
|
+
onComplete: K
|
|
2965
3107
|
})
|
|
2966
3108
|
] });
|
|
2967
|
-
},
|
|
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) => {
|
|
2968
3110
|
let n = e.meta ?? {}, r = e.title && t ? `${e.title} | ${t}` : e.title || t || void 0;
|
|
2969
3111
|
return {
|
|
2970
3112
|
title: n.meta_title || r,
|
|
@@ -2974,33 +3116,33 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
2974
3116
|
og: {
|
|
2975
3117
|
title: n.og_title || void 0,
|
|
2976
3118
|
description: n.og_description || void 0,
|
|
2977
|
-
image:
|
|
3119
|
+
image: ur(n.og_image),
|
|
2978
3120
|
url: n.og_url || void 0
|
|
2979
3121
|
},
|
|
2980
3122
|
twitter: { card: n.twitter_card || void 0 },
|
|
2981
3123
|
ldJson: n.ld_json || void 0,
|
|
2982
3124
|
customHead: n.head_code || void 0
|
|
2983
3125
|
};
|
|
2984
|
-
},
|
|
3126
|
+
}, fr = (e) => ({
|
|
2985
3127
|
description: e.description || void 0,
|
|
2986
3128
|
icon: e.icon?.location || void 0,
|
|
2987
3129
|
customHead: e.settings?.head_code || void 0
|
|
2988
|
-
}),
|
|
2989
|
-
let i =
|
|
3130
|
+
}), pr = (e) => (t = {}, n) => (r) => {
|
|
3131
|
+
let i = dr(t, e.name);
|
|
2990
3132
|
if (n) {
|
|
2991
3133
|
let t = r?.loaderData?.[n.source];
|
|
2992
3134
|
if (t) {
|
|
2993
|
-
let r = n.title ?
|
|
3135
|
+
let r = n.title ? lr(t[n.title]) : void 0;
|
|
2994
3136
|
r && (i.title = e.name ? `${r} | ${e.name}` : r, i.og = {
|
|
2995
3137
|
...i.og,
|
|
2996
3138
|
title: r
|
|
2997
3139
|
});
|
|
2998
|
-
let a = n.description ?
|
|
3140
|
+
let a = n.description ? lr(t[n.description]) : void 0;
|
|
2999
3141
|
a && (i.description = a, i.og = {
|
|
3000
3142
|
...i.og,
|
|
3001
3143
|
description: a
|
|
3002
3144
|
});
|
|
3003
|
-
let o = n.image ?
|
|
3145
|
+
let o = n.image ? ur(t[n.image]) : void 0;
|
|
3004
3146
|
o && (i.og = {
|
|
3005
3147
|
...i.og,
|
|
3006
3148
|
image: o
|
|
@@ -3009,18 +3151,18 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
3009
3151
|
}
|
|
3010
3152
|
if (!i.canonical) {
|
|
3011
3153
|
let t = r?.match?.pathname, n = (e.domain || "").trim();
|
|
3012
|
-
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));
|
|
3013
3155
|
}
|
|
3014
|
-
let a =
|
|
3156
|
+
let a = Hn(i, fr(e)), o = t.id?.trim();
|
|
3015
3157
|
return o && a.meta.push({
|
|
3016
|
-
name:
|
|
3158
|
+
name: xn,
|
|
3017
3159
|
content: o
|
|
3018
3160
|
}), a;
|
|
3019
|
-
},
|
|
3020
|
-
let t =
|
|
3161
|
+
}, mr = (e) => {
|
|
3162
|
+
let t = Ce(e);
|
|
3021
3163
|
return (e, n) => {
|
|
3022
|
-
let { rules: r, invalid: i } =
|
|
3023
|
-
return ({ context: n, params: r }) => a ? Promise.resolve({}) :
|
|
3164
|
+
let { rules: r, invalid: i } = ge(n?.access), a = r.length > 0 || i;
|
|
3165
|
+
return ({ context: n, params: r }) => a ? Promise.resolve({}) : Ne({
|
|
3024
3166
|
queryClient: n.queryClient,
|
|
3025
3167
|
config: t,
|
|
3026
3168
|
sources: e,
|
|
@@ -3029,4 +3171,4 @@ var xn = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
|
|
|
3029
3171
|
};
|
|
3030
3172
|
};
|
|
3031
3173
|
//#endregion
|
|
3032
|
-
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 };
|