proctoring-ui-3 1.0.0 → 1.0.2
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/dist/ui-3.es.js +1311 -1663
- package/dist/ui-3.umd.js +110 -118
- package/package.json +11 -6
package/dist/ui-3.es.js
CHANGED
|
@@ -1,661 +1,309 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
var Pe = { exports: {} }, ge = {};
|
|
1
|
+
import ve, { useState as z, useRef as K, useEffect as J } from "react";
|
|
2
|
+
import { Heart as je, Home as Ne, Calendar as ye, Users as Ee, Settings as Ce, User as pe, ChevronDown as ae, LogOut as fe, X, AlertCircle as he, Upload as Se, File as $e, Trash2 as Le, Search as le, Save as Re, Edit as oe, Sparkles as Me, Check as re, ChevronRight as se, CheckCircle as _e, ChevronLeft as ie, AlertTriangle as ke } from "lucide-react";
|
|
3
|
+
import { useNavigate as ze, useLocation as xe, Link as ne } from "react-router-dom";
|
|
4
|
+
import { createPortal as de } from "react-dom";
|
|
5
|
+
var ce = { exports: {} }, ee = {};
|
|
7
6
|
/**
|
|
8
7
|
* @license React
|
|
9
|
-
* react-jsx-runtime.production.
|
|
8
|
+
* react-jsx-runtime.production.js
|
|
10
9
|
*
|
|
11
|
-
* Copyright (c)
|
|
10
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
12
11
|
*
|
|
13
12
|
* This source code is licensed under the MIT license found in the
|
|
14
13
|
* LICENSE file in the root directory of this source tree.
|
|
15
14
|
*/
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
function
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
var be;
|
|
16
|
+
function Te() {
|
|
17
|
+
if (be) return ee;
|
|
18
|
+
be = 1;
|
|
19
|
+
var t = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
|
|
20
|
+
function n(l, c, h) {
|
|
21
|
+
var x = null;
|
|
22
|
+
if (h !== void 0 && (x = "" + h), c.key !== void 0 && (x = "" + c.key), "key" in c) {
|
|
23
|
+
h = {};
|
|
24
|
+
for (var m in c)
|
|
25
|
+
m !== "key" && (h[m] = c[m]);
|
|
26
|
+
} else h = c;
|
|
27
|
+
return c = h.ref, {
|
|
28
|
+
$$typeof: t,
|
|
29
|
+
type: l,
|
|
30
|
+
key: x,
|
|
31
|
+
ref: c !== void 0 ? c : null,
|
|
32
|
+
props: h
|
|
33
|
+
};
|
|
27
34
|
}
|
|
28
|
-
return
|
|
35
|
+
return ee.Fragment = r, ee.jsx = n, ee.jsxs = n, ee;
|
|
29
36
|
}
|
|
30
|
-
var
|
|
37
|
+
var te = {};
|
|
31
38
|
/**
|
|
32
39
|
* @license React
|
|
33
40
|
* react-jsx-runtime.development.js
|
|
34
41
|
*
|
|
35
|
-
* Copyright (c)
|
|
42
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
36
43
|
*
|
|
37
44
|
* This source code is licensed under the MIT license found in the
|
|
38
45
|
* LICENSE file in the root directory of this source tree.
|
|
39
46
|
*/
|
|
40
|
-
var
|
|
41
|
-
function
|
|
42
|
-
return
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (
|
|
46
|
-
return null;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
var i = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
|
-
function E(t) {
|
|
52
|
-
{
|
|
53
|
-
for (var s = arguments.length, u = new Array(s > 1 ? s - 1 : 0), N = 1; N < s; N++)
|
|
54
|
-
u[N - 1] = arguments[N];
|
|
55
|
-
q("error", t, u);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
function q(t, s, u) {
|
|
59
|
-
{
|
|
60
|
-
var N = i.ReactDebugCurrentFrame, B = N.getStackAddendum();
|
|
61
|
-
B !== "" && (s += "%s", u = u.concat([B]));
|
|
62
|
-
var U = u.map(function(F) {
|
|
63
|
-
return String(F);
|
|
64
|
-
});
|
|
65
|
-
U.unshift("Warning: " + s), Function.prototype.apply.call(console[t], console, U);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
var K = !1, A = !1, te = !1, re = !1, Q = !1, $;
|
|
69
|
-
$ = Symbol.for("react.module.reference");
|
|
70
|
-
function G(t) {
|
|
71
|
-
return !!(typeof t == "string" || typeof t == "function" || t === n || t === b || Q || t === h || t === j || t === _ || re || t === z || K || A || te || typeof t == "object" && t !== null && (t.$$typeof === C || t.$$typeof === y || t.$$typeof === c || t.$$typeof === x || t.$$typeof === k || // This needs to include all possible module reference object
|
|
72
|
-
// types supported by any Flight configuration anywhere since
|
|
73
|
-
// we don't know which Flight build this will end up being used
|
|
74
|
-
// with.
|
|
75
|
-
t.$$typeof === $ || t.getModuleId !== void 0));
|
|
76
|
-
}
|
|
77
|
-
function d(t, s, u) {
|
|
78
|
-
var N = t.displayName;
|
|
79
|
-
if (N)
|
|
80
|
-
return N;
|
|
81
|
-
var B = s.displayName || s.name || "";
|
|
82
|
-
return B !== "" ? u + "(" + B + ")" : u;
|
|
83
|
-
}
|
|
84
|
-
function w(t) {
|
|
85
|
-
return t.displayName || "Context";
|
|
86
|
-
}
|
|
87
|
-
function S(t) {
|
|
88
|
-
if (t == null)
|
|
89
|
-
return null;
|
|
90
|
-
if (typeof t.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
|
|
91
|
-
return t.displayName || t.name || null;
|
|
92
|
-
if (typeof t == "string")
|
|
93
|
-
return t;
|
|
94
|
-
switch (t) {
|
|
95
|
-
case n:
|
|
47
|
+
var ue;
|
|
48
|
+
function Oe() {
|
|
49
|
+
return ue || (ue = 1, process.env.NODE_ENV !== "production" && function() {
|
|
50
|
+
function t(s) {
|
|
51
|
+
if (s == null) return null;
|
|
52
|
+
if (typeof s == "function")
|
|
53
|
+
return s.$$typeof === d ? null : s.displayName || s.name || null;
|
|
54
|
+
if (typeof s == "string") return s;
|
|
55
|
+
switch (s) {
|
|
56
|
+
case i:
|
|
96
57
|
return "Fragment";
|
|
97
|
-
case
|
|
98
|
-
return "Portal";
|
|
99
|
-
case b:
|
|
58
|
+
case D:
|
|
100
59
|
return "Profiler";
|
|
101
|
-
case h:
|
|
102
|
-
return "StrictMode";
|
|
103
60
|
case j:
|
|
61
|
+
return "StrictMode";
|
|
62
|
+
case Y:
|
|
104
63
|
return "Suspense";
|
|
105
|
-
case
|
|
64
|
+
case U:
|
|
106
65
|
return "SuspenseList";
|
|
66
|
+
case W:
|
|
67
|
+
return "Activity";
|
|
107
68
|
}
|
|
108
|
-
if (typeof
|
|
109
|
-
switch (
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return
|
|
116
|
-
case
|
|
117
|
-
return
|
|
118
|
-
case
|
|
119
|
-
var
|
|
120
|
-
return
|
|
121
|
-
case
|
|
122
|
-
|
|
69
|
+
if (typeof s == "object")
|
|
70
|
+
switch (typeof s.tag == "number" && console.error(
|
|
71
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
72
|
+
), s.$$typeof) {
|
|
73
|
+
case g:
|
|
74
|
+
return "Portal";
|
|
75
|
+
case V:
|
|
76
|
+
return s.displayName || "Context";
|
|
77
|
+
case T:
|
|
78
|
+
return (s._context.displayName || "Context") + ".Consumer";
|
|
79
|
+
case I:
|
|
80
|
+
var a = s.render;
|
|
81
|
+
return s = s.displayName, s || (s = a.displayName || a.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
|
|
82
|
+
case B:
|
|
83
|
+
return a = s.displayName || null, a !== null ? a : t(s.type) || "Memo";
|
|
84
|
+
case w:
|
|
85
|
+
a = s._payload, s = s._init;
|
|
123
86
|
try {
|
|
124
|
-
return
|
|
87
|
+
return t(s(a));
|
|
125
88
|
} catch {
|
|
126
|
-
return null;
|
|
127
89
|
}
|
|
128
|
-
}
|
|
129
90
|
}
|
|
130
91
|
return null;
|
|
131
92
|
}
|
|
132
|
-
|
|
133
|
-
|
|
93
|
+
function r(s) {
|
|
94
|
+
return "" + s;
|
|
134
95
|
}
|
|
135
|
-
|
|
136
|
-
function T() {
|
|
137
|
-
{
|
|
138
|
-
if (I === 0) {
|
|
139
|
-
m = console.log, M = console.info, H = console.warn, ee = console.error, le = console.group, l = console.groupCollapsed, v = console.groupEnd;
|
|
140
|
-
var t = {
|
|
141
|
-
configurable: !0,
|
|
142
|
-
enumerable: !0,
|
|
143
|
-
value: g,
|
|
144
|
-
writable: !0
|
|
145
|
-
};
|
|
146
|
-
Object.defineProperties(console, {
|
|
147
|
-
info: t,
|
|
148
|
-
log: t,
|
|
149
|
-
warn: t,
|
|
150
|
-
error: t,
|
|
151
|
-
group: t,
|
|
152
|
-
groupCollapsed: t,
|
|
153
|
-
groupEnd: t
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
I++;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
function R() {
|
|
160
|
-
{
|
|
161
|
-
if (I--, I === 0) {
|
|
162
|
-
var t = {
|
|
163
|
-
configurable: !0,
|
|
164
|
-
enumerable: !0,
|
|
165
|
-
writable: !0
|
|
166
|
-
};
|
|
167
|
-
Object.defineProperties(console, {
|
|
168
|
-
log: D({}, t, {
|
|
169
|
-
value: m
|
|
170
|
-
}),
|
|
171
|
-
info: D({}, t, {
|
|
172
|
-
value: M
|
|
173
|
-
}),
|
|
174
|
-
warn: D({}, t, {
|
|
175
|
-
value: H
|
|
176
|
-
}),
|
|
177
|
-
error: D({}, t, {
|
|
178
|
-
value: ee
|
|
179
|
-
}),
|
|
180
|
-
group: D({}, t, {
|
|
181
|
-
value: le
|
|
182
|
-
}),
|
|
183
|
-
groupCollapsed: D({}, t, {
|
|
184
|
-
value: l
|
|
185
|
-
}),
|
|
186
|
-
groupEnd: D({}, t, {
|
|
187
|
-
value: v
|
|
188
|
-
})
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
I < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
var Y = i.ReactCurrentDispatcher, Z;
|
|
195
|
-
function ne(t, s, u) {
|
|
196
|
-
{
|
|
197
|
-
if (Z === void 0)
|
|
198
|
-
try {
|
|
199
|
-
throw Error();
|
|
200
|
-
} catch (B) {
|
|
201
|
-
var N = B.stack.trim().match(/\n( *(at )?)/);
|
|
202
|
-
Z = N && N[1] || "";
|
|
203
|
-
}
|
|
204
|
-
return `
|
|
205
|
-
` + Z + t;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
var f = !1, oe;
|
|
209
|
-
{
|
|
210
|
-
var ce = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
|
-
oe = new ce();
|
|
212
|
-
}
|
|
213
|
-
function ve(t, s) {
|
|
214
|
-
if (!t || f)
|
|
215
|
-
return "";
|
|
216
|
-
{
|
|
217
|
-
var u = oe.get(t);
|
|
218
|
-
if (u !== void 0)
|
|
219
|
-
return u;
|
|
220
|
-
}
|
|
221
|
-
var N;
|
|
222
|
-
f = !0;
|
|
223
|
-
var B = Error.prepareStackTrace;
|
|
224
|
-
Error.prepareStackTrace = void 0;
|
|
225
|
-
var U;
|
|
226
|
-
U = Y.current, Y.current = null, T();
|
|
96
|
+
function n(s) {
|
|
227
97
|
try {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
if (Object.defineProperty(F.prototype, "props", {
|
|
233
|
-
set: function() {
|
|
234
|
-
throw Error();
|
|
235
|
-
}
|
|
236
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
|
-
try {
|
|
238
|
-
Reflect.construct(F, []);
|
|
239
|
-
} catch (se) {
|
|
240
|
-
N = se;
|
|
241
|
-
}
|
|
242
|
-
Reflect.construct(t, [], F);
|
|
243
|
-
} else {
|
|
244
|
-
try {
|
|
245
|
-
F.call();
|
|
246
|
-
} catch (se) {
|
|
247
|
-
N = se;
|
|
248
|
-
}
|
|
249
|
-
t.call(F.prototype);
|
|
250
|
-
}
|
|
251
|
-
} else {
|
|
252
|
-
try {
|
|
253
|
-
throw Error();
|
|
254
|
-
} catch (se) {
|
|
255
|
-
N = se;
|
|
256
|
-
}
|
|
257
|
-
t();
|
|
258
|
-
}
|
|
259
|
-
} catch (se) {
|
|
260
|
-
if (se && N && typeof se.stack == "string") {
|
|
261
|
-
for (var P = se.stack.split(`
|
|
262
|
-
`), ae = N.stack.split(`
|
|
263
|
-
`), J = P.length - 1, X = ae.length - 1; J >= 1 && X >= 0 && P[J] !== ae[X]; )
|
|
264
|
-
X--;
|
|
265
|
-
for (; J >= 1 && X >= 0; J--, X--)
|
|
266
|
-
if (P[J] !== ae[X]) {
|
|
267
|
-
if (J !== 1 || X !== 1)
|
|
268
|
-
do
|
|
269
|
-
if (J--, X--, X < 0 || P[J] !== ae[X]) {
|
|
270
|
-
var ie = `
|
|
271
|
-
` + P[J].replace(" at new ", " at ");
|
|
272
|
-
return t.displayName && ie.includes("<anonymous>") && (ie = ie.replace("<anonymous>", t.displayName)), typeof t == "function" && oe.set(t, ie), ie;
|
|
273
|
-
}
|
|
274
|
-
while (J >= 1 && X >= 0);
|
|
275
|
-
break;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
} finally {
|
|
279
|
-
f = !1, Y.current = U, R(), Error.prepareStackTrace = B;
|
|
280
|
-
}
|
|
281
|
-
var be = t ? t.displayName || t.name : "", me = be ? ne(be) : "";
|
|
282
|
-
return typeof t == "function" && oe.set(t, me), me;
|
|
283
|
-
}
|
|
284
|
-
function ot(t, s, u) {
|
|
285
|
-
return ve(t, !1);
|
|
286
|
-
}
|
|
287
|
-
function it(t) {
|
|
288
|
-
var s = t.prototype;
|
|
289
|
-
return !!(s && s.isReactComponent);
|
|
290
|
-
}
|
|
291
|
-
function ye(t, s, u) {
|
|
292
|
-
if (t == null)
|
|
293
|
-
return "";
|
|
294
|
-
if (typeof t == "function")
|
|
295
|
-
return ve(t, it(t));
|
|
296
|
-
if (typeof t == "string")
|
|
297
|
-
return ne(t);
|
|
298
|
-
switch (t) {
|
|
299
|
-
case j:
|
|
300
|
-
return ne("Suspense");
|
|
301
|
-
case _:
|
|
302
|
-
return ne("SuspenseList");
|
|
303
|
-
}
|
|
304
|
-
if (typeof t == "object")
|
|
305
|
-
switch (t.$$typeof) {
|
|
306
|
-
case k:
|
|
307
|
-
return ot(t.render);
|
|
308
|
-
case y:
|
|
309
|
-
return ye(t.type, s, u);
|
|
310
|
-
case C: {
|
|
311
|
-
var N = t, B = N._payload, U = N._init;
|
|
312
|
-
try {
|
|
313
|
-
return ye(U(B), s, u);
|
|
314
|
-
} catch {
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
return "";
|
|
319
|
-
}
|
|
320
|
-
var fe = Object.prototype.hasOwnProperty, ze = {}, Ae = i.ReactDebugCurrentFrame;
|
|
321
|
-
function Ne(t) {
|
|
322
|
-
if (t) {
|
|
323
|
-
var s = t._owner, u = ye(t.type, t._source, s ? s.type : null);
|
|
324
|
-
Ae.setExtraStackFrame(u);
|
|
325
|
-
} else
|
|
326
|
-
Ae.setExtraStackFrame(null);
|
|
327
|
-
}
|
|
328
|
-
function dt(t, s, u, N, B) {
|
|
329
|
-
{
|
|
330
|
-
var U = Function.call.bind(fe);
|
|
331
|
-
for (var F in t)
|
|
332
|
-
if (U(t, F)) {
|
|
333
|
-
var P = void 0;
|
|
334
|
-
try {
|
|
335
|
-
if (typeof t[F] != "function") {
|
|
336
|
-
var ae = Error((N || "React class") + ": " + u + " type `" + F + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[F] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
|
-
throw ae.name = "Invariant Violation", ae;
|
|
338
|
-
}
|
|
339
|
-
P = t[F](s, F, N, u, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
-
} catch (J) {
|
|
341
|
-
P = J;
|
|
342
|
-
}
|
|
343
|
-
P && !(P instanceof Error) && (Ne(B), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", N || "React class", u, F, typeof P), Ne(null)), P instanceof Error && !(P.message in ze) && (ze[P.message] = !0, Ne(B), E("Failed %s type: %s", u, P.message), Ne(null));
|
|
344
|
-
}
|
|
98
|
+
r(s);
|
|
99
|
+
var a = !1;
|
|
100
|
+
} catch {
|
|
101
|
+
a = !0;
|
|
345
102
|
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
return u;
|
|
103
|
+
if (a) {
|
|
104
|
+
a = console;
|
|
105
|
+
var o = a.error, f = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
|
|
106
|
+
return o.call(
|
|
107
|
+
a,
|
|
108
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
109
|
+
f
|
|
110
|
+
), r(s);
|
|
355
111
|
}
|
|
356
112
|
}
|
|
357
|
-
function
|
|
113
|
+
function l(s) {
|
|
114
|
+
if (s === i) return "<>";
|
|
115
|
+
if (typeof s == "object" && s !== null && s.$$typeof === w)
|
|
116
|
+
return "<...>";
|
|
358
117
|
try {
|
|
359
|
-
|
|
118
|
+
var a = t(s);
|
|
119
|
+
return a ? "<" + a + ">" : "<...>";
|
|
360
120
|
} catch {
|
|
361
|
-
return
|
|
121
|
+
return "<...>";
|
|
362
122
|
}
|
|
363
123
|
}
|
|
364
|
-
function
|
|
365
|
-
|
|
124
|
+
function c() {
|
|
125
|
+
var s = v.A;
|
|
126
|
+
return s === null ? null : s.getOwner();
|
|
366
127
|
}
|
|
367
|
-
function
|
|
368
|
-
|
|
369
|
-
return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", xt(t)), Ie(t);
|
|
128
|
+
function h() {
|
|
129
|
+
return Error("react-stack-top-frame");
|
|
370
130
|
}
|
|
371
|
-
|
|
372
|
-
key
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
__source: !0
|
|
376
|
-
}, Be, Ye;
|
|
377
|
-
function ut(t) {
|
|
378
|
-
if (fe.call(t, "ref")) {
|
|
379
|
-
var s = Object.getOwnPropertyDescriptor(t, "ref").get;
|
|
380
|
-
if (s && s.isReactWarning)
|
|
381
|
-
return !1;
|
|
131
|
+
function x(s) {
|
|
132
|
+
if (C.call(s, "key")) {
|
|
133
|
+
var a = Object.getOwnPropertyDescriptor(s, "key").get;
|
|
134
|
+
if (a && a.isReactWarning) return !1;
|
|
382
135
|
}
|
|
383
|
-
return
|
|
136
|
+
return s.key !== void 0;
|
|
384
137
|
}
|
|
385
|
-
function
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
138
|
+
function m(s, a) {
|
|
139
|
+
function o() {
|
|
140
|
+
b || (b = !0, console.error(
|
|
141
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
142
|
+
a
|
|
143
|
+
));
|
|
390
144
|
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
145
|
+
o.isReactWarning = !0, Object.defineProperty(s, "key", {
|
|
146
|
+
get: o,
|
|
147
|
+
configurable: !0
|
|
148
|
+
});
|
|
395
149
|
}
|
|
396
|
-
function
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
u.isReactWarning = !0, Object.defineProperty(t, "key", {
|
|
402
|
-
get: u,
|
|
403
|
-
configurable: !0
|
|
404
|
-
});
|
|
405
|
-
}
|
|
150
|
+
function p() {
|
|
151
|
+
var s = t(this.type);
|
|
152
|
+
return $[s] || ($[s] = !0, console.error(
|
|
153
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
154
|
+
)), s = this.props.ref, s !== void 0 ? s : null;
|
|
406
155
|
}
|
|
407
|
-
function
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
var P = {
|
|
420
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
421
|
-
$$typeof: a,
|
|
422
|
-
// Built-in properties that belong on the element
|
|
423
|
-
type: t,
|
|
424
|
-
key: s,
|
|
425
|
-
ref: u,
|
|
426
|
-
props: F,
|
|
427
|
-
// Record the component responsible for creating this element.
|
|
428
|
-
_owner: U
|
|
429
|
-
};
|
|
430
|
-
return P._store = {}, Object.defineProperty(P._store, "validated", {
|
|
156
|
+
function N(s, a, o, f, k, P) {
|
|
157
|
+
var L = o.ref;
|
|
158
|
+
return s = {
|
|
159
|
+
$$typeof: M,
|
|
160
|
+
type: s,
|
|
161
|
+
key: a,
|
|
162
|
+
props: o,
|
|
163
|
+
_owner: f
|
|
164
|
+
}, (L !== void 0 ? L : null) !== null ? Object.defineProperty(s, "ref", {
|
|
165
|
+
enumerable: !1,
|
|
166
|
+
get: p
|
|
167
|
+
}) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
|
|
431
168
|
configurable: !1,
|
|
432
169
|
enumerable: !1,
|
|
433
170
|
writable: !0,
|
|
434
|
-
value:
|
|
435
|
-
}), Object.defineProperty(
|
|
171
|
+
value: 0
|
|
172
|
+
}), Object.defineProperty(s, "_debugInfo", {
|
|
436
173
|
configurable: !1,
|
|
437
174
|
enumerable: !1,
|
|
438
|
-
writable: !
|
|
439
|
-
value:
|
|
440
|
-
}), Object.defineProperty(
|
|
175
|
+
writable: !0,
|
|
176
|
+
value: null
|
|
177
|
+
}), Object.defineProperty(s, "_debugStack", {
|
|
441
178
|
configurable: !1,
|
|
442
179
|
enumerable: !1,
|
|
443
|
-
writable: !
|
|
444
|
-
value:
|
|
445
|
-
}), Object.
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
for (U in s)
|
|
452
|
-
fe.call(s, U) && !ht.hasOwnProperty(U) && (F[U] = s[U]);
|
|
453
|
-
if (t && t.defaultProps) {
|
|
454
|
-
var J = t.defaultProps;
|
|
455
|
-
for (U in J)
|
|
456
|
-
F[U] === void 0 && (F[U] = J[U]);
|
|
457
|
-
}
|
|
458
|
-
if (P || ae) {
|
|
459
|
-
var X = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
|
|
460
|
-
P && ft(F, X), ae && gt(F, X);
|
|
461
|
-
}
|
|
462
|
-
return pt(t, P, ae, B, N, We.current, F);
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
var Re = i.ReactCurrentOwner, He = i.ReactDebugCurrentFrame;
|
|
466
|
-
function ue(t) {
|
|
467
|
-
if (t) {
|
|
468
|
-
var s = t._owner, u = ye(t.type, t._source, s ? s.type : null);
|
|
469
|
-
He.setExtraStackFrame(u);
|
|
470
|
-
} else
|
|
471
|
-
He.setExtraStackFrame(null);
|
|
472
|
-
}
|
|
473
|
-
var _e;
|
|
474
|
-
_e = !1;
|
|
475
|
-
function Le(t) {
|
|
476
|
-
return typeof t == "object" && t !== null && t.$$typeof === a;
|
|
477
|
-
}
|
|
478
|
-
function Ue() {
|
|
479
|
-
{
|
|
480
|
-
if (Re.current) {
|
|
481
|
-
var t = S(Re.current.type);
|
|
482
|
-
if (t)
|
|
483
|
-
return `
|
|
484
|
-
|
|
485
|
-
Check the render method of \`` + t + "`.";
|
|
486
|
-
}
|
|
487
|
-
return "";
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
function wt(t) {
|
|
491
|
-
return "";
|
|
492
|
-
}
|
|
493
|
-
var qe = {};
|
|
494
|
-
function jt(t) {
|
|
495
|
-
{
|
|
496
|
-
var s = Ue();
|
|
497
|
-
if (!s) {
|
|
498
|
-
var u = typeof t == "string" ? t : t.displayName || t.name;
|
|
499
|
-
u && (s = `
|
|
500
|
-
|
|
501
|
-
Check the top-level render call using <` + u + ">.");
|
|
502
|
-
}
|
|
503
|
-
return s;
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
function Ke(t, s) {
|
|
507
|
-
{
|
|
508
|
-
if (!t._store || t._store.validated || t.key != null)
|
|
509
|
-
return;
|
|
510
|
-
t._store.validated = !0;
|
|
511
|
-
var u = jt(s);
|
|
512
|
-
if (qe[u])
|
|
513
|
-
return;
|
|
514
|
-
qe[u] = !0;
|
|
515
|
-
var N = "";
|
|
516
|
-
t && t._owner && t._owner !== Re.current && (N = " It was passed a child from " + S(t._owner.type) + "."), ue(t), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', u, N), ue(null);
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
function Ge(t, s) {
|
|
520
|
-
{
|
|
521
|
-
if (typeof t != "object")
|
|
522
|
-
return;
|
|
523
|
-
if ($e(t))
|
|
524
|
-
for (var u = 0; u < t.length; u++) {
|
|
525
|
-
var N = t[u];
|
|
526
|
-
Le(N) && Ke(N, s);
|
|
527
|
-
}
|
|
528
|
-
else if (Le(t))
|
|
529
|
-
t._store && (t._store.validated = !0);
|
|
530
|
-
else if (t) {
|
|
531
|
-
var B = O(t);
|
|
532
|
-
if (typeof B == "function" && B !== t.entries)
|
|
533
|
-
for (var U = B.call(t), F; !(F = U.next()).done; )
|
|
534
|
-
Le(F.value) && Ke(F.value, s);
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
function yt(t) {
|
|
539
|
-
{
|
|
540
|
-
var s = t.type;
|
|
541
|
-
if (s == null || typeof s == "string")
|
|
542
|
-
return;
|
|
543
|
-
var u;
|
|
544
|
-
if (typeof s == "function")
|
|
545
|
-
u = s.propTypes;
|
|
546
|
-
else if (typeof s == "object" && (s.$$typeof === k || // Note: Memo only checks outer props here.
|
|
547
|
-
// Inner props are checked in the reconciler.
|
|
548
|
-
s.$$typeof === y))
|
|
549
|
-
u = s.propTypes;
|
|
550
|
-
else
|
|
551
|
-
return;
|
|
552
|
-
if (u) {
|
|
553
|
-
var N = S(s);
|
|
554
|
-
dt(u, t.props, "prop", N, t);
|
|
555
|
-
} else if (s.PropTypes !== void 0 && !_e) {
|
|
556
|
-
_e = !0;
|
|
557
|
-
var B = S(s);
|
|
558
|
-
E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", B || "Unknown");
|
|
559
|
-
}
|
|
560
|
-
typeof s.getDefaultProps == "function" && !s.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
function Nt(t) {
|
|
564
|
-
{
|
|
565
|
-
for (var s = Object.keys(t.props), u = 0; u < s.length; u++) {
|
|
566
|
-
var N = s[u];
|
|
567
|
-
if (N !== "children" && N !== "key") {
|
|
568
|
-
ue(t), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", N), ue(null);
|
|
569
|
-
break;
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
t.ref !== null && (ue(t), E("Invalid attribute `ref` supplied to `React.Fragment`."), ue(null));
|
|
573
|
-
}
|
|
180
|
+
writable: !0,
|
|
181
|
+
value: k
|
|
182
|
+
}), Object.defineProperty(s, "_debugTask", {
|
|
183
|
+
configurable: !1,
|
|
184
|
+
enumerable: !1,
|
|
185
|
+
writable: !0,
|
|
186
|
+
value: P
|
|
187
|
+
}), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
|
|
574
188
|
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
for (var be = 0; be < ie.length; be++)
|
|
596
|
-
Ge(ie[be], t);
|
|
597
|
-
Object.freeze && Object.freeze(ie);
|
|
598
|
-
} else
|
|
599
|
-
E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
600
|
-
else
|
|
601
|
-
Ge(ie, t);
|
|
602
|
-
}
|
|
603
|
-
if (fe.call(s, "key")) {
|
|
604
|
-
var me = S(t), se = Object.keys(s).filter(function(_t) {
|
|
605
|
-
return _t !== "key";
|
|
606
|
-
}), Oe = se.length > 0 ? "{key: someKey, " + se.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
607
|
-
if (!Je[me + Oe]) {
|
|
608
|
-
var Rt = se.length > 0 ? "{" + se.join(": ..., ") + ": ...}" : "{}";
|
|
609
|
-
E(`A props object containing a "key" prop is being spread into JSX:
|
|
189
|
+
function S(s, a, o, f, k, P) {
|
|
190
|
+
var L = a.children;
|
|
191
|
+
if (L !== void 0)
|
|
192
|
+
if (f)
|
|
193
|
+
if (A(L)) {
|
|
194
|
+
for (f = 0; f < L.length; f++)
|
|
195
|
+
R(L[f]);
|
|
196
|
+
Object.freeze && Object.freeze(L);
|
|
197
|
+
} else
|
|
198
|
+
console.error(
|
|
199
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
200
|
+
);
|
|
201
|
+
else R(L);
|
|
202
|
+
if (C.call(a, "key")) {
|
|
203
|
+
L = t(s);
|
|
204
|
+
var q = Object.keys(a).filter(function(Q) {
|
|
205
|
+
return Q !== "key";
|
|
206
|
+
});
|
|
207
|
+
f = 0 < q.length ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}", G[L + f] || (q = 0 < q.length ? "{" + q.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
208
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
610
209
|
let props = %s;
|
|
611
210
|
<%s {...props} />
|
|
612
211
|
React keys must be passed directly to JSX without using spread:
|
|
613
212
|
let props = %s;
|
|
614
|
-
<%s key={someKey} {...props} />`,
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
213
|
+
<%s key={someKey} {...props} />`,
|
|
214
|
+
f,
|
|
215
|
+
L,
|
|
216
|
+
q,
|
|
217
|
+
L
|
|
218
|
+
), G[L + f] = !0);
|
|
618
219
|
}
|
|
220
|
+
if (L = null, o !== void 0 && (n(o), L = "" + o), x(a) && (n(a.key), L = "" + a.key), "key" in a) {
|
|
221
|
+
o = {};
|
|
222
|
+
for (var u in a)
|
|
223
|
+
u !== "key" && (o[u] = a[u]);
|
|
224
|
+
} else o = a;
|
|
225
|
+
return L && m(
|
|
226
|
+
o,
|
|
227
|
+
typeof s == "function" ? s.displayName || s.name || "Unknown" : s
|
|
228
|
+
), N(
|
|
229
|
+
s,
|
|
230
|
+
L,
|
|
231
|
+
o,
|
|
232
|
+
c(),
|
|
233
|
+
k,
|
|
234
|
+
P
|
|
235
|
+
);
|
|
619
236
|
}
|
|
620
|
-
function
|
|
621
|
-
|
|
237
|
+
function R(s) {
|
|
238
|
+
y(s) ? s._store && (s._store.validated = 1) : typeof s == "object" && s !== null && s.$$typeof === w && (s._payload.status === "fulfilled" ? y(s._payload.value) && s._payload.value._store && (s._payload.value._store.validated = 1) : s._store && (s._store.validated = 1));
|
|
622
239
|
}
|
|
623
|
-
function
|
|
624
|
-
return
|
|
240
|
+
function y(s) {
|
|
241
|
+
return typeof s == "object" && s !== null && s.$$typeof === M;
|
|
625
242
|
}
|
|
626
|
-
var
|
|
627
|
-
|
|
628
|
-
|
|
243
|
+
var E = ve, M = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), j = Symbol.for("react.strict_mode"), D = Symbol.for("react.profiler"), T = Symbol.for("react.consumer"), V = Symbol.for("react.context"), I = Symbol.for("react.forward_ref"), Y = Symbol.for("react.suspense"), U = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), W = Symbol.for("react.activity"), d = Symbol.for("react.client.reference"), v = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, C = Object.prototype.hasOwnProperty, A = Array.isArray, O = console.createTask ? console.createTask : function() {
|
|
244
|
+
return null;
|
|
245
|
+
};
|
|
246
|
+
E = {
|
|
247
|
+
react_stack_bottom_frame: function(s) {
|
|
248
|
+
return s();
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
var b, $ = {}, F = E.react_stack_bottom_frame.bind(
|
|
252
|
+
E,
|
|
253
|
+
h
|
|
254
|
+
)(), H = O(l(h)), G = {};
|
|
255
|
+
te.Fragment = i, te.jsx = function(s, a, o) {
|
|
256
|
+
var f = 1e4 > v.recentlyCreatedOwnerStacks++;
|
|
257
|
+
return S(
|
|
258
|
+
s,
|
|
259
|
+
a,
|
|
260
|
+
o,
|
|
261
|
+
!1,
|
|
262
|
+
f ? Error("react-stack-top-frame") : F,
|
|
263
|
+
f ? O(l(s)) : H
|
|
264
|
+
);
|
|
265
|
+
}, te.jsxs = function(s, a, o) {
|
|
266
|
+
var f = 1e4 > v.recentlyCreatedOwnerStacks++;
|
|
267
|
+
return S(
|
|
268
|
+
s,
|
|
269
|
+
a,
|
|
270
|
+
o,
|
|
271
|
+
!0,
|
|
272
|
+
f ? Error("react-stack-top-frame") : F,
|
|
273
|
+
f ? O(l(s)) : H
|
|
274
|
+
);
|
|
275
|
+
};
|
|
276
|
+
}()), te;
|
|
629
277
|
}
|
|
630
|
-
process.env.NODE_ENV === "production" ?
|
|
631
|
-
var e =
|
|
632
|
-
function
|
|
633
|
-
const
|
|
278
|
+
process.env.NODE_ENV === "production" ? ce.exports = Te() : ce.exports = Oe();
|
|
279
|
+
var e = ce.exports;
|
|
280
|
+
function Be({ text: t, link: r, linkText: n, year: l, navigationItems: c = [] }) {
|
|
281
|
+
const h = ze(), x = xe(), m = [
|
|
634
282
|
{
|
|
635
|
-
icon:
|
|
283
|
+
icon: Ne,
|
|
636
284
|
label: "Dashboard",
|
|
637
285
|
path: "/dashboard",
|
|
638
286
|
key: "dashboard"
|
|
639
287
|
},
|
|
640
288
|
{
|
|
641
|
-
icon:
|
|
289
|
+
icon: ye,
|
|
642
290
|
label: "Calendar",
|
|
643
291
|
path: "/calendar",
|
|
644
292
|
key: "calendar"
|
|
645
293
|
},
|
|
646
294
|
{
|
|
647
|
-
icon:
|
|
295
|
+
icon: Ee,
|
|
648
296
|
label: "Admins",
|
|
649
297
|
path: "/admins",
|
|
650
298
|
key: "admins"
|
|
651
299
|
},
|
|
652
300
|
{
|
|
653
|
-
icon:
|
|
301
|
+
icon: Ce,
|
|
654
302
|
label: "Settings",
|
|
655
303
|
path: "/settings",
|
|
656
304
|
key: "settings"
|
|
657
305
|
}
|
|
658
|
-
],
|
|
306
|
+
], p = c.length > 0 ? c : m, N = (S) => x.pathname === S;
|
|
659
307
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
660
308
|
/* @__PURE__ */ e.jsxs("footer", { className: "hidden md:block relative overflow-hidden border-t transition-all duration-300 bg-gradient-to-r from-white via-violet-50/30 to-white border-slate-200/50 dark:bg-gradient-to-r dark:from-slate-800 dark:via-slate-900 dark:to-slate-800 dark:border-slate-700/50 shadow-sm", children: [
|
|
661
309
|
/* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 w-full h-full opacity-5 bg-gradient-to-r from-violet-300 to-indigo-300 dark:bg-gradient-to-r dark:from-violet-500 dark:to-indigo-500" }),
|
|
@@ -681,16 +329,16 @@ function Zt({ text: r, link: a, linkText: o, year: n, navigationItems: h = [] })
|
|
|
681
329
|
) }),
|
|
682
330
|
/* @__PURE__ */ e.jsxs("span", { className: "text-sm text-slate-600 dark:text-slate-400", children: [
|
|
683
331
|
"© ",
|
|
684
|
-
|
|
332
|
+
l || (/* @__PURE__ */ new Date()).getFullYear()
|
|
685
333
|
] }),
|
|
686
334
|
/* @__PURE__ */ e.jsx(
|
|
687
335
|
"a",
|
|
688
336
|
{
|
|
689
|
-
href:
|
|
337
|
+
href: r || "#",
|
|
690
338
|
target: "_blank",
|
|
691
339
|
rel: "noopener noreferrer",
|
|
692
340
|
className: "text-sm font-medium transition-all duration-200 hover:scale-105 inline-block text-violet-600 hover:text-violet-700 dark:text-violet-400 dark:hover:text-violet-300",
|
|
693
|
-
children:
|
|
341
|
+
children: t || n || "Footer Text"
|
|
694
342
|
}
|
|
695
343
|
)
|
|
696
344
|
] }),
|
|
@@ -713,7 +361,7 @@ function Zt({ text: r, link: a, linkText: o, year: n, navigationItems: h = [] })
|
|
|
713
361
|
),
|
|
714
362
|
/* @__PURE__ */ e.jsxs("span", { className: "text-xs text-slate-500 dark:text-slate-500", children: [
|
|
715
363
|
"Made with ",
|
|
716
|
-
/* @__PURE__ */ e.jsx(
|
|
364
|
+
/* @__PURE__ */ e.jsx(je, { className: "w-3 h-3 inline text-red-500 fill-red-500" })
|
|
717
365
|
] })
|
|
718
366
|
] })
|
|
719
367
|
] }) })
|
|
@@ -721,30 +369,30 @@ function Zt({ text: r, link: a, linkText: o, year: n, navigationItems: h = [] })
|
|
|
721
369
|
/* @__PURE__ */ e.jsx("nav", { className: "md:hidden fixed bottom-0 left-0 right-0 z-50 safe-area-bottom", children: /* @__PURE__ */ e.jsxs("div", { className: "relative backdrop-blur-2xl bg-white/90 dark:bg-slate-900/95 border-t border-slate-200/50 dark:border-slate-700/50 shadow-2xl", children: [
|
|
722
370
|
/* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-violet-50/30 to-transparent dark:from-violet-950/20 dark:to-transparent pointer-events-none" }),
|
|
723
371
|
/* @__PURE__ */ e.jsx("div", { className: "absolute top-0 left-0 right-0 h-0.5 bg-gradient-to-r from-transparent via-violet-500 to-transparent opacity-50" }),
|
|
724
|
-
/* @__PURE__ */ e.jsx("div", { className: "relative grid grid-cols-4 gap-1 px-2 py-2 pb-safe", children:
|
|
725
|
-
const
|
|
372
|
+
/* @__PURE__ */ e.jsx("div", { className: "relative grid grid-cols-4 gap-1 px-2 py-2 pb-safe", children: p.map((S, R) => {
|
|
373
|
+
const y = S.icon, E = N(S.path);
|
|
726
374
|
return /* @__PURE__ */ e.jsxs(
|
|
727
375
|
"button",
|
|
728
376
|
{
|
|
729
|
-
onClick: () =>
|
|
730
|
-
className: `relative flex flex-col items-center justify-center py-2 px-1 rounded-2xl transition-all duration-300 group ${
|
|
377
|
+
onClick: () => h(S.path),
|
|
378
|
+
className: `relative flex flex-col items-center justify-center py-2 px-1 rounded-2xl transition-all duration-300 group ${E ? "bg-gradient-to-br from-violet-500 to-indigo-600 shadow-lg shadow-violet-500/30" : "hover:bg-slate-100 dark:hover:bg-slate-800/50 active:scale-95"}`,
|
|
731
379
|
children: [
|
|
732
|
-
|
|
733
|
-
/* @__PURE__ */ e.jsxs("div", { className: `relative mb-1 transition-transform duration-300 ${
|
|
380
|
+
E && /* @__PURE__ */ e.jsx("div", { className: "absolute -top-1 left-1/2 -translate-x-1/2 w-1 h-1 rounded-full bg-white shadow-lg shadow-white/50 animate-pulse" }),
|
|
381
|
+
/* @__PURE__ */ e.jsxs("div", { className: `relative mb-1 transition-transform duration-300 ${E ? "scale-110" : "group-hover:scale-110"}`, children: [
|
|
734
382
|
/* @__PURE__ */ e.jsx(
|
|
735
|
-
|
|
383
|
+
y,
|
|
736
384
|
{
|
|
737
|
-
className: `w-6 h-6 transition-colors duration-300 ${
|
|
738
|
-
strokeWidth:
|
|
385
|
+
className: `w-6 h-6 transition-colors duration-300 ${E ? "text-white" : "text-slate-600 dark:text-slate-400 group-hover:text-violet-600 dark:group-hover:text-violet-400"}`,
|
|
386
|
+
strokeWidth: E ? 2.5 : 2
|
|
739
387
|
}
|
|
740
388
|
),
|
|
741
|
-
|
|
389
|
+
E && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 rounded-full bg-white/20 animate-ping" })
|
|
742
390
|
] }),
|
|
743
|
-
/* @__PURE__ */ e.jsx("span", { className: `text-xs font-semibold transition-all duration-300 ${
|
|
744
|
-
|
|
391
|
+
/* @__PURE__ */ e.jsx("span", { className: `text-xs font-semibold transition-all duration-300 ${E ? "text-white scale-105" : "text-slate-600 dark:text-slate-400 group-hover:text-violet-600 dark:group-hover:text-violet-400"}`, children: S.label }),
|
|
392
|
+
S.badge && /* @__PURE__ */ e.jsx("div", { className: "absolute top-1 right-2 w-2 h-2 rounded-full bg-red-500 border-2 border-white dark:border-slate-900 animate-pulse" })
|
|
745
393
|
]
|
|
746
394
|
},
|
|
747
|
-
|
|
395
|
+
S.key || R
|
|
748
396
|
);
|
|
749
397
|
}) }),
|
|
750
398
|
/* @__PURE__ */ e.jsx("div", { className: "h-safe-area-inset-bottom bg-white/50 dark:bg-slate-900/50" })
|
|
@@ -762,27 +410,27 @@ function Zt({ text: r, link: a, linkText: o, year: n, navigationItems: h = [] })
|
|
|
762
410
|
` })
|
|
763
411
|
] });
|
|
764
412
|
}
|
|
765
|
-
const
|
|
766
|
-
const [
|
|
767
|
-
return
|
|
768
|
-
const
|
|
769
|
-
|
|
413
|
+
const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
414
|
+
const [l, c] = z(!1), [h, x] = z({ top: 0, right: 0 }), m = K(null), p = K(null);
|
|
415
|
+
return J(() => {
|
|
416
|
+
const N = (S) => {
|
|
417
|
+
m.current && !m.current.contains(S.target) && p.current && !p.current.contains(S.target) && c(!1);
|
|
770
418
|
};
|
|
771
|
-
return
|
|
772
|
-
}, [
|
|
419
|
+
return l && document.addEventListener("mousedown", N), () => document.removeEventListener("mousedown", N);
|
|
420
|
+
}, [l]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
773
421
|
/* @__PURE__ */ e.jsxs(
|
|
774
422
|
"button",
|
|
775
423
|
{
|
|
776
|
-
ref:
|
|
424
|
+
ref: m,
|
|
777
425
|
onClick: () => {
|
|
778
|
-
if (!
|
|
779
|
-
const
|
|
780
|
-
|
|
781
|
-
top:
|
|
782
|
-
right: window.innerWidth -
|
|
426
|
+
if (!l && m.current) {
|
|
427
|
+
const N = m.current.getBoundingClientRect();
|
|
428
|
+
x({
|
|
429
|
+
top: N.bottom + 6,
|
|
430
|
+
right: window.innerWidth - N.right
|
|
783
431
|
});
|
|
784
432
|
}
|
|
785
|
-
|
|
433
|
+
c(!l);
|
|
786
434
|
},
|
|
787
435
|
title: "Account",
|
|
788
436
|
className: `p-2 sm:p-2.5 rounded-xl transition-all duration-200
|
|
@@ -792,43 +440,43 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
792
440
|
hover:scale-105 active:scale-95
|
|
793
441
|
flex items-center gap-1`,
|
|
794
442
|
children: [
|
|
795
|
-
/* @__PURE__ */ e.jsx(
|
|
443
|
+
/* @__PURE__ */ e.jsx(pe, { className: "w-[18px] h-[18px]" }),
|
|
796
444
|
/* @__PURE__ */ e.jsx(
|
|
797
|
-
|
|
445
|
+
ae,
|
|
798
446
|
{
|
|
799
|
-
className: `w-3 h-3 text-slate-400 transition-transform duration-200 ${
|
|
447
|
+
className: `w-3 h-3 text-slate-400 transition-transform duration-200 ${l ? "rotate-180" : ""}`
|
|
800
448
|
}
|
|
801
449
|
)
|
|
802
450
|
]
|
|
803
451
|
}
|
|
804
452
|
),
|
|
805
|
-
|
|
453
|
+
l && de(
|
|
806
454
|
/* @__PURE__ */ e.jsxs(
|
|
807
455
|
"div",
|
|
808
456
|
{
|
|
809
|
-
ref:
|
|
810
|
-
style: { top:
|
|
457
|
+
ref: p,
|
|
458
|
+
style: { top: h.top, right: h.right },
|
|
811
459
|
className: `fixed w-48 rounded-xl border shadow-lg overflow-hidden z-[9999]
|
|
812
460
|
bg-white border-slate-200/60
|
|
813
461
|
dark:bg-slate-800 dark:border-slate-700/60
|
|
814
462
|
animate-in fade-in zoom-in-95 duration-150`,
|
|
815
463
|
children: [
|
|
816
|
-
((
|
|
817
|
-
(
|
|
818
|
-
|
|
464
|
+
((t == null ? void 0 : t.name) || (t == null ? void 0 : t.email)) && /* @__PURE__ */ e.jsxs("div", { className: "px-3.5 py-3 border-b border-slate-100 dark:border-slate-700", children: [
|
|
465
|
+
(t == null ? void 0 : t.name) && /* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-slate-800 dark:text-slate-200 truncate", children: t.name }),
|
|
466
|
+
n && (t == null ? void 0 : t.email) && /* @__PURE__ */ e.jsx("p", { className: "text-xs font-medium text-slate-500 dark:text-slate-400 truncate mt-0.5", children: t.email })
|
|
819
467
|
] }),
|
|
820
468
|
/* @__PURE__ */ e.jsxs(
|
|
821
469
|
"button",
|
|
822
470
|
{
|
|
823
471
|
onClick: () => {
|
|
824
|
-
|
|
472
|
+
c(!1), r();
|
|
825
473
|
},
|
|
826
474
|
className: `w-full flex items-center gap-2 px-3.5 py-2.5
|
|
827
475
|
text-sm font-medium text-red-600 dark:text-red-400
|
|
828
476
|
hover:bg-red-50 dark:hover:bg-red-900/20
|
|
829
477
|
transition-colors duration-150`,
|
|
830
478
|
children: [
|
|
831
|
-
/* @__PURE__ */ e.jsx(
|
|
479
|
+
/* @__PURE__ */ e.jsx(fe, { className: "w-4 h-4 flex-shrink-0" }),
|
|
832
480
|
"Logout"
|
|
833
481
|
]
|
|
834
482
|
}
|
|
@@ -839,61 +487,61 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
839
487
|
document.body
|
|
840
488
|
)
|
|
841
489
|
] });
|
|
842
|
-
},
|
|
843
|
-
appIcon:
|
|
844
|
-
appName:
|
|
845
|
-
appShortName:
|
|
846
|
-
appTagline:
|
|
847
|
-
userName:
|
|
490
|
+
}, He = ({
|
|
491
|
+
appIcon: t,
|
|
492
|
+
appName: r,
|
|
493
|
+
appShortName: n,
|
|
494
|
+
appTagline: l,
|
|
495
|
+
userName: c,
|
|
848
496
|
// <-- Taken from props!
|
|
849
|
-
userEmail:
|
|
497
|
+
userEmail: h,
|
|
850
498
|
// <-- Taken from props!
|
|
851
|
-
userRole:
|
|
852
|
-
onLogout:
|
|
499
|
+
userRole: x,
|
|
500
|
+
onLogout: m,
|
|
853
501
|
// <-- Added onLogout prop!
|
|
854
|
-
navLinks:
|
|
855
|
-
showAccessibility:
|
|
856
|
-
showUserInfo:
|
|
857
|
-
showLanguageSelector:
|
|
858
|
-
showThemeToggle:
|
|
859
|
-
showAppIcon:
|
|
860
|
-
showAppFullName:
|
|
861
|
-
showAppTagline:
|
|
862
|
-
showNavLinks:
|
|
863
|
-
rightContent:
|
|
502
|
+
navLinks: p = [],
|
|
503
|
+
showAccessibility: N = !0,
|
|
504
|
+
showUserInfo: S = !0,
|
|
505
|
+
showLanguageSelector: R = !0,
|
|
506
|
+
showThemeToggle: y = !0,
|
|
507
|
+
showAppIcon: E = !0,
|
|
508
|
+
showAppFullName: M = !0,
|
|
509
|
+
showAppTagline: g = !1,
|
|
510
|
+
showNavLinks: i = !1,
|
|
511
|
+
rightContent: j
|
|
864
512
|
}) => {
|
|
865
|
-
var
|
|
866
|
-
const
|
|
513
|
+
var q;
|
|
514
|
+
const D = xe(), [T, V] = z(
|
|
867
515
|
localStorage.getItem("language") || "eng"
|
|
868
|
-
), [
|
|
869
|
-
|
|
870
|
-
const
|
|
871
|
-
|
|
872
|
-
}, []),
|
|
873
|
-
const
|
|
874
|
-
return window.addEventListener("scroll",
|
|
875
|
-
}, []),
|
|
876
|
-
|
|
877
|
-
}, [
|
|
878
|
-
const
|
|
879
|
-
|
|
880
|
-
const
|
|
881
|
-
return
|
|
516
|
+
), [I, Y] = z(!1), [U, B] = z(!1), [w, W] = z(16), [d, v] = z(!1), [C, A] = z(!1), [O, b] = z(!1), [$, F] = z(!1), [H, G] = z(!1);
|
|
517
|
+
J(() => {
|
|
518
|
+
const u = localStorage.getItem("theme") || "light";
|
|
519
|
+
b(u === "dark"), document.documentElement.classList.toggle("dark", u === "dark");
|
|
520
|
+
}, []), J(() => {
|
|
521
|
+
const u = () => G(window.scrollY > 8);
|
|
522
|
+
return window.addEventListener("scroll", u, { passive: !0 }), () => window.removeEventListener("scroll", u);
|
|
523
|
+
}, []), J(() => {
|
|
524
|
+
F(!1);
|
|
525
|
+
}, [D.pathname]);
|
|
526
|
+
const s = () => {
|
|
527
|
+
b((u) => {
|
|
528
|
+
const Q = !u;
|
|
529
|
+
return Q ? (document.documentElement.classList.add("dark"), localStorage.setItem("theme", "dark")) : (document.documentElement.classList.remove("dark"), localStorage.setItem("theme", "light")), Q;
|
|
882
530
|
});
|
|
883
|
-
},
|
|
884
|
-
|
|
531
|
+
}, a = (u) => {
|
|
532
|
+
V(u), localStorage.setItem("language", u), B(!1);
|
|
885
533
|
};
|
|
886
|
-
|
|
887
|
-
document.documentElement.style.fontSize = `${
|
|
888
|
-
}, [
|
|
889
|
-
const
|
|
534
|
+
J(() => {
|
|
535
|
+
document.documentElement.style.fontSize = `${w}px`, document.body.style.filter = d ? "grayscale(100%)" : "none", document.body.style.fontFamily = C ? "OpenDyslexic, Arial, sans-serif" : "inherit";
|
|
536
|
+
}, [w, d, C]);
|
|
537
|
+
const o = {
|
|
890
538
|
eng: { label: "English", disabled: !1 },
|
|
891
539
|
hin: { label: "Hindi", disabled: !1 }
|
|
892
|
-
},
|
|
893
|
-
|
|
894
|
-
},
|
|
895
|
-
|
|
896
|
-
},
|
|
540
|
+
}, f = () => {
|
|
541
|
+
w < 24 && W(w + 2);
|
|
542
|
+
}, k = () => {
|
|
543
|
+
w > 12 && W(w - 2);
|
|
544
|
+
}, P = () => W(16), L = (u) => u === "/" ? D.pathname === "/" : D.pathname.startsWith(u);
|
|
897
545
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
898
546
|
/* @__PURE__ */ e.jsxs(
|
|
899
547
|
"nav",
|
|
@@ -903,7 +551,7 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
903
551
|
bg-white/95 dark:bg-slate-900/95 backdrop-blur-md
|
|
904
552
|
border-b border-slate-200/60 dark:border-slate-700/60
|
|
905
553
|
transition-all duration-300
|
|
906
|
-
${
|
|
554
|
+
${H ? "shadow-xl shadow-slate-200/50 dark:shadow-slate-950/50" : "shadow-sm shadow-slate-100/50 dark:shadow-slate-900/30"}
|
|
907
555
|
`,
|
|
908
556
|
children: [
|
|
909
557
|
/* @__PURE__ */ e.jsx("div", { className: "absolute top-0 right-0 w-96 h-96 rounded-full blur-3xl opacity-20 bg-violet-300 dark:bg-violet-500 -translate-y-1/2 translate-x-1/2 pointer-events-none" }),
|
|
@@ -911,257 +559,257 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
911
559
|
/* @__PURE__ */ e.jsxs("div", { className: "relative z-10 mx-auto px-3 sm:px-5 lg:px-6 py-2 sm:py-0", children: [
|
|
912
560
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between h-14 sm:h-20", children: [
|
|
913
561
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 sm:gap-4 group flex-shrink-0", children: [
|
|
914
|
-
|
|
562
|
+
E && t && /* @__PURE__ */ e.jsx("div", { className: "w-8 h-8 sm:w-16 sm:h-16 flex items-center justify-center group-hover:scale-105 transition-transform duration-200", children: /* @__PURE__ */ e.jsx(
|
|
915
563
|
"img",
|
|
916
564
|
{
|
|
917
|
-
src:
|
|
565
|
+
src: t,
|
|
918
566
|
alt: "Institution Logo",
|
|
919
567
|
className: "h-8 sm:h-14 w-auto object-contain"
|
|
920
568
|
}
|
|
921
569
|
) }),
|
|
922
570
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col leading-tight", children: [
|
|
923
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-extrabold text-base sm:text-xl text-slate-900 dark:text-white sm:hidden tracking-tight", children:
|
|
571
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-extrabold text-base sm:text-xl text-slate-900 dark:text-white sm:hidden tracking-tight", children: n || r }),
|
|
924
572
|
/* @__PURE__ */ e.jsxs("div", { className: "hidden sm:flex flex-col", children: [
|
|
925
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-extrabold text-slate-900 dark:text-white tracking-tight text-lg lg:hidden", children:
|
|
926
|
-
|
|
927
|
-
|
|
573
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-extrabold text-slate-900 dark:text-white tracking-tight text-lg lg:hidden", children: n || r }),
|
|
574
|
+
M && /* @__PURE__ */ e.jsx("span", { className: "font-extrabold text-slate-900 dark:text-white tracking-tight hidden lg:block text-[17px] xl:text-lg leading-tight max-w-md", children: r }),
|
|
575
|
+
g && l && /* @__PURE__ */ e.jsx("span", { className: "mt-0.5 text-[10px] font-semibold tracking-[0.2em] text-violet-600 dark:text-violet-400 uppercase", children: l })
|
|
928
576
|
] })
|
|
929
577
|
] })
|
|
930
578
|
] }),
|
|
931
|
-
|
|
932
|
-
var
|
|
933
|
-
return
|
|
579
|
+
i && p.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "hidden md:flex items-center gap-2", children: p.map((u) => {
|
|
580
|
+
var Z;
|
|
581
|
+
return u != null && u.to ? ((Z = u == null ? void 0 : u.to) == null ? void 0 : Z.startsWith("http")) ? /* @__PURE__ */ e.jsx(
|
|
934
582
|
"a",
|
|
935
583
|
{
|
|
936
|
-
href:
|
|
937
|
-
target:
|
|
584
|
+
href: u.to,
|
|
585
|
+
target: u.target || "_self",
|
|
938
586
|
rel: "noopener noreferrer",
|
|
939
587
|
className: "relative px-4 lg:px-5 py-2.5 rounded-xl text-sm font-semibold tracking-wide transition-all duration-200 text-slate-600 dark:text-slate-300 hover:text-violet-700 dark:hover:text-violet-400 hover:bg-violet-50/80 dark:hover:bg-slate-700/50",
|
|
940
|
-
children:
|
|
588
|
+
children: u.label
|
|
941
589
|
},
|
|
942
|
-
|
|
590
|
+
u.to
|
|
943
591
|
) : /* @__PURE__ */ e.jsxs(
|
|
944
|
-
|
|
592
|
+
ne,
|
|
945
593
|
{
|
|
946
|
-
to:
|
|
947
|
-
target:
|
|
948
|
-
rel:
|
|
949
|
-
className: `relative px-4 lg:px-5 py-2.5 rounded-xl text-sm font-semibold tracking-wide transition-all duration-200 ${
|
|
594
|
+
to: u.to,
|
|
595
|
+
target: u.target || "_self",
|
|
596
|
+
rel: u.target === "_blank" ? "noopener noreferrer" : void 0,
|
|
597
|
+
className: `relative px-4 lg:px-5 py-2.5 rounded-xl text-sm font-semibold tracking-wide transition-all duration-200 ${L(u.to) ? "text-violet-700 dark:text-violet-400 bg-violet-50 dark:bg-violet-600/10 shadow-sm" : "text-slate-600 dark:text-slate-300 hover:text-violet-700 dark:hover:text-violet-400 hover:bg-violet-50/80 dark:hover:bg-slate-700/50"}`,
|
|
950
598
|
children: [
|
|
951
|
-
|
|
952
|
-
|
|
599
|
+
u.label,
|
|
600
|
+
L(u.to) && /* @__PURE__ */ e.jsx("span", { className: "absolute bottom-1 left-1/2 -translate-x-1/2 w-4 h-0.5 rounded-full bg-gradient-to-r from-violet-600 to-indigo-600" })
|
|
953
601
|
]
|
|
954
602
|
},
|
|
955
|
-
|
|
603
|
+
u.to
|
|
956
604
|
) : null;
|
|
957
605
|
}) }),
|
|
958
606
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1.5 sm:gap-2", children: [
|
|
959
|
-
|
|
960
|
-
|
|
607
|
+
j && /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: j }),
|
|
608
|
+
N && /* @__PURE__ */ e.jsx(
|
|
961
609
|
"button",
|
|
962
610
|
{
|
|
963
|
-
onClick: () =>
|
|
611
|
+
onClick: () => Y(!0),
|
|
964
612
|
className: "p-2 sm:p-2.5 rounded-xl transition-all duration-200 bg-white hover:bg-slate-50 text-slate-700 border border-slate-200 shadow-sm dark:bg-slate-700/50 dark:hover:bg-slate-700 dark:text-slate-300 dark:border-slate-600/50 hover:scale-105 active:scale-95",
|
|
965
613
|
title: "Accessibility Settings",
|
|
966
614
|
children: /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4 sm:w-[18px] sm:h-[18px]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4" }) })
|
|
967
615
|
}
|
|
968
616
|
),
|
|
969
|
-
|
|
617
|
+
y && /* @__PURE__ */ e.jsx(
|
|
970
618
|
"button",
|
|
971
619
|
{
|
|
972
|
-
onClick:
|
|
620
|
+
onClick: s,
|
|
973
621
|
"aria-label": "Toggle theme",
|
|
974
|
-
title:
|
|
622
|
+
title: O ? "Switch to Light Mode" : "Switch to Dark Mode",
|
|
975
623
|
className: "p-2 sm:p-2.5 rounded-xl transition-all duration-200 bg-white hover:bg-slate-50 text-slate-700 border border-slate-200 shadow-sm dark:bg-slate-700/50 dark:hover:bg-slate-700 dark:text-yellow-400 dark:border-slate-600/50 hover:scale-105 active:scale-95",
|
|
976
|
-
children:
|
|
624
|
+
children: O ? /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4 sm:w-[18px] sm:h-[18px]", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", d: "M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z", clipRule: "evenodd" }) }) : /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4 sm:w-[18px] sm:h-[18px]", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx("path", { d: "M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z" }) })
|
|
977
625
|
}
|
|
978
626
|
),
|
|
979
|
-
|
|
627
|
+
R && /* @__PURE__ */ e.jsxs(
|
|
980
628
|
"button",
|
|
981
629
|
{
|
|
982
|
-
onClick: () =>
|
|
630
|
+
onClick: () => B(!0),
|
|
983
631
|
className: "hidden sm:flex items-center gap-2 px-4 py-2.5 rounded-xl bg-white hover:bg-slate-50 text-slate-700 border border-slate-200 shadow-sm dark:bg-slate-700/50 dark:hover:bg-slate-700 dark:text-slate-300 dark:border-slate-600/50 hover:scale-105 active:scale-95 transition-all duration-200",
|
|
984
632
|
children: [
|
|
985
633
|
/* @__PURE__ */ e.jsx("svg", { className: "w-[18px] h-[18px]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 2a10 10 0 100 20 10 10 0 000-20zm0 0c2.5 2.5 4 6 4 10s-1.5 7.5-4 10m0-20C9.5 4.5 8 8 8 12s1.5 7.5 4 10m-9-10h18" }) }),
|
|
986
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium", children: (
|
|
634
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium", children: (q = o[T]) == null ? void 0 : q.label })
|
|
987
635
|
]
|
|
988
636
|
}
|
|
989
637
|
),
|
|
990
|
-
|
|
638
|
+
R && /* @__PURE__ */ e.jsx(
|
|
991
639
|
"button",
|
|
992
640
|
{
|
|
993
|
-
onClick: () =>
|
|
641
|
+
onClick: () => B(!0),
|
|
994
642
|
className: "sm:hidden p-2 rounded-xl bg-white hover:bg-slate-50 text-slate-700 border border-slate-200 shadow-sm dark:bg-slate-700/50 dark:hover:bg-slate-700 dark:text-slate-300 dark:border-slate-600/50 hover:scale-105 active:scale-95 transition-all duration-200",
|
|
995
643
|
children: /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 2a10 10 0 100 20 10 10 0 000-20zm0 0c2.5 2.5 4 6 4 10s-1.5 7.5-4 10m0-20C9.5 4.5 8 8 8 12s1.5 7.5 4 10m-9-10h18" }) })
|
|
996
644
|
}
|
|
997
645
|
),
|
|
998
|
-
|
|
999
|
-
|
|
646
|
+
S && /* @__PURE__ */ e.jsx(
|
|
647
|
+
Ae,
|
|
1000
648
|
{
|
|
1001
|
-
user: { name:
|
|
1002
|
-
onLogout:
|
|
649
|
+
user: { name: c, email: h },
|
|
650
|
+
onLogout: m,
|
|
1003
651
|
showEmail: !0
|
|
1004
652
|
}
|
|
1005
653
|
),
|
|
1006
|
-
|
|
654
|
+
i && p.length > 0 && /* @__PURE__ */ e.jsx(
|
|
1007
655
|
"button",
|
|
1008
656
|
{
|
|
1009
|
-
onClick: () =>
|
|
1010
|
-
"aria-label":
|
|
657
|
+
onClick: () => F((u) => !u),
|
|
658
|
+
"aria-label": $ ? "Close menu" : "Open menu",
|
|
1011
659
|
className: "md:hidden p-2 rounded-xl transition-all duration-200 bg-white dark:bg-slate-700/50 border border-slate-200 dark:border-slate-600/50 text-slate-700 dark:text-slate-300 shadow-sm hover:scale-105 active:scale-95",
|
|
1012
|
-
children:
|
|
660
|
+
children: $ ? /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) : /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" }) })
|
|
1013
661
|
}
|
|
1014
662
|
)
|
|
1015
663
|
] })
|
|
1016
664
|
] }),
|
|
1017
|
-
|
|
1018
|
-
var
|
|
1019
|
-
return
|
|
665
|
+
i && $ && p.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "md:hidden border-t border-slate-200 dark:border-slate-700 pb-3 animate-in slide-in-from-top-2 duration-200", children: /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-0.5 pt-2", children: p.map((u) => {
|
|
666
|
+
var Z;
|
|
667
|
+
return u != null && u.to ? ((Z = u == null ? void 0 : u.to) == null ? void 0 : Z.startsWith("http")) ? /* @__PURE__ */ e.jsx(
|
|
1020
668
|
"a",
|
|
1021
669
|
{
|
|
1022
|
-
href:
|
|
1023
|
-
target:
|
|
670
|
+
href: u.to,
|
|
671
|
+
target: u.target || "_self",
|
|
1024
672
|
rel: "noopener noreferrer",
|
|
1025
673
|
className: "flex items-center justify-between px-3 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-700/50",
|
|
1026
|
-
children:
|
|
674
|
+
children: u.label
|
|
1027
675
|
},
|
|
1028
|
-
|
|
676
|
+
u.to
|
|
1029
677
|
) : /* @__PURE__ */ e.jsxs(
|
|
1030
|
-
|
|
678
|
+
ne,
|
|
1031
679
|
{
|
|
1032
|
-
to:
|
|
1033
|
-
target:
|
|
1034
|
-
rel:
|
|
1035
|
-
className: `flex items-center justify-between px-3 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200 ${
|
|
680
|
+
to: u.to,
|
|
681
|
+
target: u.target || "_self",
|
|
682
|
+
rel: u.target === "_blank" ? "noopener noreferrer" : void 0,
|
|
683
|
+
className: `flex items-center justify-between px-3 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200 ${L(u.to) ? "bg-violet-50 dark:bg-violet-600/10 text-violet-700 dark:text-violet-400" : "text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-700/50"}`,
|
|
1036
684
|
children: [
|
|
1037
|
-
|
|
1038
|
-
|
|
685
|
+
u.label,
|
|
686
|
+
L(u.to) && /* @__PURE__ */ e.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-gradient-to-r from-violet-600 to-indigo-600" })
|
|
1039
687
|
]
|
|
1040
688
|
},
|
|
1041
|
-
|
|
689
|
+
u.to
|
|
1042
690
|
) : null;
|
|
1043
691
|
}) }) })
|
|
1044
692
|
] })
|
|
1045
693
|
]
|
|
1046
694
|
}
|
|
1047
695
|
),
|
|
1048
|
-
|
|
696
|
+
I && /* Accessibility Modal (unchanged) */
|
|
1049
697
|
/* @__PURE__ */ e.jsx("div", { className: "overflow-hidden overflow-x-hidden fixed top-0 right-0 left-0 z-50 flex justify-center items-center w-full h-full bg-gray-800 bg-opacity-50", children: /* @__PURE__ */ e.jsx("div", { className: "relative p-4 w-full max-w-md", children: /* @__PURE__ */ e.jsxs("div", { className: "relative rounded-2xl shadow-2xl bg-white border border-slate-200 dark:bg-gradient-to-br dark:from-slate-800 dark:to-slate-900 dark:border dark:border-slate-700", children: [
|
|
1050
698
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between p-5 border-b rounded-t-2xl border-slate-200 dark:border-slate-700 bg-gradient-to-r from-slate-50 to-violet-50/30 dark:bg-gradient-to-r dark:from-slate-800 dark:to-slate-900", children: [
|
|
1051
699
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-3", children: [
|
|
1052
700
|
/* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-lg bg-gradient-to-br from-violet-600 to-indigo-600 flex items-center justify-center", children: /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5 text-white", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4" }) }) }),
|
|
1053
701
|
/* @__PURE__ */ e.jsx("h3", { className: "text-lg font-bold text-slate-900 dark:text-white", children: "Accessibility Settings" })
|
|
1054
702
|
] }),
|
|
1055
|
-
/* @__PURE__ */ e.jsx("button", { onClick: () =>
|
|
703
|
+
/* @__PURE__ */ e.jsx("button", { onClick: () => Y(!1), className: "p-2 rounded-lg transition-colors text-slate-400 hover:bg-slate-100 hover:text-slate-900 dark:hover:bg-slate-700 dark:hover:text-white", children: /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) })
|
|
1056
704
|
] }),
|
|
1057
705
|
/* @__PURE__ */ e.jsxs("div", { className: "p-6 space-y-6", children: [
|
|
1058
706
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
|
|
1059
707
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1060
708
|
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-semibold text-slate-700 dark:text-slate-300", children: "Font Size" }),
|
|
1061
709
|
/* @__PURE__ */ e.jsxs("span", { className: "text-sm font-medium px-3 py-1 rounded-lg bg-violet-100 text-violet-700 border border-violet-200 dark:bg-violet-600/20 dark:text-violet-400 dark:border dark:border-violet-500/30", children: [
|
|
1062
|
-
|
|
710
|
+
w,
|
|
1063
711
|
"px"
|
|
1064
712
|
] })
|
|
1065
713
|
] }),
|
|
1066
714
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
1067
|
-
/* @__PURE__ */ e.jsx("button", { onClick:
|
|
1068
|
-
/* @__PURE__ */ e.jsx("button", { onClick:
|
|
1069
|
-
/* @__PURE__ */ e.jsx("button", { onClick:
|
|
715
|
+
/* @__PURE__ */ e.jsx("button", { onClick: k, className: "flex-1 py-3 px-4 rounded-xl font-semibold transition-all duration-200 bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200 dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300 dark:border dark:border-slate-600", children: "A-" }),
|
|
716
|
+
/* @__PURE__ */ e.jsx("button", { onClick: P, className: "flex-1 py-3 px-4 rounded-xl font-semibold transition-all duration-200 bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200 dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300 dark:border dark:border-slate-600", children: "A" }),
|
|
717
|
+
/* @__PURE__ */ e.jsx("button", { onClick: f, className: "flex-1 py-3 px-4 rounded-xl font-semibold transition-all duration-200 bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200 dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300 dark:border dark:border-slate-600", children: "A+" })
|
|
1070
718
|
] })
|
|
1071
719
|
] }),
|
|
1072
720
|
/* @__PURE__ */ e.jsx("div", { className: "border-t border-slate-200 dark:border-slate-700" }),
|
|
1073
721
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
1074
722
|
/* @__PURE__ */ e.jsx("label", { className: "text-sm font-semibold text-slate-700 dark:text-slate-300", children: "Grayscale Mode" }),
|
|
1075
|
-
/* @__PURE__ */ e.jsx("button", { onClick: () =>
|
|
723
|
+
/* @__PURE__ */ e.jsx("button", { onClick: () => v(!d), className: `relative inline-flex h-7 w-12 items-center rounded-full transition-colors ${d ? "bg-gradient-to-r from-violet-600 to-indigo-600" : "bg-slate-300 dark:bg-slate-700"}`, children: /* @__PURE__ */ e.jsx("span", { className: `inline-block h-5 w-5 transform rounded-full bg-white shadow-lg transition-transform ${d ? "translate-x-6" : "translate-x-1"}` }) })
|
|
1076
724
|
] }),
|
|
1077
725
|
/* @__PURE__ */ e.jsx("div", { className: "border-t border-slate-200 dark:border-slate-700" }),
|
|
1078
726
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
1079
727
|
/* @__PURE__ */ e.jsx("label", { className: "text-sm font-semibold text-slate-700 dark:text-slate-300", children: "Dyslexia-Friendly Font" }),
|
|
1080
|
-
/* @__PURE__ */ e.jsx("button", { onClick: () =>
|
|
728
|
+
/* @__PURE__ */ e.jsx("button", { onClick: () => A(!C), className: `relative inline-flex h-7 w-12 items-center rounded-full transition-colors ${C ? "bg-gradient-to-r from-violet-600 to-indigo-600" : "bg-slate-300 dark:bg-slate-700"}`, children: /* @__PURE__ */ e.jsx("span", { className: `inline-block h-5 w-5 transform rounded-full bg-white shadow-lg transition-transform ${C ? "translate-x-6" : "translate-x-1"}` }) })
|
|
1081
729
|
] })
|
|
1082
730
|
] }),
|
|
1083
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex p-5 border-t rounded-b border-slate-200 dark:border-slate-700", children: /* @__PURE__ */ e.jsx("button", { onClick: () =>
|
|
731
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex p-5 border-t rounded-b border-slate-200 dark:border-slate-700", children: /* @__PURE__ */ e.jsx("button", { onClick: () => Y(!1), className: "w-full py-3 px-5 text-sm font-semibold text-white bg-gradient-to-r from-violet-600 to-indigo-600 hover:from-violet-700 hover:to-indigo-700 rounded-xl shadow-lg transition-all duration-200", children: "Close" }) })
|
|
1084
732
|
] }) }) }),
|
|
1085
|
-
|
|
733
|
+
U && /* Language Modal (unchanged) */
|
|
1086
734
|
/* @__PURE__ */ e.jsx("div", { className: "overflow-hidden overflow-x-hidden fixed top-0 right-0 left-0 z-50 flex justify-center items-center w-full h-full bg-gray-800 bg-opacity-50", children: /* @__PURE__ */ e.jsx("div", { className: "relative p-4 w-full max-w-md", children: /* @__PURE__ */ e.jsxs("div", { className: "relative rounded-2xl shadow-2xl bg-white border border-slate-200 dark:bg-gradient-to-br dark:from-slate-800 dark:to-slate-900 dark:border dark:border-slate-700", children: [
|
|
1087
735
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between p-5 border-b rounded-t-2xl border-slate-200 dark:border-slate-700 bg-gradient-to-r from-slate-50 to-violet-50/30 dark:bg-gradient-to-r dark:from-slate-800 dark:to-slate-900", children: [
|
|
1088
736
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-3", children: [
|
|
1089
737
|
/* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-lg bg-gradient-to-br from-violet-600 to-indigo-600 flex items-center justify-center", children: /* @__PURE__ */ e.jsx("svg", { className: "w-[18px] h-[18px] text-white", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 2a10 10 0 100 20 10 10 0 000-20zm0 0c2.5 2.5 4 6 4 10s-1.5 7.5-4 10m0-20C9.5 4.5 8 8 8 12s1.5 7.5 4 10m-9-10h18" }) }) }),
|
|
1090
738
|
/* @__PURE__ */ e.jsx("h3", { className: "text-lg font-bold text-slate-900 dark:text-white", children: "Select Language" })
|
|
1091
739
|
] }),
|
|
1092
|
-
/* @__PURE__ */ e.jsx("button", { onClick: () =>
|
|
740
|
+
/* @__PURE__ */ e.jsx("button", { onClick: () => B(!1), className: "p-2 rounded-lg transition-colors text-slate-400 hover:bg-slate-100 hover:text-slate-900 dark:hover:bg-slate-700 dark:hover:text-white", children: /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) })
|
|
1093
741
|
] }),
|
|
1094
|
-
/* @__PURE__ */ e.jsx("div", { className: "p-5", children: /* @__PURE__ */ e.jsx("ul", { className: "space-y-3", children: Object.keys(
|
|
1095
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
1096
|
-
|
|
1097
|
-
] }) }) },
|
|
1098
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex p-5 border-t rounded-b border-slate-200 dark:border-slate-700", children: /* @__PURE__ */ e.jsx("button", { onClick: () =>
|
|
742
|
+
/* @__PURE__ */ e.jsx("div", { className: "p-5", children: /* @__PURE__ */ e.jsx("ul", { className: "space-y-3", children: Object.keys(o).map((u) => /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("button", { onClick: () => a(u), disabled: o[u].disabled, className: `w-full px-5 py-4 rounded-xl text-left font-semibold transition-all duration-200 ${u === T ? "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-lg" : "bg-slate-50 hover:bg-slate-100 text-slate-700 border border-slate-200 dark:bg-slate-700/50 dark:hover:bg-slate-700 dark:text-slate-300 dark:border dark:border-slate-600"} ${o[u].disabled ? "opacity-50 cursor-not-allowed" : "hover:scale-[1.02]"}`, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
743
|
+
/* @__PURE__ */ e.jsx("span", { children: o[u].label }),
|
|
744
|
+
u === T && /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) })
|
|
745
|
+
] }) }) }, u)) }) }),
|
|
746
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex p-5 border-t rounded-b border-slate-200 dark:border-slate-700", children: /* @__PURE__ */ e.jsx("button", { onClick: () => B(!1), className: "w-full py-3 px-5 text-sm font-semibold text-white bg-gradient-to-r from-violet-600 to-indigo-600 hover:from-violet-700 hover:to-indigo-700 rounded-xl shadow-lg transition-all duration-200", children: "Close" }) })
|
|
1099
747
|
] }) }) })
|
|
1100
748
|
] });
|
|
1101
|
-
},
|
|
1102
|
-
const
|
|
1103
|
-
for (const
|
|
1104
|
-
if (
|
|
1105
|
-
const
|
|
1106
|
-
(
|
|
749
|
+
}, ge = (t, r) => {
|
|
750
|
+
const n = {}, l = (c) => {
|
|
751
|
+
for (const h of c)
|
|
752
|
+
if (h.subItems) {
|
|
753
|
+
const x = h.subItems.some(
|
|
754
|
+
(m) => m.path && r.startsWith(m.path)
|
|
1107
755
|
);
|
|
1108
|
-
|
|
756
|
+
l(h.subItems), x && (n[h.name] = !0);
|
|
1109
757
|
}
|
|
1110
758
|
};
|
|
1111
|
-
return
|
|
1112
|
-
},
|
|
1113
|
-
const
|
|
1114
|
-
() =>
|
|
1115
|
-
),
|
|
1116
|
-
|
|
1117
|
-
|
|
759
|
+
return l(t), n;
|
|
760
|
+
}, Ye = ({ menuItems: t, user: r, onLogout: n, onNavigate: l }) => {
|
|
761
|
+
const [c, h] = z(!1), x = K(null), m = xe(), [p, N] = z(
|
|
762
|
+
() => ge(t, m.pathname)
|
|
763
|
+
), S = (i) => N((j) => ({ ...j, [i]: !j[i] })), R = (i) => m.pathname === i;
|
|
764
|
+
J(() => {
|
|
765
|
+
N((i) => ({
|
|
1118
766
|
...i,
|
|
1119
|
-
...
|
|
767
|
+
...ge(t, m.pathname)
|
|
1120
768
|
}));
|
|
1121
|
-
}, [
|
|
1122
|
-
const i = (
|
|
1123
|
-
x.current && !x.current.contains(
|
|
769
|
+
}, [m.pathname, t]), J(() => {
|
|
770
|
+
const i = (j) => {
|
|
771
|
+
x.current && !x.current.contains(j.target) && h(!1);
|
|
1124
772
|
};
|
|
1125
|
-
return
|
|
1126
|
-
}, [
|
|
1127
|
-
const
|
|
1128
|
-
const
|
|
1129
|
-
return
|
|
773
|
+
return c && document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
|
|
774
|
+
}, [c]);
|
|
775
|
+
const y = "bg-violet-100 text-violet-700 dark:bg-violet-600/20 dark:text-violet-400", E = "bg-violet-600 dark:bg-violet-400", M = "bg-slate-300 group-hover:bg-violet-400 dark:bg-slate-600 dark:group-hover:bg-slate-500", g = ({ item: i, depth: j = 0 }) => {
|
|
776
|
+
const D = !!i.path, T = R(i.path);
|
|
777
|
+
return j === 0 ? /* @__PURE__ */ e.jsx("div", { children: D ? /* @__PURE__ */ e.jsx(ne, { to: i.path, onClick: () => l == null ? void 0 : l(), children: /* @__PURE__ */ e.jsxs("div", { className: `
|
|
1130
778
|
flex items-center gap-2.5
|
|
1131
779
|
px-3 py-2 rounded-xl cursor-pointer
|
|
1132
780
|
transition-all duration-150 group
|
|
1133
|
-
${
|
|
781
|
+
${T ? "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-sm shadow-violet-500/20" : "text-slate-600 hover:bg-slate-100/80 hover:text-slate-900 dark:text-slate-400 dark:hover:bg-slate-700/50 dark:hover:text-white"}
|
|
1134
782
|
`, children: [
|
|
1135
783
|
/* @__PURE__ */ e.jsx("div", { className: `
|
|
1136
784
|
w-6 h-6 rounded-lg flex items-center justify-center flex-shrink-0
|
|
1137
|
-
${
|
|
1138
|
-
`, children: /* @__PURE__ */ e.jsx(i.icon, { className: `w-3.5 h-3.5 ${
|
|
1139
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium leading-none", children:
|
|
785
|
+
${T ? "bg-white/20" : "bg-slate-100 group-hover:bg-slate-200 dark:bg-slate-700/60 dark:group-hover:bg-slate-700"}
|
|
786
|
+
`, children: /* @__PURE__ */ e.jsx(i.icon, { className: `w-3.5 h-3.5 ${T ? "text-white" : "text-slate-500 dark:text-slate-400"}` }) }),
|
|
787
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium leading-none", children: i.name })
|
|
1140
788
|
] }) }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1141
789
|
/* @__PURE__ */ e.jsxs(
|
|
1142
790
|
"div",
|
|
1143
791
|
{
|
|
1144
|
-
onClick: () =>
|
|
792
|
+
onClick: () => S(i.name),
|
|
1145
793
|
className: `
|
|
1146
794
|
flex items-center justify-between
|
|
1147
795
|
px-3 py-2 rounded-xl cursor-pointer
|
|
1148
796
|
transition-all duration-150 group
|
|
1149
|
-
${
|
|
797
|
+
${p[i.name] ? "bg-slate-100/80 text-slate-900 dark:bg-slate-700/40 dark:text-white" : "text-slate-600 hover:bg-slate-100/80 hover:text-slate-900 dark:text-slate-400 dark:hover:bg-slate-700/50 dark:hover:text-white"}
|
|
1150
798
|
`,
|
|
1151
799
|
children: [
|
|
1152
800
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2.5", children: [
|
|
1153
801
|
/* @__PURE__ */ e.jsx("div", { className: `
|
|
1154
802
|
w-6 h-6 rounded-lg flex items-center justify-center flex-shrink-0
|
|
1155
|
-
${
|
|
1156
|
-
`, children: /* @__PURE__ */ e.jsx(i.icon, { className: `w-3.5 h-3.5 ${
|
|
1157
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-semibold leading-none", children:
|
|
803
|
+
${p[i.name] ? "bg-violet-100 dark:bg-violet-600/20" : "bg-slate-100 group-hover:bg-slate-200 dark:bg-slate-700/60 dark:group-hover:bg-slate-700"}
|
|
804
|
+
`, children: /* @__PURE__ */ e.jsx(i.icon, { className: `w-3.5 h-3.5 ${p[i.name] ? "text-violet-600 dark:text-violet-400" : "text-slate-500 dark:text-slate-400"}` }) }),
|
|
805
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-semibold leading-none", children: i.name })
|
|
1158
806
|
] }),
|
|
1159
807
|
/* @__PURE__ */ e.jsx(
|
|
1160
808
|
"svg",
|
|
1161
809
|
{
|
|
1162
810
|
className: `w-3 h-3 flex-shrink-0 transition-transform duration-200
|
|
1163
811
|
text-slate-400 dark:text-slate-500
|
|
1164
|
-
${
|
|
812
|
+
${p[i.name] ? "rotate-90" : ""}`,
|
|
1165
813
|
fill: "none",
|
|
1166
814
|
stroke: "currentColor",
|
|
1167
815
|
viewBox: "0 0 24 24",
|
|
@@ -1171,39 +819,39 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1171
819
|
]
|
|
1172
820
|
}
|
|
1173
821
|
),
|
|
1174
|
-
i.subItems &&
|
|
1175
|
-
] }) }) : /* @__PURE__ */ e.jsx("div", { children:
|
|
822
|
+
i.subItems && p[i.name] && /* @__PURE__ */ e.jsx("div", { className: "mt-0.5 ml-3.5 pl-3 space-y-0.5 border-l border-slate-200/70 dark:border-slate-700/70", children: i.subItems.map((V) => /* @__PURE__ */ e.jsx(g, { item: V, depth: 1 }, V.name)) })
|
|
823
|
+
] }) }) : /* @__PURE__ */ e.jsx("div", { children: D ? /* @__PURE__ */ e.jsx(ne, { to: i.path, onClick: () => l == null ? void 0 : l(), children: /* @__PURE__ */ e.jsxs("div", { className: `
|
|
1176
824
|
flex items-center gap-2
|
|
1177
825
|
px-2.5 py-1.5 rounded-lg cursor-pointer
|
|
1178
826
|
transition-all duration-150 group
|
|
1179
|
-
${
|
|
827
|
+
${T ? y : "text-slate-500 hover:bg-slate-100/70 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-slate-700/30 dark:hover:text-slate-300"}
|
|
1180
828
|
`, children: [
|
|
1181
829
|
/* @__PURE__ */ e.jsx("div", { className: `w-1.5 h-1.5 rounded-full flex-shrink-0 transition-all duration-200
|
|
1182
|
-
${
|
|
1183
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-[13px] font-medium", children:
|
|
830
|
+
${T ? E : M}` }),
|
|
831
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-[13px] font-medium", children: i.name })
|
|
1184
832
|
] }) }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1185
833
|
/* @__PURE__ */ e.jsxs(
|
|
1186
834
|
"div",
|
|
1187
835
|
{
|
|
1188
|
-
onClick: () =>
|
|
836
|
+
onClick: () => S(i.name),
|
|
1189
837
|
className: `
|
|
1190
838
|
flex items-center justify-between
|
|
1191
839
|
px-2.5 py-1.5 rounded-lg cursor-pointer
|
|
1192
840
|
transition-all duration-150 group
|
|
1193
|
-
${
|
|
841
|
+
${p[i.name] ? "bg-slate-100/70 text-slate-700 dark:bg-slate-700/30 dark:text-slate-300" : "text-slate-500 hover:bg-slate-100/70 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-slate-700/30 dark:hover:text-slate-300"}
|
|
1194
842
|
`,
|
|
1195
843
|
children: [
|
|
1196
844
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1197
845
|
/* @__PURE__ */ e.jsx("div", { className: `w-1.5 h-1.5 rounded-full flex-shrink-0 transition-all duration-200
|
|
1198
|
-
${
|
|
1199
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-[13px] font-medium", children:
|
|
846
|
+
${p[i.name] ? E : M}` }),
|
|
847
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-[13px] font-medium", children: i.name })
|
|
1200
848
|
] }),
|
|
1201
849
|
/* @__PURE__ */ e.jsx(
|
|
1202
850
|
"svg",
|
|
1203
851
|
{
|
|
1204
852
|
className: `w-3 h-3 flex-shrink-0 transition-transform duration-200
|
|
1205
853
|
text-slate-400 dark:text-slate-500
|
|
1206
|
-
${
|
|
854
|
+
${p[i.name] ? "rotate-90" : ""}`,
|
|
1207
855
|
fill: "none",
|
|
1208
856
|
stroke: "currentColor",
|
|
1209
857
|
viewBox: "0 0 24 24",
|
|
@@ -1213,7 +861,7 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1213
861
|
]
|
|
1214
862
|
}
|
|
1215
863
|
),
|
|
1216
|
-
i.subItems &&
|
|
864
|
+
i.subItems && p[i.name] && /* @__PURE__ */ e.jsx("div", { className: "mt-0.5 ml-3 pl-2.5 space-y-0.5 border-l border-slate-200/70 dark:border-slate-700/70", children: i.subItems.map((V) => /* @__PURE__ */ e.jsx(g, { item: V, depth: j + 1 }, V.name)) })
|
|
1217
865
|
] }) });
|
|
1218
866
|
};
|
|
1219
867
|
return /* @__PURE__ */ e.jsxs("div", { className: "h-full w-full flex pl-2.5 sm:pl-3.5 max-sm:pr-2.5 sm:max-sm:pr-3.5", children: [
|
|
@@ -1239,7 +887,7 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1239
887
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1240
888
|
/* @__PURE__ */ e.jsx("h3", { className: "text-sm font-bold text-slate-900 dark:text-white leading-tight", children: "Navigation" }),
|
|
1241
889
|
/* @__PURE__ */ e.jsxs("p", { className: "text-[11px] text-slate-500 dark:text-slate-400 leading-none mt-0.5", children: [
|
|
1242
|
-
|
|
890
|
+
t.length,
|
|
1243
891
|
" items"
|
|
1244
892
|
] })
|
|
1245
893
|
] })
|
|
@@ -1249,16 +897,16 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1249
897
|
{
|
|
1250
898
|
className: "flex-1 overflow-y-auto space-y-0.5 custom-scrollbar",
|
|
1251
899
|
"aria-label": "Main navigation",
|
|
1252
|
-
children:
|
|
900
|
+
children: t.map((i) => /* @__PURE__ */ e.jsx(g, { item: i, depth: 0 }, i.name))
|
|
1253
901
|
}
|
|
1254
902
|
),
|
|
1255
|
-
|
|
903
|
+
r && /* @__PURE__ */ e.jsxs(
|
|
1256
904
|
"div",
|
|
1257
905
|
{
|
|
1258
906
|
ref: x,
|
|
1259
907
|
className: "flex-shrink-0 mt-2.5 sm:mt-3.5 pt-2.5 sm:pt-3.5 border-t border-slate-200/80 dark:border-slate-700/80",
|
|
1260
908
|
children: [
|
|
1261
|
-
|
|
909
|
+
c && n && /* @__PURE__ */ e.jsx("div", { className: `
|
|
1262
910
|
mb-1.5 rounded-xl overflow-hidden
|
|
1263
911
|
bg-white dark:bg-slate-800
|
|
1264
912
|
border border-red-100 dark:border-red-500/20
|
|
@@ -1268,7 +916,7 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1268
916
|
"button",
|
|
1269
917
|
{
|
|
1270
918
|
onClick: () => {
|
|
1271
|
-
|
|
919
|
+
n(), h(!1);
|
|
1272
920
|
},
|
|
1273
921
|
className: `
|
|
1274
922
|
w-full flex items-center gap-2.5 px-3 py-2.5
|
|
@@ -1277,7 +925,7 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1277
925
|
transition-colors duration-150
|
|
1278
926
|
`,
|
|
1279
927
|
children: [
|
|
1280
|
-
/* @__PURE__ */ e.jsx(
|
|
928
|
+
/* @__PURE__ */ e.jsx(fe, { className: "w-3.5 h-3.5 flex-shrink-0" }),
|
|
1281
929
|
"Sign out"
|
|
1282
930
|
]
|
|
1283
931
|
}
|
|
@@ -1285,27 +933,27 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1285
933
|
/* @__PURE__ */ e.jsxs(
|
|
1286
934
|
"button",
|
|
1287
935
|
{
|
|
1288
|
-
onClick: () =>
|
|
936
|
+
onClick: () => h((i) => !i),
|
|
1289
937
|
className: `
|
|
1290
938
|
w-full flex items-center gap-2.5
|
|
1291
939
|
px-2.5 py-2 rounded-xl border
|
|
1292
940
|
transition-all duration-150
|
|
1293
|
-
${
|
|
941
|
+
${c ? "bg-violet-50 border-violet-200/60 dark:bg-violet-900/20 dark:border-violet-700/40" : "bg-slate-50/60 border-slate-200/50 hover:bg-violet-50 hover:border-violet-200/60 dark:bg-slate-800/40 dark:border-slate-700/50 dark:hover:bg-violet-900/20 dark:hover:border-violet-700/40"}
|
|
1294
942
|
`,
|
|
1295
943
|
children: [
|
|
1296
944
|
/* @__PURE__ */ e.jsx("div", { className: `
|
|
1297
945
|
w-7 h-7 rounded-lg flex-shrink-0
|
|
1298
946
|
bg-gradient-to-br from-violet-600 to-indigo-600
|
|
1299
947
|
flex items-center justify-center shadow-sm shadow-violet-500/20
|
|
1300
|
-
`, children: /* @__PURE__ */ e.jsx(
|
|
948
|
+
`, children: /* @__PURE__ */ e.jsx(pe, { className: "w-3.5 h-3.5 text-white" }) }),
|
|
1301
949
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 text-left min-w-0", children: [
|
|
1302
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-[13px] font-semibold text-slate-900 dark:text-white truncate leading-none", children:
|
|
1303
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-[11px] text-slate-400 dark:text-slate-500 truncate mt-0.5 leading-none", children:
|
|
950
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-[13px] font-semibold text-slate-900 dark:text-white truncate leading-none", children: r.username }),
|
|
951
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-[11px] text-slate-400 dark:text-slate-500 truncate mt-0.5 leading-none", children: r.email })
|
|
1304
952
|
] }),
|
|
1305
|
-
/* @__PURE__ */ e.jsx(
|
|
953
|
+
/* @__PURE__ */ e.jsx(ae, { className: `
|
|
1306
954
|
w-3 h-3 flex-shrink-0 text-slate-400 dark:text-slate-500
|
|
1307
955
|
transition-transform duration-200
|
|
1308
|
-
${
|
|
956
|
+
${c ? "rotate-180" : ""}
|
|
1309
957
|
` })
|
|
1310
958
|
]
|
|
1311
959
|
}
|
|
@@ -1322,15 +970,15 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1322
970
|
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgb(148 163 184); }
|
|
1323
971
|
` })
|
|
1324
972
|
] });
|
|
1325
|
-
},
|
|
1326
|
-
icon:
|
|
1327
|
-
title:
|
|
1328
|
-
subtitle:
|
|
1329
|
-
badge:
|
|
1330
|
-
actions:
|
|
1331
|
-
searchBar:
|
|
1332
|
-
onIconClick:
|
|
1333
|
-
iconTitle:
|
|
973
|
+
}, Ue = ({
|
|
974
|
+
icon: t,
|
|
975
|
+
title: r,
|
|
976
|
+
subtitle: n,
|
|
977
|
+
badge: l,
|
|
978
|
+
actions: c,
|
|
979
|
+
searchBar: h,
|
|
980
|
+
onIconClick: x,
|
|
981
|
+
iconTitle: m
|
|
1334
982
|
}) => /* @__PURE__ */ e.jsxs(
|
|
1335
983
|
"div",
|
|
1336
984
|
{
|
|
@@ -1352,7 +1000,7 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1352
1000
|
translate-y-1/2 -translate-x-1/2 pointer-events-none` }),
|
|
1353
1001
|
/* @__PURE__ */ e.jsxs("div", { className: "relative z-10 px-4 py-3 sm:px-5 sm:py-3.5", children: [
|
|
1354
1002
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
1355
|
-
|
|
1003
|
+
t && /* @__PURE__ */ e.jsx(
|
|
1356
1004
|
"div",
|
|
1357
1005
|
{
|
|
1358
1006
|
className: `
|
|
@@ -1361,33 +1009,33 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1361
1009
|
flex items-center justify-center
|
|
1362
1010
|
shadow-md shadow-violet-200/40 dark:shadow-violet-900/30
|
|
1363
1011
|
transition-all duration-200
|
|
1364
|
-
${
|
|
1012
|
+
${x ? "cursor-pointer hover:scale-110 hover:shadow-lg active:scale-95" : "hover:scale-105"}
|
|
1365
1013
|
`,
|
|
1366
|
-
onClick:
|
|
1367
|
-
title:
|
|
1368
|
-
role:
|
|
1369
|
-
tabIndex:
|
|
1370
|
-
onKeyDown:
|
|
1371
|
-
(
|
|
1014
|
+
onClick: x,
|
|
1015
|
+
title: m,
|
|
1016
|
+
role: x ? "button" : void 0,
|
|
1017
|
+
tabIndex: x ? 0 : void 0,
|
|
1018
|
+
onKeyDown: x ? (p) => {
|
|
1019
|
+
(p.key === "Enter" || p.key === " ") && (p.preventDefault(), x());
|
|
1372
1020
|
} : void 0,
|
|
1373
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1021
|
+
children: /* @__PURE__ */ e.jsx(t, { className: "w-[18px] h-[18px] sm:w-5 sm:h-5 text-white" })
|
|
1374
1022
|
}
|
|
1375
1023
|
),
|
|
1376
1024
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
1377
1025
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
1378
1026
|
/* @__PURE__ */ e.jsx("h2", { className: `text-base sm:text-lg font-bold tracking-tight
|
|
1379
|
-
text-slate-900 dark:text-white leading-tight truncate`, children:
|
|
1380
|
-
|
|
1027
|
+
text-slate-900 dark:text-white leading-tight truncate`, children: r }),
|
|
1028
|
+
l && /* @__PURE__ */ e.jsx("span", { className: `
|
|
1381
1029
|
inline-flex items-center px-2 py-0.5 rounded-full
|
|
1382
1030
|
text-[11px] font-semibold tracking-wide
|
|
1383
1031
|
bg-violet-100 text-violet-700
|
|
1384
1032
|
border border-violet-200/50
|
|
1385
1033
|
dark:bg-violet-600/50 dark:text-violet-400 dark:border-violet-500/30
|
|
1386
|
-
`, children:
|
|
1034
|
+
`, children: l })
|
|
1387
1035
|
] }),
|
|
1388
|
-
|
|
1036
|
+
n && /* @__PURE__ */ e.jsx("p", { className: "mt-0.5 text-xs text-slate-500 dark:text-slate-400 leading-snug truncate", children: n })
|
|
1389
1037
|
] }),
|
|
1390
|
-
|
|
1038
|
+
c && /* @__PURE__ */ e.jsx("div", { className: `
|
|
1391
1039
|
flex-shrink-0
|
|
1392
1040
|
flex items-center gap-1.5
|
|
1393
1041
|
overflow-x-auto sm:overflow-x-visible
|
|
@@ -1397,102 +1045,102 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1397
1045
|
sm:max-w-none
|
|
1398
1046
|
sm:flex-wrap
|
|
1399
1047
|
[&::-webkit-scrollbar]:hidden
|
|
1400
|
-
`, children:
|
|
1048
|
+
`, children: c })
|
|
1401
1049
|
] }),
|
|
1402
|
-
|
|
1050
|
+
h && /* @__PURE__ */ e.jsx("div", { className: "mt-3 pt-3 border-t border-slate-200/40 dark:border-slate-700/50", children: h })
|
|
1403
1051
|
] })
|
|
1404
1052
|
]
|
|
1405
1053
|
}
|
|
1406
|
-
),
|
|
1407
|
-
icon:
|
|
1408
|
-
onClick:
|
|
1409
|
-
title:
|
|
1410
|
-
variant:
|
|
1411
|
-
size:
|
|
1054
|
+
), qe = ({
|
|
1055
|
+
icon: t,
|
|
1056
|
+
onClick: r,
|
|
1057
|
+
title: n,
|
|
1058
|
+
variant: l = "secondary",
|
|
1059
|
+
size: c = "md"
|
|
1412
1060
|
// sm | md
|
|
1413
1061
|
}) => {
|
|
1414
|
-
const
|
|
1062
|
+
const h = {
|
|
1415
1063
|
secondary: `bg-white hover:bg-slate-50 text-slate-700 border border-slate-200 shadow-sm
|
|
1416
1064
|
dark:bg-slate-700/50 dark:hover:bg-slate-700 dark:text-slate-300 dark:border-slate-600/50`,
|
|
1417
1065
|
danger: `bg-white hover:bg-red-50 text-slate-500 hover:text-red-600 border border-slate-200 shadow-sm
|
|
1418
1066
|
dark:bg-slate-700/50 dark:hover:bg-red-900/20 dark:text-slate-400 dark:hover:text-red-400 dark:border-slate-600/50`,
|
|
1419
1067
|
primary: `bg-violet-100 hover:bg-violet-200 text-violet-700 border border-violet-200 shadow-sm
|
|
1420
1068
|
dark:bg-violet-600/20 dark:hover:bg-violet-600/30 dark:text-violet-400 dark:border-violet-500/30`
|
|
1421
|
-
},
|
|
1069
|
+
}, x = {
|
|
1422
1070
|
sm: "p-1.5",
|
|
1423
1071
|
md: "p-2 sm:p-2.5"
|
|
1424
|
-
},
|
|
1072
|
+
}, m = {
|
|
1425
1073
|
sm: "w-3.5 h-3.5",
|
|
1426
1074
|
md: "w-4 h-4 sm:w-[18px] sm:h-[18px]"
|
|
1427
1075
|
};
|
|
1428
1076
|
return /* @__PURE__ */ e.jsx(
|
|
1429
1077
|
"button",
|
|
1430
1078
|
{
|
|
1431
|
-
onClick:
|
|
1432
|
-
title:
|
|
1433
|
-
"aria-label":
|
|
1079
|
+
onClick: r,
|
|
1080
|
+
title: n,
|
|
1081
|
+
"aria-label": n,
|
|
1434
1082
|
className: `
|
|
1435
1083
|
rounded-xl transition-all duration-200
|
|
1436
|
-
${c
|
|
1437
|
-
${
|
|
1084
|
+
${x[c]}
|
|
1085
|
+
${h[l] ?? h.secondary}
|
|
1438
1086
|
hover:scale-105 active:scale-95
|
|
1439
1087
|
`,
|
|
1440
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1088
|
+
children: /* @__PURE__ */ e.jsx(t, { className: m[c] })
|
|
1441
1089
|
}
|
|
1442
1090
|
);
|
|
1443
|
-
},
|
|
1444
|
-
children:
|
|
1445
|
-
icon:
|
|
1446
|
-
iconPosition:
|
|
1447
|
-
disabled:
|
|
1448
|
-
onClick:
|
|
1449
|
-
variant:
|
|
1450
|
-
loading:
|
|
1451
|
-
size:
|
|
1091
|
+
}, Ge = ({
|
|
1092
|
+
children: t,
|
|
1093
|
+
icon: r,
|
|
1094
|
+
iconPosition: n = "left",
|
|
1095
|
+
disabled: l = !1,
|
|
1096
|
+
onClick: c,
|
|
1097
|
+
variant: h = "primary",
|
|
1098
|
+
loading: x = !1,
|
|
1099
|
+
size: m = "md",
|
|
1452
1100
|
// sm | md | lg
|
|
1453
|
-
className:
|
|
1454
|
-
...
|
|
1101
|
+
className: p = "",
|
|
1102
|
+
...N
|
|
1455
1103
|
}) => {
|
|
1456
|
-
const
|
|
1104
|
+
const S = {
|
|
1457
1105
|
sm: "px-3 py-1.5 text-xs rounded-lg gap-1.5",
|
|
1458
1106
|
md: "px-4 py-2 sm:px-5 sm:py-2.5 text-sm rounded-xl gap-2",
|
|
1459
1107
|
lg: "px-5 py-2.5 sm:px-6 sm:py-3 text-sm sm:text-base rounded-xl gap-2"
|
|
1460
|
-
},
|
|
1108
|
+
}, R = {
|
|
1461
1109
|
sm: "w-3.5 h-3.5",
|
|
1462
1110
|
md: "w-4 h-4",
|
|
1463
1111
|
lg: "w-4 h-4 sm:w-5 sm:h-5"
|
|
1464
|
-
},
|
|
1465
|
-
primary:
|
|
1466
|
-
secondary:
|
|
1467
|
-
danger:
|
|
1112
|
+
}, y = {
|
|
1113
|
+
primary: l || x ? "bg-violet-300 text-white cursor-not-allowed opacity-60 dark:bg-violet-800/50" : "bg-gradient-to-r from-violet-600 to-indigo-600 text-white hover:from-violet-700 hover:to-indigo-700 shadow-md hover:shadow-lg hover:scale-105 active:scale-95",
|
|
1114
|
+
secondary: l || x ? "bg-gray-200 text-gray-400 cursor-not-allowed opacity-60 dark:bg-gray-700 dark:text-gray-500" : "bg-white text-slate-700 border border-slate-200 hover:bg-slate-50 dark:bg-slate-700/50 dark:text-slate-300 dark:border-slate-600 dark:hover:bg-slate-700 shadow-sm hover:shadow-md hover:scale-105 active:scale-95",
|
|
1115
|
+
danger: l || x ? "bg-red-300 text-white cursor-not-allowed opacity-60 dark:bg-red-800/50" : "bg-red-600 text-white hover:bg-red-700 shadow-md hover:shadow-lg hover:scale-105 active:scale-95"
|
|
1468
1116
|
};
|
|
1469
1117
|
return /* @__PURE__ */ e.jsxs(
|
|
1470
1118
|
"button",
|
|
1471
1119
|
{
|
|
1472
|
-
disabled:
|
|
1473
|
-
onClick:
|
|
1120
|
+
disabled: l || x,
|
|
1121
|
+
onClick: l || x ? void 0 : c,
|
|
1474
1122
|
className: `
|
|
1475
1123
|
inline-flex items-center justify-center font-semibold whitespace-nowrap
|
|
1476
1124
|
transition-all duration-200
|
|
1477
|
-
${
|
|
1478
|
-
${
|
|
1479
|
-
${
|
|
1125
|
+
${S[m]}
|
|
1126
|
+
${y[h]}
|
|
1127
|
+
${p}
|
|
1480
1128
|
`,
|
|
1481
|
-
...
|
|
1129
|
+
...N,
|
|
1482
1130
|
children: [
|
|
1483
|
-
|
|
1484
|
-
|
|
1131
|
+
r && n === "left" && !x && /* @__PURE__ */ e.jsx(r, { className: `${R[m]} flex-shrink-0` }),
|
|
1132
|
+
x && /* @__PURE__ */ e.jsx("span", { className: `${R[m]} flex-shrink-0 animate-spin rounded-full
|
|
1485
1133
|
border-2 border-white/30 border-t-white` }),
|
|
1486
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
1487
|
-
|
|
1134
|
+
/* @__PURE__ */ e.jsx("span", { children: x ? "Loading..." : t }),
|
|
1135
|
+
r && n === "right" && !x && /* @__PURE__ */ e.jsx(r, { className: `${R[m]} flex-shrink-0` })
|
|
1488
1136
|
]
|
|
1489
1137
|
}
|
|
1490
1138
|
);
|
|
1491
|
-
},
|
|
1492
|
-
value:
|
|
1493
|
-
onChange:
|
|
1494
|
-
placeholder:
|
|
1495
|
-
onClear:
|
|
1139
|
+
}, Je = ({
|
|
1140
|
+
value: t,
|
|
1141
|
+
onChange: r,
|
|
1142
|
+
placeholder: n = "Search...",
|
|
1143
|
+
onClear: l
|
|
1496
1144
|
}) => /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
1497
1145
|
/* @__PURE__ */ e.jsx(
|
|
1498
1146
|
"svg",
|
|
@@ -1516,73 +1164,73 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1516
1164
|
"input",
|
|
1517
1165
|
{
|
|
1518
1166
|
type: "text",
|
|
1519
|
-
placeholder:
|
|
1520
|
-
value:
|
|
1521
|
-
onChange:
|
|
1167
|
+
placeholder: n,
|
|
1168
|
+
value: t,
|
|
1169
|
+
onChange: r,
|
|
1522
1170
|
className: "w-full pl-12 pr-4 py-3 rounded-xl border transition-all duration-200 bg-white border-slate-200 text-slate-900 placeholder-slate-400 focus:border-violet-400 focus:bg-slate-50 dark:bg-slate-800/50 dark:border-slate-700 dark:text-white dark:placeholder-slate-500 dark:focus:border-violet-500 dark:focus:bg-slate-800 focus:outline-none focus:ring-2 focus:ring-violet-500/20"
|
|
1523
1171
|
}
|
|
1524
1172
|
),
|
|
1525
|
-
|
|
1173
|
+
t && l && /* @__PURE__ */ e.jsx(
|
|
1526
1174
|
"button",
|
|
1527
1175
|
{
|
|
1528
|
-
onClick:
|
|
1176
|
+
onClick: l,
|
|
1529
1177
|
className: "absolute right-4 top-1/2 -translate-y-1/2 p-1 rounded-lg transition-colors text-slate-400 hover:text-slate-600 hover:bg-slate-100 dark:text-slate-500 dark:hover:text-slate-300 dark:hover:bg-slate-700",
|
|
1530
1178
|
children: /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
1531
1179
|
}
|
|
1532
1180
|
)
|
|
1533
|
-
] }),
|
|
1534
|
-
columns:
|
|
1535
|
-
data:
|
|
1536
|
-
onSort:
|
|
1537
|
-
sortConfig:
|
|
1538
|
-
emptyMessage:
|
|
1539
|
-
emptyDescription:
|
|
1540
|
-
emptyIcon:
|
|
1541
|
-
}) =>
|
|
1542
|
-
/* @__PURE__ */ e.jsx("div", { className: "w-16 h-16 rounded-full bg-slate-100 dark:bg-slate-700 flex items-center justify-center mx-auto mb-4", children:
|
|
1543
|
-
/* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-slate-900 dark:text-slate-300 mb-2", children:
|
|
1544
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children:
|
|
1181
|
+
] }), Xe = ({
|
|
1182
|
+
columns: t,
|
|
1183
|
+
data: r,
|
|
1184
|
+
onSort: n,
|
|
1185
|
+
sortConfig: l,
|
|
1186
|
+
emptyMessage: c = "No data found",
|
|
1187
|
+
emptyDescription: h = "Try adjusting your filters or add new data",
|
|
1188
|
+
emptyIcon: x
|
|
1189
|
+
}) => r.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "h-full rounded-2xl border bg-white border-slate-200/50 dark:bg-slate-800/50 dark:border-slate-700/50 flex items-center justify-center", children: /* @__PURE__ */ e.jsxs("div", { className: "text-center py-12 px-6", children: [
|
|
1190
|
+
/* @__PURE__ */ e.jsx("div", { className: "w-16 h-16 rounded-full bg-slate-100 dark:bg-slate-700 flex items-center justify-center mx-auto mb-4", children: x ? /* @__PURE__ */ e.jsx(x, { className: "w-8 h-8 text-slate-400 dark:text-slate-500" }) : /* @__PURE__ */ e.jsx("svg", { className: "w-8 h-8 text-slate-400 dark:text-slate-500", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4" }) }) }),
|
|
1191
|
+
/* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-slate-900 dark:text-slate-300 mb-2", children: c }),
|
|
1192
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: h })
|
|
1545
1193
|
] }) }) : /* @__PURE__ */ e.jsx("div", { className: "h-full rounded-2xl border bg-white border-slate-200/50 dark:bg-slate-800/50 dark:border-slate-700/50 flex flex-col overflow-hidden", children: /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ e.jsxs("table", { className: "w-full", children: [
|
|
1546
|
-
/* @__PURE__ */ e.jsx("thead", { className: "bg-slate-50 dark:bg-slate-800/50 sticky top-0 ", children: /* @__PURE__ */ e.jsx("tr", { children:
|
|
1194
|
+
/* @__PURE__ */ e.jsx("thead", { className: "bg-slate-50 dark:bg-slate-800/50 sticky top-0 ", children: /* @__PURE__ */ e.jsx("tr", { children: t.map((m) => /* @__PURE__ */ e.jsx(
|
|
1547
1195
|
"th",
|
|
1548
1196
|
{
|
|
1549
|
-
onClick: () =>
|
|
1197
|
+
onClick: () => m.sortable && n && n(m.key),
|
|
1550
1198
|
className: `
|
|
1551
1199
|
px-6 py-4 text-left text-xs font-semibold text-slate-700 dark:text-slate-300 uppercase tracking-wider
|
|
1552
|
-
${
|
|
1200
|
+
${m.sortable ? "cursor-pointer select-none hover:bg-slate-100 dark:hover:bg-slate-700/50" : ""}
|
|
1553
1201
|
`,
|
|
1554
1202
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1555
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
1556
|
-
|
|
1203
|
+
/* @__PURE__ */ e.jsx("span", { children: m.label }),
|
|
1204
|
+
m.sortable && (l == null ? void 0 : l.key) === m.key && /* @__PURE__ */ e.jsx("span", { className: "text-violet-600 dark:text-violet-400", children: l.direction === "asc" ? "↑" : "↓" })
|
|
1557
1205
|
] })
|
|
1558
1206
|
},
|
|
1559
|
-
|
|
1207
|
+
m.key
|
|
1560
1208
|
)) }) }),
|
|
1561
|
-
/* @__PURE__ */ e.jsx("tbody", { className: "divide-y divide-slate-200 dark:divide-slate-700", children:
|
|
1209
|
+
/* @__PURE__ */ e.jsx("tbody", { className: "divide-y divide-slate-200 dark:divide-slate-700", children: r.map((m, p) => /* @__PURE__ */ e.jsx(
|
|
1562
1210
|
"tr",
|
|
1563
1211
|
{
|
|
1564
1212
|
className: "hover:bg-slate-50 dark:hover:bg-slate-800/30 transition-colors",
|
|
1565
|
-
children:
|
|
1213
|
+
children: t.map((N) => /* @__PURE__ */ e.jsx(
|
|
1566
1214
|
"td",
|
|
1567
1215
|
{
|
|
1568
1216
|
className: "px-6 py-4 whitespace-nowrap text-sm",
|
|
1569
|
-
children:
|
|
1217
|
+
children: N.render ? N.render(m) : m[N.key]
|
|
1570
1218
|
},
|
|
1571
|
-
|
|
1219
|
+
N.key
|
|
1572
1220
|
))
|
|
1573
1221
|
},
|
|
1574
|
-
|
|
1222
|
+
m.id || p
|
|
1575
1223
|
)) })
|
|
1576
|
-
] }) }) }),
|
|
1577
|
-
icon:
|
|
1578
|
-
onClick:
|
|
1579
|
-
children:
|
|
1580
|
-
variant:
|
|
1581
|
-
disabled:
|
|
1582
|
-
title:
|
|
1583
|
-
size:
|
|
1224
|
+
] }) }) }), Qe = ({
|
|
1225
|
+
icon: t,
|
|
1226
|
+
onClick: r,
|
|
1227
|
+
children: n,
|
|
1228
|
+
variant: l = "primary",
|
|
1229
|
+
disabled: c = !1,
|
|
1230
|
+
title: h = "",
|
|
1231
|
+
size: x = "md"
|
|
1584
1232
|
}) => {
|
|
1585
|
-
const
|
|
1233
|
+
const m = {
|
|
1586
1234
|
primary: "bg-violet-100 text-violet-700 hover:bg-violet-200 border border-violet-200 dark:bg-violet-600/20 dark:text-violet-400 dark:hover:bg-violet-600/30 dark:border dark:border-violet-500/30",
|
|
1587
1235
|
amber: "bg-amber-50 text-amber-700 border border-amber-200 hover:bg-amber-100 dark:bg-amber-900/20 dark:text-amber-300 dark:border-amber-700/40",
|
|
1588
1236
|
emerald: "bg-emerald-50 text-emerald-700 border border-emerald-200 hover:bg-emerald-100 dark:bg-emerald-900/20 dark:text-emerald-300 dark:border-emerald-700/40",
|
|
@@ -1597,10 +1245,10 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1597
1245
|
ghost: "bg-transparent text-slate-600 border border-dashed border-slate-300 hover:bg-slate-50 dark:text-slate-400 dark:border-slate-600 dark:hover:bg-slate-800/50",
|
|
1598
1246
|
rainbow: "action-btn-rainbow",
|
|
1599
1247
|
disabled: "bg-slate-100/50 text-slate-400 border border-slate-200/50 cursor-not-allowed dark:bg-slate-800/30 dark:text-slate-500 dark:border-slate-700/50"
|
|
1600
|
-
},
|
|
1248
|
+
}, p = {
|
|
1601
1249
|
sm: "px-2.5 py-1.5 text-xs gap-1",
|
|
1602
1250
|
md: "px-3 py-1.5 sm:px-3.5 sm:py-2 text-sm gap-1.5"
|
|
1603
|
-
},
|
|
1251
|
+
}, N = c ? m.disabled : m[l] ?? m.primary;
|
|
1604
1252
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1605
1253
|
/* @__PURE__ */ e.jsx("style", { children: `
|
|
1606
1254
|
@property --beam-angle {
|
|
@@ -1688,66 +1336,66 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1688
1336
|
/* @__PURE__ */ e.jsxs(
|
|
1689
1337
|
"button",
|
|
1690
1338
|
{
|
|
1691
|
-
onClick:
|
|
1339
|
+
onClick: c ? void 0 : r,
|
|
1692
1340
|
type: "button",
|
|
1693
|
-
title:
|
|
1694
|
-
disabled:
|
|
1341
|
+
title: h,
|
|
1342
|
+
disabled: c,
|
|
1695
1343
|
className: `
|
|
1696
1344
|
inline-flex items-center justify-center relative
|
|
1697
|
-
${
|
|
1345
|
+
${p[x]}
|
|
1698
1346
|
rounded-xl font-semibold whitespace-nowrap
|
|
1699
1347
|
transition-all duration-200
|
|
1700
|
-
${
|
|
1701
|
-
${
|
|
1348
|
+
${N}
|
|
1349
|
+
${c ? "opacity-60" : "active:scale-95"}
|
|
1702
1350
|
`,
|
|
1703
1351
|
children: [
|
|
1704
|
-
|
|
1705
|
-
|
|
1352
|
+
t && /* @__PURE__ */ e.jsx(t, { className: "w-3.5 h-3.5 flex-shrink-0" }),
|
|
1353
|
+
n && /* @__PURE__ */ e.jsx("span", { children: n })
|
|
1706
1354
|
]
|
|
1707
1355
|
}
|
|
1708
1356
|
)
|
|
1709
1357
|
] });
|
|
1710
|
-
},
|
|
1711
|
-
isOpen:
|
|
1712
|
-
onClose:
|
|
1713
|
-
title:
|
|
1714
|
-
subtitle:
|
|
1715
|
-
icon:
|
|
1716
|
-
children:
|
|
1717
|
-
size:
|
|
1718
|
-
fullscreen:
|
|
1719
|
-
hideHeader:
|
|
1358
|
+
}, Ze = ({
|
|
1359
|
+
isOpen: t,
|
|
1360
|
+
onClose: r,
|
|
1361
|
+
title: n,
|
|
1362
|
+
subtitle: l,
|
|
1363
|
+
icon: c,
|
|
1364
|
+
children: h,
|
|
1365
|
+
size: x = "md",
|
|
1366
|
+
fullscreen: m = !1,
|
|
1367
|
+
hideHeader: p = !1
|
|
1720
1368
|
}) => {
|
|
1721
|
-
if (
|
|
1722
|
-
const
|
|
1723
|
-
|
|
1369
|
+
if (J(() => {
|
|
1370
|
+
const R = (y) => {
|
|
1371
|
+
y.key === "Escape" && r();
|
|
1724
1372
|
};
|
|
1725
|
-
return
|
|
1726
|
-
document.removeEventListener("keydown",
|
|
1373
|
+
return t && (document.addEventListener("keydown", R), document.body.style.overflow = "hidden"), () => {
|
|
1374
|
+
document.removeEventListener("keydown", R), document.body.style.overflow = "unset";
|
|
1727
1375
|
};
|
|
1728
|
-
}, [
|
|
1729
|
-
const
|
|
1376
|
+
}, [t, r]), !t) return null;
|
|
1377
|
+
const N = {
|
|
1730
1378
|
sm: "max-w-md",
|
|
1731
1379
|
md: "max-w-2xl",
|
|
1732
1380
|
lg: "max-w-4xl",
|
|
1733
1381
|
xl: "max-w-6xl"
|
|
1734
|
-
},
|
|
1382
|
+
}, S = /* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 px-4 py-3 sm:px-5 sm:py-4
|
|
1735
1383
|
bg-gradient-to-r from-violet-50 via-indigo-50 to-violet-50
|
|
1736
1384
|
dark:from-slate-700/50 dark:via-slate-800/50 dark:to-slate-700/50
|
|
1737
1385
|
border-b border-slate-200 dark:border-slate-700`, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
1738
1386
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2.5 sm:gap-3 min-w-0", children: [
|
|
1739
|
-
|
|
1387
|
+
c && /* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 w-9 h-9 sm:w-10 sm:h-10 rounded-xl
|
|
1740
1388
|
flex items-center justify-center
|
|
1741
|
-
bg-gradient-to-br from-violet-600 to-indigo-600 shadow-lg`, children: /* @__PURE__ */ e.jsx(
|
|
1389
|
+
bg-gradient-to-br from-violet-600 to-indigo-600 shadow-lg`, children: /* @__PURE__ */ e.jsx(c, { className: "w-[18px] h-[18px] sm:w-5 sm:h-5 text-white" }) }),
|
|
1742
1390
|
/* @__PURE__ */ e.jsxs("div", { className: "min-w-0", children: [
|
|
1743
|
-
/* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-bold text-slate-900 dark:text-white truncate", children:
|
|
1744
|
-
|
|
1391
|
+
/* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-bold text-slate-900 dark:text-white truncate", children: n }),
|
|
1392
|
+
l && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 mt-0.5 truncate", children: l })
|
|
1745
1393
|
] })
|
|
1746
1394
|
] }),
|
|
1747
1395
|
/* @__PURE__ */ e.jsx(
|
|
1748
1396
|
"button",
|
|
1749
1397
|
{
|
|
1750
|
-
onClick:
|
|
1398
|
+
onClick: r,
|
|
1751
1399
|
className: `flex-shrink-0 p-1.5 rounded-lg border transition-all duration-200
|
|
1752
1400
|
text-slate-400
|
|
1753
1401
|
hover:bg-slate-100 hover:text-slate-900
|
|
@@ -1756,64 +1404,64 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1756
1404
|
dark:hover:text-white dark:hover:border-slate-500
|
|
1757
1405
|
hover:scale-105 active:scale-95`,
|
|
1758
1406
|
"aria-label": "Close modal",
|
|
1759
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1407
|
+
children: /* @__PURE__ */ e.jsx(X, { className: "w-4 h-4" })
|
|
1760
1408
|
}
|
|
1761
1409
|
)
|
|
1762
1410
|
] }) });
|
|
1763
|
-
return
|
|
1411
|
+
return m ? de(
|
|
1764
1412
|
/* @__PURE__ */ e.jsxs("div", { className: "fixed inset-0 z-[11000] flex flex-col animate-in fade-in duration-200 bg-white dark:bg-slate-800", children: [
|
|
1765
|
-
!
|
|
1766
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex-1 min-h-0 overflow-hidden", children:
|
|
1413
|
+
!p && S,
|
|
1414
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-1 min-h-0 overflow-hidden", children: h })
|
|
1767
1415
|
] }),
|
|
1768
1416
|
document.body
|
|
1769
|
-
) :
|
|
1417
|
+
) : de(
|
|
1770
1418
|
/* @__PURE__ */ e.jsxs("div", { className: "fixed inset-0 z-[11000] overflow-y-auto flex min-h-full items-center justify-center animate-in fade-in duration-200", children: [
|
|
1771
1419
|
/* @__PURE__ */ e.jsx(
|
|
1772
1420
|
"div",
|
|
1773
1421
|
{
|
|
1774
1422
|
className: "fixed inset-0 bg-slate-900/50 backdrop-blur-sm",
|
|
1775
|
-
onClick:
|
|
1423
|
+
onClick: r
|
|
1776
1424
|
}
|
|
1777
1425
|
),
|
|
1778
|
-
/* @__PURE__ */ e.jsx("div", { className: `relative z-[11001] w-full ${
|
|
1426
|
+
/* @__PURE__ */ e.jsx("div", { className: `relative z-[11001] w-full ${N[x]} animate-in zoom-in-95 duration-200 my-auto`, children: /* @__PURE__ */ e.jsxs("div", { className: `
|
|
1779
1427
|
rounded-xl sm:rounded-2xl border overflow-hidden
|
|
1780
1428
|
bg-white border-slate-200/50 shadow-2xl ml-2 mr-2
|
|
1781
1429
|
dark:bg-slate-800 dark:border-slate-700/50
|
|
1782
1430
|
flex flex-col max-h-[70dvh] sm:max-h-[80dvh]
|
|
1783
1431
|
`, children: [
|
|
1784
|
-
!
|
|
1785
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex-1 min-h-0 overflow-y-auto", children:
|
|
1432
|
+
!p && S,
|
|
1433
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-1 min-h-0 overflow-y-auto", children: h })
|
|
1786
1434
|
] }) })
|
|
1787
1435
|
] }),
|
|
1788
1436
|
document.body
|
|
1789
1437
|
);
|
|
1790
|
-
},
|
|
1791
|
-
checked:
|
|
1792
|
-
onChange:
|
|
1793
|
-
disabled:
|
|
1794
|
-
label:
|
|
1795
|
-
name:
|
|
1796
|
-
helpText:
|
|
1438
|
+
}, Pe = ({
|
|
1439
|
+
checked: t = !1,
|
|
1440
|
+
onChange: r,
|
|
1441
|
+
disabled: n = !1,
|
|
1442
|
+
label: l,
|
|
1443
|
+
name: c,
|
|
1444
|
+
helpText: h
|
|
1797
1445
|
}) => {
|
|
1798
|
-
const
|
|
1799
|
-
|
|
1446
|
+
const x = () => {
|
|
1447
|
+
n || r(c, !t);
|
|
1800
1448
|
};
|
|
1801
1449
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-1.5", children: [
|
|
1802
|
-
|
|
1450
|
+
l && /* @__PURE__ */ e.jsx("span", { className: "block text-sm font-semibold text-slate-700 dark:text-slate-300", children: l }),
|
|
1803
1451
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1804
1452
|
/* @__PURE__ */ e.jsx(
|
|
1805
1453
|
"button",
|
|
1806
1454
|
{
|
|
1807
1455
|
type: "button",
|
|
1808
1456
|
role: "switch",
|
|
1809
|
-
"aria-checked":
|
|
1810
|
-
onClick:
|
|
1811
|
-
disabled:
|
|
1457
|
+
"aria-checked": t,
|
|
1458
|
+
onClick: x,
|
|
1459
|
+
disabled: n,
|
|
1812
1460
|
className: `
|
|
1813
1461
|
relative inline-flex h-6 w-11 flex-shrink-0 items-center rounded-full
|
|
1814
1462
|
transition-all duration-200
|
|
1815
|
-
${
|
|
1816
|
-
${
|
|
1463
|
+
${t ? "bg-gradient-to-r from-violet-600 to-indigo-600 shadow-md shadow-violet-200 dark:shadow-violet-900/30" : "bg-slate-300 dark:bg-slate-600"}
|
|
1464
|
+
${n ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:scale-105 active:scale-95"}
|
|
1817
1465
|
focus:outline-none focus-visible:ring-2 focus-visible:ring-violet-500/30 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-slate-800
|
|
1818
1466
|
`,
|
|
1819
1467
|
children: /* @__PURE__ */ e.jsx(
|
|
@@ -1822,88 +1470,88 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1822
1470
|
className: `
|
|
1823
1471
|
inline-block h-4 w-4 transform rounded-full bg-white shadow-md
|
|
1824
1472
|
transition-transform duration-200
|
|
1825
|
-
${
|
|
1473
|
+
${t ? "translate-x-6" : "translate-x-1"}
|
|
1826
1474
|
`
|
|
1827
1475
|
}
|
|
1828
1476
|
)
|
|
1829
1477
|
}
|
|
1830
1478
|
),
|
|
1831
|
-
/* @__PURE__ */ e.jsx("span", { className: `text-sm font-medium ${
|
|
1479
|
+
/* @__PURE__ */ e.jsx("span", { className: `text-sm font-medium ${t ? "text-violet-700 dark:text-violet-400" : "text-slate-500 dark:text-slate-400"}`, children: t ? "Yes" : "No" })
|
|
1832
1480
|
] }),
|
|
1833
|
-
|
|
1481
|
+
h && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 leading-snug", children: h })
|
|
1834
1482
|
] });
|
|
1835
|
-
},
|
|
1836
|
-
var
|
|
1837
|
-
const [
|
|
1838
|
-
const
|
|
1839
|
-
|
|
1840
|
-
},
|
|
1841
|
-
|
|
1842
|
-
},
|
|
1843
|
-
|
|
1844
|
-
},
|
|
1845
|
-
|
|
1846
|
-
},
|
|
1847
|
-
|
|
1848
|
-
},
|
|
1849
|
-
|
|
1850
|
-
},
|
|
1851
|
-
|
|
1852
|
-
},
|
|
1853
|
-
if (!
|
|
1854
|
-
const
|
|
1855
|
-
if (
|
|
1483
|
+
}, we = ({ field: t, value: r, onChange: n, error: l, index: c, mode: h = "create" }) => {
|
|
1484
|
+
var O;
|
|
1485
|
+
const [x, m] = z(""), [p, N] = z(!1), [S, R] = z(!1), [y, E] = z(null), [M, g] = z(""), [i, j] = z(!1), D = (b) => {
|
|
1486
|
+
const $ = b.target.value;
|
|
1487
|
+
n(t.name, $);
|
|
1488
|
+
}, T = (b) => {
|
|
1489
|
+
n(t.name, b), N(!1), m("");
|
|
1490
|
+
}, V = () => {
|
|
1491
|
+
N(!1), m(""), j(!1), E(null);
|
|
1492
|
+
}, I = () => {
|
|
1493
|
+
x.trim() && (n(t.name, x.trim()), R(!0), N(!1), m(""));
|
|
1494
|
+
}, Y = (b, $) => {
|
|
1495
|
+
$.preventDefault(), $.stopPropagation(), E(b), g(b.label), j(!0);
|
|
1496
|
+
}, U = async (b) => {
|
|
1497
|
+
b.preventDefault(), b.stopPropagation(), M.trim() && y && t.onEditRank && await t.onEditRank(y.value, M.trim()) && (r === y.value && n(t.name, y.value), j(!1), E(null), g(""));
|
|
1498
|
+
}, B = (b) => {
|
|
1499
|
+
b.preventDefault(), b.stopPropagation(), j(!1), E(null), g("");
|
|
1500
|
+
}, w = (() => {
|
|
1501
|
+
if (!x) return t.options || [];
|
|
1502
|
+
const b = Array.isArray(t.options) ? t.options : [];
|
|
1503
|
+
if (t.fuzzySearch && typeof t.findFuzzyMatches == "function")
|
|
1856
1504
|
try {
|
|
1857
|
-
return
|
|
1858
|
-
} catch (
|
|
1859
|
-
return console.error("Fuzzy search error:",
|
|
1860
|
-
(
|
|
1861
|
-
var
|
|
1862
|
-
return (
|
|
1505
|
+
return t.findFuzzyMatches(x, b, t.fuzzyThreshold || 0.5);
|
|
1506
|
+
} catch ($) {
|
|
1507
|
+
return console.error("Fuzzy search error:", $), b.filter(
|
|
1508
|
+
(F) => {
|
|
1509
|
+
var H;
|
|
1510
|
+
return (H = F.label) == null ? void 0 : H.toLowerCase().includes(x.toLowerCase());
|
|
1863
1511
|
}
|
|
1864
1512
|
);
|
|
1865
1513
|
}
|
|
1866
|
-
return
|
|
1867
|
-
(
|
|
1868
|
-
var
|
|
1869
|
-
return (
|
|
1514
|
+
return b.filter(
|
|
1515
|
+
($) => {
|
|
1516
|
+
var F;
|
|
1517
|
+
return (F = $.label) == null ? void 0 : F.toLowerCase().includes(x.toLowerCase());
|
|
1870
1518
|
}
|
|
1871
1519
|
) || [];
|
|
1872
|
-
})(),
|
|
1873
|
-
var
|
|
1874
|
-
if (!
|
|
1875
|
-
if (
|
|
1876
|
-
return
|
|
1877
|
-
const
|
|
1878
|
-
return
|
|
1879
|
-
},
|
|
1880
|
-
var
|
|
1881
|
-
const
|
|
1520
|
+
})(), W = x.trim() && t.fuzzySearch && t.options && typeof t.checkForDuplicateDesignation == "function" ? t.checkForDuplicateDesignation(x, t.options, 0.8) : null, d = W && W.similarityScore === 1, v = t.type === "select-or-custom" && r && !((O = t.options) != null && O.some((b) => b.value === r)), C = () => {
|
|
1521
|
+
var $;
|
|
1522
|
+
if (!r) return t.placeholder;
|
|
1523
|
+
if (t.type === "select-or-custom" && v)
|
|
1524
|
+
return r;
|
|
1525
|
+
const b = ($ = t.options) == null ? void 0 : $.find((F) => F.value === r);
|
|
1526
|
+
return b ? b.label : t.placeholder;
|
|
1527
|
+
}, A = () => {
|
|
1528
|
+
var H, G;
|
|
1529
|
+
const b = t.icon, $ = `
|
|
1882
1530
|
w-full px-3.5 py-2.5 rounded-xl border transition-all duration-200
|
|
1883
1531
|
bg-white dark:bg-slate-800 text-sm text-slate-900 dark:text-white
|
|
1884
1532
|
focus:outline-none focus:ring-2 focus:ring-violet-500/20 placeholder-slate-400
|
|
1885
|
-
`,
|
|
1886
|
-
switch (
|
|
1533
|
+
`, F = l ? "border-red-300 dark:border-red-700 focus:border-red-500 focus:ring-red-500" : "border-slate-300 dark:border-slate-600 focus:border-violet-500 focus:ring-violet-500";
|
|
1534
|
+
switch (t.type) {
|
|
1887
1535
|
case "select-or-custom":
|
|
1888
|
-
return
|
|
1889
|
-
|
|
1536
|
+
return S || v ? /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
1537
|
+
b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
|
|
1890
1538
|
/* @__PURE__ */ e.jsx(
|
|
1891
1539
|
"input",
|
|
1892
1540
|
{
|
|
1893
1541
|
type: "text",
|
|
1894
|
-
value:
|
|
1895
|
-
onChange: (
|
|
1896
|
-
placeholder:
|
|
1897
|
-
disabled:
|
|
1898
|
-
className: `${
|
|
1542
|
+
value: r,
|
|
1543
|
+
onChange: (s) => n(t.name, s.target.value),
|
|
1544
|
+
placeholder: t.customPlaceholder || "Enter custom value",
|
|
1545
|
+
disabled: t.disabled,
|
|
1546
|
+
className: `${$} ${F} ${b ? "pl-9 sm:pl-12" : ""} pr-32 disabled:opacity-50 disabled:cursor-not-allowed`
|
|
1899
1547
|
}
|
|
1900
1548
|
),
|
|
1901
1549
|
/* @__PURE__ */ e.jsx(
|
|
1902
1550
|
"button",
|
|
1903
1551
|
{
|
|
1904
1552
|
type: "button",
|
|
1905
|
-
onClick: (
|
|
1906
|
-
|
|
1553
|
+
onClick: (s) => {
|
|
1554
|
+
s.preventDefault(), s.stopPropagation(), R(!1), n(t.name, "");
|
|
1907
1555
|
},
|
|
1908
1556
|
className: "absolute right-3 top-1/2 -translate-y-1/2 px-3 py-1.5 text-xs font-semibold text-slate-600 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white transition-colors rounded-lg hover:bg-slate-100 dark:hover:bg-slate-700",
|
|
1909
1557
|
children: "Select Existing"
|
|
@@ -1914,52 +1562,52 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1914
1562
|
"button",
|
|
1915
1563
|
{
|
|
1916
1564
|
type: "button",
|
|
1917
|
-
onClick: (
|
|
1918
|
-
|
|
1565
|
+
onClick: (s) => {
|
|
1566
|
+
s.preventDefault(), s.stopPropagation(), t.disabled || N(!0);
|
|
1919
1567
|
},
|
|
1920
|
-
disabled:
|
|
1921
|
-
className: ` relative ${
|
|
1568
|
+
disabled: t.disabled,
|
|
1569
|
+
className: ` relative ${$} ${F} ${b ? "pl-12" : ""} pr-4 text-left flex items-center justify-between disabled:opacity-50 disabled:cursor-not-allowed hover:border-violet-400 dark:hover:border-violet-500`,
|
|
1922
1570
|
children: [
|
|
1923
|
-
|
|
1571
|
+
b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
|
|
1924
1572
|
/* @__PURE__ */ e.jsx(
|
|
1925
1573
|
"span",
|
|
1926
1574
|
{
|
|
1927
|
-
className: `${
|
|
1928
|
-
title:
|
|
1929
|
-
children:
|
|
1575
|
+
className: `${r ? "" : "text-slate-400"} truncate pr-2`,
|
|
1576
|
+
title: C(),
|
|
1577
|
+
children: C()
|
|
1930
1578
|
}
|
|
1931
1579
|
),
|
|
1932
|
-
/* @__PURE__ */ e.jsx(
|
|
1580
|
+
/* @__PURE__ */ e.jsx(ae, { className: "w-5 h-5 text-slate-400 " })
|
|
1933
1581
|
]
|
|
1934
1582
|
}
|
|
1935
1583
|
),
|
|
1936
|
-
|
|
1584
|
+
p && /* @__PURE__ */ e.jsx(
|
|
1937
1585
|
"div",
|
|
1938
1586
|
{
|
|
1939
1587
|
className: "fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-4 bg-slate-900/50 backdrop-blur-sm animate-in fade-in duration-200",
|
|
1940
|
-
onMouseDown: (
|
|
1941
|
-
|
|
1588
|
+
onMouseDown: (s) => {
|
|
1589
|
+
s.target === s.currentTarget && (s.preventDefault(), s.stopPropagation(), V());
|
|
1942
1590
|
},
|
|
1943
1591
|
children: /* @__PURE__ */ e.jsx(
|
|
1944
1592
|
"div",
|
|
1945
1593
|
{
|
|
1946
1594
|
className: "relative w-full max-w-md animate-in zoom-in-95 duration-200",
|
|
1947
|
-
onMouseDown: (
|
|
1595
|
+
onMouseDown: (s) => s.stopPropagation(),
|
|
1948
1596
|
children: /* @__PURE__ */ e.jsxs("div", { className: "rounded-2xl border overflow-hidden bg-white border-slate-200/50 shadow-2xl max-h-[70vh] sm:max-h-[80vh] dark:bg-slate-800 dark:border-slate-700/50 flex flex-col", children: [
|
|
1949
1597
|
/* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 px-4 py-3 sm:px-5 sm:py-4
|
|
1950
1598
|
bg-gradient-to-r from-violet-50 via-indigo-50 to-violet-50
|
|
1951
1599
|
dark:from-slate-700/50 dark:via-slate-800/50 dark:to-slate-700/50
|
|
1952
1600
|
border-b border-slate-200 dark:border-slate-700 rounded-t-2xl`, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
1953
1601
|
/* @__PURE__ */ e.jsxs("div", { className: "min-w-0", children: [
|
|
1954
|
-
/* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-bold text-slate-900 dark:text-white truncate", children:
|
|
1955
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 mt-0.5 truncate", children:
|
|
1602
|
+
/* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-bold text-slate-900 dark:text-white truncate", children: i ? "Edit Rank Designation" : t.modalTitle || t.label }),
|
|
1603
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 mt-0.5 truncate", children: i ? `Editing: ${y == null ? void 0 : y.label}` : t.modalSubtitle || "Search existing or create new" })
|
|
1956
1604
|
] }),
|
|
1957
1605
|
/* @__PURE__ */ e.jsx(
|
|
1958
1606
|
"button",
|
|
1959
1607
|
{
|
|
1960
1608
|
type: "button",
|
|
1961
|
-
onClick: (
|
|
1962
|
-
|
|
1609
|
+
onClick: (s) => {
|
|
1610
|
+
s.preventDefault(), s.stopPropagation(), V();
|
|
1963
1611
|
},
|
|
1964
1612
|
className: `flex-shrink-0 p-1.5 rounded-lg border transition-all duration-200
|
|
1965
1613
|
text-slate-400 hover:bg-slate-100 hover:text-slate-900
|
|
@@ -1967,11 +1615,11 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1967
1615
|
dark:border-slate-700/50 dark:hover:bg-slate-700
|
|
1968
1616
|
dark:hover:text-white dark:hover:border-slate-500
|
|
1969
1617
|
hover:scale-105 active:scale-95`,
|
|
1970
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1618
|
+
children: /* @__PURE__ */ e.jsx(X, { className: "w-4 h-4" })
|
|
1971
1619
|
}
|
|
1972
1620
|
)
|
|
1973
1621
|
] }) }),
|
|
1974
|
-
|
|
1622
|
+
i ? /* @__PURE__ */ e.jsxs("div", { className: "p-4 sm:p-5 space-y-3 sm:space-y-4", children: [
|
|
1975
1623
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1976
1624
|
/* @__PURE__ */ e.jsx("label", { className: `block text-xs font-semibold uppercase tracking-wide
|
|
1977
1625
|
text-slate-700 dark:text-slate-300 mb-1.5`, children: "Edit Rank Designation" }),
|
|
@@ -1979,8 +1627,8 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1979
1627
|
"input",
|
|
1980
1628
|
{
|
|
1981
1629
|
type: "text",
|
|
1982
|
-
value:
|
|
1983
|
-
onChange: (
|
|
1630
|
+
value: M,
|
|
1631
|
+
onChange: (s) => g(s.target.value),
|
|
1984
1632
|
className: `w-full px-3 py-2.5 sm:px-4 sm:py-3 rounded-xl border
|
|
1985
1633
|
border-slate-200/50 dark:border-slate-700/50
|
|
1986
1634
|
bg-white dark:bg-slate-800
|
|
@@ -1996,7 +1644,7 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
1996
1644
|
"button",
|
|
1997
1645
|
{
|
|
1998
1646
|
type: "button",
|
|
1999
|
-
onClick:
|
|
1647
|
+
onClick: B,
|
|
2000
1648
|
className: `flex-1 inline-flex items-center justify-center gap-2
|
|
2001
1649
|
px-3 py-2.5 sm:px-4 sm:py-3 rounded-xl
|
|
2002
1650
|
bg-white dark:bg-slate-700 hover:bg-slate-50 dark:hover:bg-slate-600
|
|
@@ -2004,7 +1652,7 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
2004
1652
|
border border-slate-200/50 dark:border-slate-700/50
|
|
2005
1653
|
transition-all duration-200 hover:scale-105 active:scale-95 shadow-sm`,
|
|
2006
1654
|
children: [
|
|
2007
|
-
/* @__PURE__ */ e.jsx(
|
|
1655
|
+
/* @__PURE__ */ e.jsx(X, { className: "w-4 h-4" }),
|
|
2008
1656
|
" Cancel"
|
|
2009
1657
|
]
|
|
2010
1658
|
}
|
|
@@ -2013,7 +1661,7 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
2013
1661
|
"button",
|
|
2014
1662
|
{
|
|
2015
1663
|
type: "button",
|
|
2016
|
-
onClick:
|
|
1664
|
+
onClick: U,
|
|
2017
1665
|
className: `flex-1 inline-flex items-center justify-center gap-2
|
|
2018
1666
|
px-3 py-2.5 sm:px-4 sm:py-3 rounded-xl
|
|
2019
1667
|
bg-gradient-to-r from-violet-600 to-indigo-600
|
|
@@ -2022,7 +1670,7 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
2022
1670
|
shadow-md hover:shadow-lg
|
|
2023
1671
|
transition-all duration-200 hover:scale-105 active:scale-95`,
|
|
2024
1672
|
children: [
|
|
2025
|
-
/* @__PURE__ */ e.jsx(
|
|
1673
|
+
/* @__PURE__ */ e.jsx(Re, { className: "w-4 h-4" }),
|
|
2026
1674
|
" Save Changes"
|
|
2027
1675
|
]
|
|
2028
1676
|
}
|
|
@@ -2030,81 +1678,81 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
2030
1678
|
] })
|
|
2031
1679
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2032
1680
|
/* @__PURE__ */ e.jsx("div", { className: "p-4 border-b border-slate-200 dark:border-slate-700", children: /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
2033
|
-
/* @__PURE__ */ e.jsx(
|
|
1681
|
+
/* @__PURE__ */ e.jsx(le, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400" }),
|
|
2034
1682
|
/* @__PURE__ */ e.jsx(
|
|
2035
1683
|
"input",
|
|
2036
1684
|
{
|
|
2037
1685
|
type: "text",
|
|
2038
|
-
value:
|
|
2039
|
-
onChange: (
|
|
2040
|
-
placeholder:
|
|
1686
|
+
value: x,
|
|
1687
|
+
onChange: (s) => m(s.target.value),
|
|
1688
|
+
placeholder: t.fuzzySearch ? "Search or type to create new..." : "Search...",
|
|
2041
1689
|
className: "w-full pl-10 pr-4 py-2.5 rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 text-slate-900 dark:text-white placeholder-slate-400 focus:border-violet-500 focus:ring-2 focus:ring-violet-500/20 transition-all",
|
|
2042
1690
|
autoFocus: !0
|
|
2043
1691
|
}
|
|
2044
1692
|
)
|
|
2045
1693
|
] }) }),
|
|
2046
|
-
|
|
2047
|
-
/* @__PURE__ */ e.jsx(
|
|
1694
|
+
W && W.similarityScore < 1 && /* @__PURE__ */ e.jsx("div", { className: "mx-4 mt-4 p-3 rounded-lg bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800/50", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-start space-x-2", children: [
|
|
1695
|
+
/* @__PURE__ */ e.jsx(he, { className: "w-4 h-4 text-amber-600 dark:text-amber-400 flex-shrink-0 mt-0.5" }),
|
|
2048
1696
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 text-xs", children: [
|
|
2049
1697
|
/* @__PURE__ */ e.jsx("p", { className: "font-semibold text-amber-900 dark:text-amber-300", children: "Similar designation found!" }),
|
|
2050
1698
|
/* @__PURE__ */ e.jsxs("p", { className: "text-amber-700 dark:text-amber-400 mt-1", children: [
|
|
2051
1699
|
"Similar rank found (",
|
|
2052
|
-
|
|
1700
|
+
W.scorePercentage,
|
|
2053
1701
|
"% match). You can still create this if it's different."
|
|
2054
1702
|
] })
|
|
2055
1703
|
] })
|
|
2056
1704
|
] }) }),
|
|
2057
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children:
|
|
1705
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children: x.trim() ? (
|
|
2058
1706
|
/* Show filtered results + Create New when user types */
|
|
2059
1707
|
/* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2060
|
-
|
|
1708
|
+
w.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "space-y-1 mb-3", children: [
|
|
2061
1709
|
/* @__PURE__ */ e.jsx("p", { className: "px-4 py-2 text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider", children: "Existing Options" }),
|
|
2062
|
-
|
|
1710
|
+
w.map((s) => /* @__PURE__ */ e.jsx("div", { className: "group relative", children: /* @__PURE__ */ e.jsxs(
|
|
2063
1711
|
"button",
|
|
2064
1712
|
{
|
|
2065
1713
|
type: "button",
|
|
2066
|
-
onClick: (
|
|
2067
|
-
|
|
1714
|
+
onClick: (a) => {
|
|
1715
|
+
a.preventDefault(), a.stopPropagation(), T(s.value);
|
|
2068
1716
|
},
|
|
2069
|
-
className: `w-full text-left px-4 py-3 rounded-lg transition-all duration-200 flex items-center justify-between ${
|
|
1717
|
+
className: `w-full text-left px-4 py-3 rounded-lg transition-all duration-200 flex items-center justify-between ${r === s.value ? "bg-violet-100 dark:bg-violet-600/20 text-violet-900 dark:text-violet-300 font-semibold" : "hover:bg-slate-100 dark:hover:bg-slate-700 text-slate-700 dark:text-slate-300"}`,
|
|
2070
1718
|
children: [
|
|
2071
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
1719
|
+
/* @__PURE__ */ e.jsx("span", { children: s.label }),
|
|
2072
1720
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2073
|
-
|
|
2074
|
-
|
|
1721
|
+
t.fuzzySearch && s.scorePercentage && /* @__PURE__ */ e.jsxs("span", { className: "inline-flex items-center px-2 py-0.5 rounded-md text-xs font-semibold bg-green-100 text-green-800 dark:bg-green-600/20 dark:text-green-400", children: [
|
|
1722
|
+
s.scorePercentage,
|
|
2075
1723
|
"% match"
|
|
2076
1724
|
] }),
|
|
2077
|
-
|
|
1725
|
+
t.onEditRank && !t.disabled && /* @__PURE__ */ e.jsx(
|
|
2078
1726
|
"button",
|
|
2079
1727
|
{
|
|
2080
1728
|
type: "button",
|
|
2081
|
-
onClick: (
|
|
1729
|
+
onClick: (a) => Y(s, a),
|
|
2082
1730
|
className: "opacity-0 group-hover:opacity-100 transition-opacity p-1.5 rounded-md hover:bg-white dark:hover:bg-slate-600 text-slate-500 hover:text-violet-600 dark:text-slate-400 dark:hover:text-violet-400",
|
|
2083
1731
|
title: "Edit this rank",
|
|
2084
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1732
|
+
children: /* @__PURE__ */ e.jsx(oe, { className: "w-3.5 h-3.5" })
|
|
2085
1733
|
}
|
|
2086
1734
|
)
|
|
2087
1735
|
] })
|
|
2088
1736
|
]
|
|
2089
1737
|
}
|
|
2090
|
-
) },
|
|
1738
|
+
) }, s.value))
|
|
2091
1739
|
] }),
|
|
2092
|
-
(!d || (
|
|
2093
|
-
/* @__PURE__ */ e.jsx("p", { className: "px-4 py-2 text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider", children:
|
|
1740
|
+
(!d || (W == null ? void 0 : W.similarityScore) < 1) && /* @__PURE__ */ e.jsxs("div", { className: w.length > 0 ? "border-t border-slate-200 dark:border-slate-700 pt-3" : "", children: [
|
|
1741
|
+
/* @__PURE__ */ e.jsx("p", { className: "px-4 py-2 text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider", children: w.length > 0 ? h === "edit" ? "Or Update To" : "Or Create New" : "No matches found" }),
|
|
2094
1742
|
/* @__PURE__ */ e.jsx("div", { className: "px-2", children: /* @__PURE__ */ e.jsx(
|
|
2095
1743
|
"button",
|
|
2096
1744
|
{
|
|
2097
1745
|
type: "button",
|
|
2098
|
-
onClick: (
|
|
2099
|
-
|
|
1746
|
+
onClick: (s) => {
|
|
1747
|
+
s.preventDefault(), s.stopPropagation(), I();
|
|
2100
1748
|
},
|
|
2101
1749
|
className: "w-full px-4 py-3 rounded-lg transition-all duration-200 bg-gradient-to-r from-violet-600 to-indigo-600 hover:from-violet-700 hover:to-indigo-700 text-white font-semibold shadow-lg hover:shadow-xl transform hover:-translate-y-0.5 min-w-0",
|
|
2102
1750
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center space-x-2 min-w-0", children: [
|
|
2103
|
-
/* @__PURE__ */ e.jsx(
|
|
1751
|
+
/* @__PURE__ */ e.jsx(Me, { className: "w-5 h-5 flex-shrink-0" }),
|
|
2104
1752
|
/* @__PURE__ */ e.jsxs("span", { className: "truncate", children: [
|
|
2105
|
-
|
|
1753
|
+
h === "edit" ? "Update to" : "Create New",
|
|
2106
1754
|
": ",
|
|
2107
|
-
|
|
1755
|
+
x.trim()
|
|
2108
1756
|
] })
|
|
2109
1757
|
] })
|
|
2110
1758
|
}
|
|
@@ -2113,34 +1761,34 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
2113
1761
|
] })
|
|
2114
1762
|
) : (
|
|
2115
1763
|
/* Show all options when no search query */
|
|
2116
|
-
/* @__PURE__ */ e.jsx("div", { className: "space-y-1", children:
|
|
1764
|
+
/* @__PURE__ */ e.jsx("div", { className: "space-y-1", children: t.options && t.options.length > 0 ? t.options.map((s) => /* @__PURE__ */ e.jsx("div", { className: "group relative", children: /* @__PURE__ */ e.jsx(
|
|
2117
1765
|
"button",
|
|
2118
1766
|
{
|
|
2119
1767
|
type: "button",
|
|
2120
|
-
onClick: (
|
|
2121
|
-
|
|
1768
|
+
onClick: (a) => {
|
|
1769
|
+
a.preventDefault(), a.stopPropagation(), T(s.value);
|
|
2122
1770
|
},
|
|
2123
|
-
className: `w-full text-left px-4 py-3 rounded-lg transition-all duration-200 break-words whitespace-normal ${
|
|
1771
|
+
className: `w-full text-left px-4 py-3 rounded-lg transition-all duration-200 break-words whitespace-normal ${r === s.value ? "bg-violet-100 dark:bg-violet-600/20 text-violet-900 dark:text-violet-300 font-semibold" : "hover:bg-slate-100 dark:hover:bg-slate-700 text-slate-700 dark:text-slate-300"}`,
|
|
2124
1772
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2125
|
-
/* @__PURE__ */ e.jsx("span", { className: "flex-1", children:
|
|
2126
|
-
|
|
1773
|
+
/* @__PURE__ */ e.jsx("span", { className: "flex-1", children: s.label }),
|
|
1774
|
+
t.onEditRank && !t.disabled && /* @__PURE__ */ e.jsx(
|
|
2127
1775
|
"button",
|
|
2128
1776
|
{
|
|
2129
1777
|
type: "button",
|
|
2130
|
-
onClick: (
|
|
1778
|
+
onClick: (a) => Y(s, a),
|
|
2131
1779
|
className: "opacity-0 group-hover:opacity-100 transition-opacity ml-2 p-1.5 rounded-md hover:bg-white dark:hover:bg-slate-600 text-slate-500 hover:text-violet-600 dark:text-slate-400 dark:hover:text-violet-400",
|
|
2132
1780
|
title: "Edit this rank",
|
|
2133
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1781
|
+
children: /* @__PURE__ */ e.jsx(oe, { className: "w-3.5 h-3.5" })
|
|
2134
1782
|
}
|
|
2135
1783
|
)
|
|
2136
1784
|
] })
|
|
2137
1785
|
}
|
|
2138
|
-
) },
|
|
1786
|
+
) }, s.value)) : /* @__PURE__ */ e.jsx("div", { className: "text-center py-8", children: /* @__PURE__ */ e.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: "No options available" }) }) })
|
|
2139
1787
|
) })
|
|
2140
1788
|
] }),
|
|
2141
1789
|
/* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0 px-6 py-3 border-t border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-800/50", children: /* @__PURE__ */ e.jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-400 text-center", children: [
|
|
2142
|
-
!
|
|
2143
|
-
|
|
1790
|
+
!i && (w ? `${w.length} option${w.length !== 1 ? "s" : ""} available` : ""),
|
|
1791
|
+
i && "Edit the rank designation and save changes"
|
|
2144
1792
|
] }) })
|
|
2145
1793
|
] })
|
|
2146
1794
|
}
|
|
@@ -2149,35 +1797,35 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
2149
1797
|
)
|
|
2150
1798
|
] });
|
|
2151
1799
|
case "select":
|
|
2152
|
-
return
|
|
1800
|
+
return t.searchable ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2153
1801
|
/* @__PURE__ */ e.jsxs(
|
|
2154
1802
|
"button",
|
|
2155
1803
|
{
|
|
2156
1804
|
type: "button",
|
|
2157
|
-
onClick: (
|
|
2158
|
-
|
|
1805
|
+
onClick: (s) => {
|
|
1806
|
+
s.preventDefault(), s.stopPropagation(), t.disabled || N(!0);
|
|
2159
1807
|
},
|
|
2160
|
-
disabled:
|
|
2161
|
-
className: `relative ${
|
|
1808
|
+
disabled: t.disabled,
|
|
1809
|
+
className: `relative ${$} ${F} flex items-center justify-between ${b ? "pl-12" : ""} pr-4 text-left disabled:opacity-50 disabled:cursor-not-allowed hover:border-violet-400 dark:hover:border-violet-500`,
|
|
2162
1810
|
children: [
|
|
2163
|
-
|
|
2164
|
-
/* @__PURE__ */ e.jsx("span", { className:
|
|
2165
|
-
/* @__PURE__ */ e.jsx(
|
|
1811
|
+
b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
|
|
1812
|
+
/* @__PURE__ */ e.jsx("span", { className: r ? "text-slate-900 dark:text-white truncate" : "text-slate-400", children: C() }),
|
|
1813
|
+
/* @__PURE__ */ e.jsx(ae, { className: "w-5 h-5 text-slate-400" })
|
|
2166
1814
|
]
|
|
2167
1815
|
}
|
|
2168
1816
|
),
|
|
2169
|
-
|
|
1817
|
+
p && /* @__PURE__ */ e.jsx(
|
|
2170
1818
|
"div",
|
|
2171
1819
|
{
|
|
2172
1820
|
className: "fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-4 bg-black/50 backdrop-blur-sm animate-in fade-in duration-200",
|
|
2173
|
-
onMouseDown: (
|
|
2174
|
-
|
|
1821
|
+
onMouseDown: (s) => {
|
|
1822
|
+
s.target === s.currentTarget && (s.preventDefault(), s.stopPropagation(), V());
|
|
2175
1823
|
},
|
|
2176
1824
|
children: /* @__PURE__ */ e.jsxs(
|
|
2177
1825
|
"div",
|
|
2178
1826
|
{
|
|
2179
1827
|
className: "bg-white dark:bg-slate-800 rounded-2xl shadow-2xl w-full max-w-md max-h-[70vh] sm:max-h-[80vh] flex flex-col border border-slate-200 dark:border-slate-700 animate-in zoom-in-95 duration-200",
|
|
2180
|
-
onMouseDown: (
|
|
1828
|
+
onMouseDown: (s) => s.stopPropagation(),
|
|
2181
1829
|
children: [
|
|
2182
1830
|
/* @__PURE__ */ e.jsxs("div", { className: `flex items-center justify-between gap-3
|
|
2183
1831
|
px-4 py-3 sm:px-5 sm:py-4
|
|
@@ -2185,49 +1833,49 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
2185
1833
|
dark:from-slate-700/50 dark:via-slate-800/50 dark:to-slate-700/50
|
|
2186
1834
|
border-b border-slate-200 dark:border-slate-700 rounded-t-2xl`, children: [
|
|
2187
1835
|
/* @__PURE__ */ e.jsxs("div", { className: "min-w-0", children: [
|
|
2188
|
-
/* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-bold text-slate-900 dark:text-white", children:
|
|
2189
|
-
|
|
1836
|
+
/* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-bold text-slate-900 dark:text-white", children: t.modalTitle || "Select Option" }),
|
|
1837
|
+
t.modalSubtitle && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 mt-0.5", children: t.modalSubtitle })
|
|
2190
1838
|
] }),
|
|
2191
1839
|
/* @__PURE__ */ e.jsx(
|
|
2192
1840
|
"button",
|
|
2193
1841
|
{
|
|
2194
1842
|
type: "button",
|
|
2195
|
-
onClick: (
|
|
2196
|
-
|
|
1843
|
+
onClick: (s) => {
|
|
1844
|
+
s.preventDefault(), s.stopPropagation(), V();
|
|
2197
1845
|
},
|
|
2198
1846
|
className: `flex-shrink-0 p-1.5 rounded-lg border transition-all duration-200
|
|
2199
1847
|
text-slate-400 hover:bg-slate-100 hover:text-slate-900
|
|
2200
1848
|
border-slate-200/50 dark:border-slate-700/50
|
|
2201
1849
|
dark:hover:bg-slate-700 dark:hover:text-white`,
|
|
2202
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1850
|
+
children: /* @__PURE__ */ e.jsx(X, { className: "w-4 h-4" })
|
|
2203
1851
|
}
|
|
2204
1852
|
)
|
|
2205
1853
|
] }),
|
|
2206
1854
|
/* @__PURE__ */ e.jsx("div", { className: "p-4 border-b border-slate-200 dark:border-slate-700", children: /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
2207
|
-
/* @__PURE__ */ e.jsx(
|
|
1855
|
+
/* @__PURE__ */ e.jsx(le, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400" }),
|
|
2208
1856
|
/* @__PURE__ */ e.jsx(
|
|
2209
1857
|
"input",
|
|
2210
1858
|
{
|
|
2211
1859
|
type: "text",
|
|
2212
|
-
value:
|
|
2213
|
-
onChange: (
|
|
1860
|
+
value: x,
|
|
1861
|
+
onChange: (s) => m(s.target.value),
|
|
2214
1862
|
placeholder: "Search...",
|
|
2215
1863
|
className: "w-full pl-10 pr-4 py-2.5 rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 text-slate-900 dark:text-white placeholder-slate-400 focus:border-violet-500 focus:ring-2 focus:ring-violet-500/20 transition-all",
|
|
2216
1864
|
autoFocus: !0
|
|
2217
1865
|
}
|
|
2218
1866
|
)
|
|
2219
1867
|
] }) }),
|
|
2220
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children:
|
|
1868
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children: w.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "space-y-1", children: w.map((s) => /* @__PURE__ */ e.jsx(
|
|
2221
1869
|
"button",
|
|
2222
1870
|
{
|
|
2223
1871
|
type: "button",
|
|
2224
|
-
onClick: (
|
|
2225
|
-
|
|
1872
|
+
onClick: (a) => {
|
|
1873
|
+
a.preventDefault(), a.stopPropagation(), T(s.value);
|
|
2226
1874
|
},
|
|
2227
|
-
className: `w-full text-left px-4 py-3 rounded-lg transition-all duration-200 break-all whitespace-normal ${
|
|
2228
|
-
children:
|
|
1875
|
+
className: `w-full text-left px-4 py-3 rounded-lg transition-all duration-200 break-all whitespace-normal ${r === s.value ? "bg-violet-100 dark:bg-violet-600/20 text-violet-900 dark:text-violet-300 font-semibold" : "hover:bg-slate-100 dark:hover:bg-slate-700 text-slate-700 dark:text-slate-300"}`,
|
|
1876
|
+
children: s.label
|
|
2229
1877
|
},
|
|
2230
|
-
|
|
1878
|
+
s.value
|
|
2231
1879
|
)) }) : /* @__PURE__ */ e.jsx("div", { className: "text-center py-8", children: /* @__PURE__ */ e.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: "No options found" }) }) })
|
|
2232
1880
|
]
|
|
2233
1881
|
}
|
|
@@ -2235,71 +1883,71 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
2235
1883
|
}
|
|
2236
1884
|
)
|
|
2237
1885
|
] }) : /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
2238
|
-
|
|
1886
|
+
b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
|
|
2239
1887
|
/* @__PURE__ */ e.jsxs(
|
|
2240
1888
|
"select",
|
|
2241
1889
|
{
|
|
2242
|
-
value:
|
|
2243
|
-
onChange:
|
|
2244
|
-
disabled:
|
|
2245
|
-
className: `${
|
|
1890
|
+
value: r,
|
|
1891
|
+
onChange: D,
|
|
1892
|
+
disabled: t.disabled,
|
|
1893
|
+
className: `${$} ${F} ${b ? "pl-12" : ""} pr-10 appearance-none cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-violet-500/20`,
|
|
2246
1894
|
children: [
|
|
2247
|
-
/* @__PURE__ */ e.jsx("option", { value: "", children:
|
|
2248
|
-
(
|
|
1895
|
+
/* @__PURE__ */ e.jsx("option", { value: "", children: t.placeholder || "Select an option" }),
|
|
1896
|
+
(H = t.options) == null ? void 0 : H.map((s) => /* @__PURE__ */ e.jsx("option", { value: s.value, children: s.label }, s.value))
|
|
2249
1897
|
]
|
|
2250
1898
|
}
|
|
2251
1899
|
),
|
|
2252
|
-
/* @__PURE__ */ e.jsx(
|
|
1900
|
+
/* @__PURE__ */ e.jsx(ae, { className: "absolute right-4 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400 pointer-events-none" })
|
|
2253
1901
|
] });
|
|
2254
1902
|
case "date":
|
|
2255
1903
|
case "number":
|
|
2256
1904
|
return /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
2257
|
-
|
|
1905
|
+
b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
|
|
2258
1906
|
/* @__PURE__ */ e.jsx(
|
|
2259
1907
|
"input",
|
|
2260
1908
|
{
|
|
2261
|
-
type:
|
|
2262
|
-
value:
|
|
2263
|
-
onChange: (
|
|
2264
|
-
disabled:
|
|
2265
|
-
min:
|
|
2266
|
-
max:
|
|
2267
|
-
step:
|
|
2268
|
-
className: `${
|
|
1909
|
+
type: t.type,
|
|
1910
|
+
value: r,
|
|
1911
|
+
onChange: (s) => n(t.name, s.target.value),
|
|
1912
|
+
disabled: t.disabled,
|
|
1913
|
+
min: t.min,
|
|
1914
|
+
max: t.max,
|
|
1915
|
+
step: t.step,
|
|
1916
|
+
className: `${$} ${F} ${b ? "pl-12" : ""} disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-violet-500/20`
|
|
2269
1917
|
}
|
|
2270
1918
|
)
|
|
2271
1919
|
] });
|
|
2272
1920
|
case "textarea":
|
|
2273
|
-
return
|
|
2274
|
-
|
|
1921
|
+
return t.isHtml ? t.disabled ? /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
1922
|
+
b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-3 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
|
|
2275
1923
|
/* @__PURE__ */ e.jsx(
|
|
2276
1924
|
"div",
|
|
2277
1925
|
{
|
|
2278
|
-
className: `${
|
|
2279
|
-
style: { minHeight: `${(
|
|
2280
|
-
dangerouslySetInnerHTML: { __html:
|
|
1926
|
+
className: `${$} ${F} ${b ? "pl-12" : ""} opacity-50 cursor-not-allowed prose prose-sm max-w-none [&>*]:my-0.5 [&>ul]:list-disc [&>ul]:pl-4 [&>ol]:list-decimal [&>ol]:pl-4`,
|
|
1927
|
+
style: { minHeight: `${(t.rows || 4) * 1.75 + 1.5}rem` },
|
|
1928
|
+
dangerouslySetInnerHTML: { __html: r || "" }
|
|
2281
1929
|
}
|
|
2282
1930
|
)
|
|
2283
|
-
] }) :
|
|
2284
|
-
content:
|
|
2285
|
-
onChange: (
|
|
2286
|
-
height:
|
|
2287
|
-
rows:
|
|
1931
|
+
] }) : t.renderHtmlEditor ? t.renderHtmlEditor({
|
|
1932
|
+
content: r || "",
|
|
1933
|
+
onChange: (s) => n(t.name, s),
|
|
1934
|
+
height: t.height || 200,
|
|
1935
|
+
rows: t.rows || 4
|
|
2288
1936
|
}) : /* @__PURE__ */ e.jsxs("div", { className: "p-3 bg-amber-50 text-amber-800 rounded-xl border border-amber-200 text-sm", children: [
|
|
2289
1937
|
"HTML Editor component not provided. Please pass ",
|
|
2290
1938
|
/* @__PURE__ */ e.jsx("code", { children: "renderHtmlEditor" }),
|
|
2291
1939
|
" to this field configuration."
|
|
2292
1940
|
] }) : /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
2293
|
-
|
|
1941
|
+
b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-3 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
|
|
2294
1942
|
/* @__PURE__ */ e.jsx(
|
|
2295
1943
|
"textarea",
|
|
2296
1944
|
{
|
|
2297
|
-
value:
|
|
2298
|
-
onChange: (
|
|
2299
|
-
placeholder:
|
|
2300
|
-
disabled:
|
|
2301
|
-
rows:
|
|
2302
|
-
className: `${
|
|
1945
|
+
value: r,
|
|
1946
|
+
onChange: (s) => n(t.name, s.target.value),
|
|
1947
|
+
placeholder: t.placeholder,
|
|
1948
|
+
disabled: t.disabled,
|
|
1949
|
+
rows: t.rows || 4,
|
|
1950
|
+
className: `${$} ${F} ${b ? "pl-12" : ""} placeholder-slate-400 resize-none disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-violet-500/20`
|
|
2303
1951
|
}
|
|
2304
1952
|
)
|
|
2305
1953
|
] });
|
|
@@ -2309,110 +1957,110 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
2309
1957
|
"input",
|
|
2310
1958
|
{
|
|
2311
1959
|
type: "checkbox",
|
|
2312
|
-
checked:
|
|
2313
|
-
onChange: (
|
|
2314
|
-
disabled:
|
|
1960
|
+
checked: r || !1,
|
|
1961
|
+
onChange: (s) => n(t.name, s.target.checked),
|
|
1962
|
+
disabled: t.disabled,
|
|
2315
1963
|
className: "h-5 w-5 rounded border-slate-300 text-violet-600 focus:ring-violet-500 dark:border-slate-600 dark:bg-slate-700 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
2316
1964
|
}
|
|
2317
1965
|
),
|
|
2318
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium text-slate-700 dark:text-slate-300", children:
|
|
1966
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium text-slate-700 dark:text-slate-300", children: t.checkboxLabel || t.label })
|
|
2319
1967
|
] });
|
|
2320
1968
|
case "toggle":
|
|
2321
1969
|
return /* @__PURE__ */ e.jsx(
|
|
2322
|
-
|
|
1970
|
+
Pe,
|
|
2323
1971
|
{
|
|
2324
|
-
checked:
|
|
2325
|
-
onChange:
|
|
2326
|
-
disabled:
|
|
2327
|
-
label:
|
|
2328
|
-
name:
|
|
2329
|
-
helpText:
|
|
1972
|
+
checked: r || !1,
|
|
1973
|
+
onChange: n,
|
|
1974
|
+
disabled: t.disabled,
|
|
1975
|
+
label: t.toggleLabel,
|
|
1976
|
+
name: t.name,
|
|
1977
|
+
helpText: t.helpText
|
|
2330
1978
|
}
|
|
2331
1979
|
);
|
|
2332
1980
|
case "radio":
|
|
2333
|
-
return /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap items-center gap-3 sm:gap-6", children: (
|
|
1981
|
+
return /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap items-center gap-3 sm:gap-6", children: (G = t.options) == null ? void 0 : G.map((s) => /* @__PURE__ */ e.jsxs(
|
|
2334
1982
|
"label",
|
|
2335
1983
|
{
|
|
2336
|
-
className: `flex items-center cursor-pointer ${
|
|
1984
|
+
className: `flex items-center cursor-pointer ${t.disabled ? "opacity-50 cursor-not-allowed" : ""}`,
|
|
2337
1985
|
children: [
|
|
2338
1986
|
/* @__PURE__ */ e.jsx(
|
|
2339
1987
|
"input",
|
|
2340
1988
|
{
|
|
2341
1989
|
type: "radio",
|
|
2342
|
-
name:
|
|
2343
|
-
value:
|
|
2344
|
-
checked:
|
|
2345
|
-
onChange: (
|
|
2346
|
-
disabled:
|
|
1990
|
+
name: t.name,
|
|
1991
|
+
value: s.value,
|
|
1992
|
+
checked: r === s.value,
|
|
1993
|
+
onChange: (a) => n(t.name, a.target.value),
|
|
1994
|
+
disabled: t.disabled,
|
|
2347
1995
|
className: "h-4 w-4 text-violet-600 border-slate-300 focus:ring-2 focus:ring-violet-500 cursor-pointer disabled:cursor-not-allowed dark:border-slate-600 dark:bg-slate-700"
|
|
2348
1996
|
}
|
|
2349
1997
|
),
|
|
2350
|
-
/* @__PURE__ */ e.jsx("span", { className: `ml-2 text-sm ${
|
|
1998
|
+
/* @__PURE__ */ e.jsx("span", { className: `ml-2 text-sm ${r === s.value ? "font-medium text-violet-900 dark:text-violet-300" : "text-slate-700 dark:text-slate-300"}`, children: s.label })
|
|
2351
1999
|
]
|
|
2352
2000
|
},
|
|
2353
|
-
|
|
2001
|
+
s.value
|
|
2354
2002
|
)) });
|
|
2355
2003
|
case "file": {
|
|
2356
|
-
const
|
|
2004
|
+
const s = ve.useRef(null), a = Array.isArray(r) ? r : [];
|
|
2357
2005
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
|
|
2358
2006
|
/* @__PURE__ */ e.jsxs("div", { className: "relative flex items-center", children: [
|
|
2359
|
-
|
|
2007
|
+
b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
|
|
2360
2008
|
/* @__PURE__ */ e.jsx(
|
|
2361
2009
|
"div",
|
|
2362
2010
|
{
|
|
2363
2011
|
onClick: () => {
|
|
2364
|
-
var
|
|
2365
|
-
return !
|
|
2012
|
+
var o;
|
|
2013
|
+
return !t.disabled && ((o = s.current) == null ? void 0 : o.click());
|
|
2366
2014
|
},
|
|
2367
|
-
className: `w-full px-4 py-3 rounded-xl border transition-all duration-200 bg-white dark:bg-slate-800 text-slate-900 dark:text-white ${
|
|
2368
|
-
children: /* @__PURE__ */ e.jsx("span", { className: "text-slate-400 dark:text-slate-500 text-sm", children:
|
|
2015
|
+
className: `w-full px-4 py-3 rounded-xl border transition-all duration-200 bg-white dark:bg-slate-800 text-slate-900 dark:text-white ${b ? "pl-12" : "pl-4"} pr-14 cursor-pointer select-none ${t.disabled ? "opacity-50 cursor-not-allowed border-slate-300 dark:border-slate-600" : "border-slate-300 dark:border-slate-600 hover:border-violet-400 dark:hover:border-violet-500"} ${l ? "border-red-300 dark:border-red-700" : ""}`,
|
|
2016
|
+
children: /* @__PURE__ */ e.jsx("span", { className: "text-slate-400 dark:text-slate-500 text-sm", children: a.length > 0 ? `${a.length} file${a.length !== 1 ? "s" : ""} selected` : t.placeholder || "Select files to upload..." })
|
|
2369
2017
|
}
|
|
2370
2018
|
),
|
|
2371
2019
|
/* @__PURE__ */ e.jsx(
|
|
2372
2020
|
"button",
|
|
2373
2021
|
{
|
|
2374
2022
|
type: "button",
|
|
2375
|
-
disabled:
|
|
2023
|
+
disabled: t.disabled,
|
|
2376
2024
|
onClick: () => {
|
|
2377
|
-
var
|
|
2378
|
-
return (
|
|
2025
|
+
var o;
|
|
2026
|
+
return (o = s.current) == null ? void 0 : o.click();
|
|
2379
2027
|
},
|
|
2380
2028
|
className: "absolute right-2 top-1/2 -translate-y-1/2 p-2 rounded-lg bg-violet-600 hover:bg-violet-700 active:bg-violet-800 disabled:opacity-50 disabled:cursor-not-allowed text-white transition-colors",
|
|
2381
2029
|
title: "Browse files",
|
|
2382
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2030
|
+
children: /* @__PURE__ */ e.jsx(Se, { className: "w-4 h-4" })
|
|
2383
2031
|
}
|
|
2384
2032
|
),
|
|
2385
2033
|
/* @__PURE__ */ e.jsx(
|
|
2386
2034
|
"input",
|
|
2387
2035
|
{
|
|
2388
|
-
ref:
|
|
2036
|
+
ref: s,
|
|
2389
2037
|
type: "file",
|
|
2390
|
-
accept:
|
|
2391
|
-
multiple:
|
|
2038
|
+
accept: t.accept,
|
|
2039
|
+
multiple: t.multiple ?? !1,
|
|
2392
2040
|
className: "hidden",
|
|
2393
|
-
onChange: (
|
|
2394
|
-
|
|
2041
|
+
onChange: (o) => {
|
|
2042
|
+
t.onFilesSelected && t.onFilesSelected(o.target.files), o.target.value = "";
|
|
2395
2043
|
}
|
|
2396
2044
|
}
|
|
2397
2045
|
)
|
|
2398
2046
|
] }),
|
|
2399
|
-
|
|
2400
|
-
/* @__PURE__ */ e.jsx("div", { className: "w-8 h-8 rounded-lg bg-violet-100 dark:bg-violet-900/30 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ e.jsx(
|
|
2047
|
+
a.map(({ tempId: o, file: f, documentName: k }) => /* @__PURE__ */ e.jsxs("div", { className: "group flex items-center gap-3 px-4 py-3 rounded-xl border border-violet-200 dark:border-violet-700/40 bg-violet-50/50 dark:bg-violet-900/10 transition-colors", children: [
|
|
2048
|
+
/* @__PURE__ */ e.jsx("div", { className: "w-8 h-8 rounded-lg bg-violet-100 dark:bg-violet-900/30 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ e.jsx($e, { className: "w-4 h-4 text-violet-600 dark:text-violet-400" }) }),
|
|
2401
2049
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
2402
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-slate-800 dark:text-slate-200 truncate", children:
|
|
2403
|
-
(
|
|
2050
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-slate-800 dark:text-slate-200 truncate", children: k || (f == null ? void 0 : f.name) }),
|
|
2051
|
+
(f == null ? void 0 : f.size) !== void 0 && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-violet-600 dark:text-violet-400 mt-0.5", children: f.size < 1024 * 1024 ? `${(f.size / 1024).toFixed(1)} KB` : `${(f.size / (1024 * 1024)).toFixed(2)} MB` })
|
|
2404
2052
|
] }),
|
|
2405
|
-
|
|
2053
|
+
t.onRemove && /* @__PURE__ */ e.jsx(
|
|
2406
2054
|
"button",
|
|
2407
2055
|
{
|
|
2408
2056
|
type: "button",
|
|
2409
|
-
onClick: () =>
|
|
2057
|
+
onClick: () => t.onRemove(o),
|
|
2410
2058
|
className: "w-7 h-7 rounded-lg flex items-center justify-center text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 transition-all flex-shrink-0 opacity-60 sm:opacity-0 sm:group-hover:opacity-100",
|
|
2411
2059
|
title: "Remove",
|
|
2412
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2060
|
+
children: /* @__PURE__ */ e.jsx(Le, { className: "w-3.5 h-3.5" })
|
|
2413
2061
|
}
|
|
2414
2062
|
)
|
|
2415
|
-
] },
|
|
2063
|
+
] }, o))
|
|
2416
2064
|
] });
|
|
2417
2065
|
}
|
|
2418
2066
|
case "text":
|
|
@@ -2420,16 +2068,16 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
2420
2068
|
case "password":
|
|
2421
2069
|
default:
|
|
2422
2070
|
return /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
2423
|
-
|
|
2071
|
+
b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
|
|
2424
2072
|
/* @__PURE__ */ e.jsx(
|
|
2425
2073
|
"input",
|
|
2426
2074
|
{
|
|
2427
|
-
type:
|
|
2428
|
-
value:
|
|
2429
|
-
onChange: (
|
|
2430
|
-
placeholder:
|
|
2431
|
-
disabled:
|
|
2432
|
-
className: `${
|
|
2075
|
+
type: t.type,
|
|
2076
|
+
value: t.displayValue ?? r ?? "",
|
|
2077
|
+
onChange: (s) => n(t.name, s.target.value),
|
|
2078
|
+
placeholder: t.placeholder,
|
|
2079
|
+
disabled: t.disabled,
|
|
2080
|
+
className: `${$} ${F} ${b ? "pl-12" : ""} placeholder-slate-400 disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-violet-500/20`
|
|
2433
2081
|
}
|
|
2434
2082
|
)
|
|
2435
2083
|
] });
|
|
@@ -2437,112 +2085,112 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
2437
2085
|
};
|
|
2438
2086
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
2439
2087
|
/* @__PURE__ */ e.jsx("label", { className: "block", children: /* @__PURE__ */ e.jsxs("span", { className: "text-sm font-semibold text-slate-700 dark:text-slate-300 flex items-center space-x-1", children: [
|
|
2440
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
2441
|
-
|
|
2088
|
+
/* @__PURE__ */ e.jsx("span", { children: t.label }),
|
|
2089
|
+
t.required && /* @__PURE__ */ e.jsx("span", { className: "text-red-500 dark:text-red-400", children: "*" })
|
|
2442
2090
|
] }) }),
|
|
2443
|
-
/* @__PURE__ */ e.jsx("div", { className: "mt-2", children:
|
|
2444
|
-
|
|
2445
|
-
/* @__PURE__ */ e.jsx(
|
|
2446
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
2091
|
+
/* @__PURE__ */ e.jsx("div", { className: "mt-2", children: A() }),
|
|
2092
|
+
l && /* @__PURE__ */ e.jsxs("p", { className: "text-xs sm:text-sm text-red-600 dark:text-red-400 flex items-center gap-1.5 animate-in slide-in-from-top-1 duration-200", children: [
|
|
2093
|
+
/* @__PURE__ */ e.jsx(he, { className: "w-3.5 h-3.5 flex-shrink-0" }),
|
|
2094
|
+
/* @__PURE__ */ e.jsx("span", { children: l })
|
|
2447
2095
|
] }),
|
|
2448
|
-
|
|
2096
|
+
t.helpText && !l && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: t.helpText })
|
|
2449
2097
|
] });
|
|
2450
|
-
},
|
|
2451
|
-
fields:
|
|
2452
|
-
initialData:
|
|
2453
|
-
onSubmit:
|
|
2454
|
-
onCancel:
|
|
2455
|
-
onEdit:
|
|
2456
|
-
onFieldChange:
|
|
2457
|
-
submitButtonText:
|
|
2458
|
-
cancelButtonText:
|
|
2459
|
-
editButtonText:
|
|
2460
|
-
showEditingBadge:
|
|
2461
|
-
editingEntity:
|
|
2462
|
-
helpText:
|
|
2463
|
-
isModal:
|
|
2464
|
-
mode:
|
|
2465
|
-
disabled:
|
|
2098
|
+
}, Ke = ({
|
|
2099
|
+
fields: t = [],
|
|
2100
|
+
initialData: r = {},
|
|
2101
|
+
onSubmit: n,
|
|
2102
|
+
onCancel: l,
|
|
2103
|
+
onEdit: c,
|
|
2104
|
+
onFieldChange: h,
|
|
2105
|
+
submitButtonText: x = "Submit",
|
|
2106
|
+
cancelButtonText: m = "Cancel",
|
|
2107
|
+
editButtonText: p = "Edit",
|
|
2108
|
+
showEditingBadge: N = !1,
|
|
2109
|
+
editingEntity: S = "",
|
|
2110
|
+
helpText: R = "All fields marked with * are required",
|
|
2111
|
+
isModal: y = !0,
|
|
2112
|
+
mode: E = "edit",
|
|
2113
|
+
disabled: M = !1,
|
|
2466
2114
|
// ✅ Add disabled prop for loading states
|
|
2467
|
-
renderCustomField:
|
|
2115
|
+
renderCustomField: g
|
|
2468
2116
|
}) => {
|
|
2469
|
-
const
|
|
2117
|
+
const i = K(!0), [j, D] = z(() => {
|
|
2470
2118
|
const d = {};
|
|
2471
|
-
return (typeof
|
|
2472
|
-
d[
|
|
2119
|
+
return (typeof t == "function" ? t(r) : t).forEach((C) => {
|
|
2120
|
+
d[C.name] = r[C.name] || "";
|
|
2473
2121
|
}), d;
|
|
2474
|
-
}), [
|
|
2475
|
-
|
|
2476
|
-
if (
|
|
2477
|
-
|
|
2122
|
+
}), [T, V] = z({}), I = E === "view", Y = I ? !0 : !y;
|
|
2123
|
+
J(() => {
|
|
2124
|
+
if (i.current) {
|
|
2125
|
+
i.current = !1;
|
|
2478
2126
|
return;
|
|
2479
2127
|
}
|
|
2480
|
-
if (
|
|
2481
|
-
const
|
|
2482
|
-
(typeof
|
|
2483
|
-
|
|
2484
|
-
}),
|
|
2128
|
+
if (r && Object.keys(r).length > 0 && r.id) {
|
|
2129
|
+
const v = {};
|
|
2130
|
+
(typeof t == "function" ? t(j) : t).forEach((A) => {
|
|
2131
|
+
v[A.name] = r[A.name] || "";
|
|
2132
|
+
}), D(v);
|
|
2485
2133
|
}
|
|
2486
|
-
}, [
|
|
2487
|
-
const
|
|
2488
|
-
if (
|
|
2489
|
-
const
|
|
2490
|
-
|
|
2491
|
-
const
|
|
2492
|
-
delete
|
|
2493
|
-
var
|
|
2494
|
-
if ((
|
|
2495
|
-
const
|
|
2496
|
-
|
|
2134
|
+
}, [r.id]);
|
|
2135
|
+
const U = typeof t == "function" ? t(j) : t, B = (d, v) => {
|
|
2136
|
+
if (I) return;
|
|
2137
|
+
const C = { ...j, [d]: v };
|
|
2138
|
+
D(C);
|
|
2139
|
+
const A = { ...T };
|
|
2140
|
+
delete A[d], U.forEach((O) => {
|
|
2141
|
+
var b;
|
|
2142
|
+
if ((b = O.validation) != null && b.custom && A[O.name]) {
|
|
2143
|
+
const $ = O.name === d ? v : j[O.name];
|
|
2144
|
+
O.validation.custom($, C) === !0 && delete A[O.name];
|
|
2497
2145
|
}
|
|
2498
|
-
}),
|
|
2499
|
-
},
|
|
2500
|
-
if (
|
|
2146
|
+
}), V(A), h && h(d, v, C);
|
|
2147
|
+
}, w = () => {
|
|
2148
|
+
if (I) return !0;
|
|
2501
2149
|
const d = {};
|
|
2502
|
-
return
|
|
2503
|
-
const
|
|
2504
|
-
if (
|
|
2505
|
-
d[
|
|
2150
|
+
return U.forEach((v) => {
|
|
2151
|
+
const C = j[v.name], A = v.isHtml ? !(C || "").replace(/<[^>]*>/g, "").trim() : !C;
|
|
2152
|
+
if (v.required && A) {
|
|
2153
|
+
d[v.name] = `${v.label} is required`;
|
|
2506
2154
|
return;
|
|
2507
2155
|
}
|
|
2508
|
-
if (
|
|
2509
|
-
const { minLength:
|
|
2510
|
-
if (
|
|
2511
|
-
d[
|
|
2156
|
+
if (v.validation && C) {
|
|
2157
|
+
const { minLength: O, maxLength: b, pattern: $, custom: F } = v.validation, H = v.isHtml ? (C || "").replace(/<[^>]*>/g, "").trim() : C;
|
|
2158
|
+
if (O && H.length < O) {
|
|
2159
|
+
d[v.name] = `Minimum ${O} characters required`;
|
|
2512
2160
|
return;
|
|
2513
2161
|
}
|
|
2514
|
-
if (
|
|
2515
|
-
d[
|
|
2162
|
+
if (b && H.length > b) {
|
|
2163
|
+
d[v.name] = `Maximum ${b} characters allowed`;
|
|
2516
2164
|
return;
|
|
2517
2165
|
}
|
|
2518
|
-
if (
|
|
2519
|
-
d[
|
|
2166
|
+
if ($ && !$.test(C)) {
|
|
2167
|
+
d[v.name] = v.validation.patternMessage || v.validation.message || "Invalid format";
|
|
2520
2168
|
return;
|
|
2521
2169
|
}
|
|
2522
|
-
if (
|
|
2523
|
-
const
|
|
2524
|
-
if (
|
|
2525
|
-
d[
|
|
2170
|
+
if (F) {
|
|
2171
|
+
const G = F(C, j);
|
|
2172
|
+
if (G !== !0) {
|
|
2173
|
+
d[v.name] = typeof G == "string" ? G : v.validation.message || "Validation failed";
|
|
2526
2174
|
return;
|
|
2527
2175
|
}
|
|
2528
2176
|
}
|
|
2529
2177
|
}
|
|
2530
|
-
}),
|
|
2531
|
-
},
|
|
2532
|
-
d.preventDefault(), !
|
|
2178
|
+
}), V(d), Object.keys(d).length === 0;
|
|
2179
|
+
}, W = (d) => {
|
|
2180
|
+
d.preventDefault(), !I && w() && n(j);
|
|
2533
2181
|
};
|
|
2534
|
-
return /* @__PURE__ */ e.jsxs("form", { onSubmit:
|
|
2182
|
+
return /* @__PURE__ */ e.jsxs("form", { onSubmit: W, className: "flex flex-col h-full max-h-[75vh] sm:max-h-[70vh]", children: [
|
|
2535
2183
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 overflow-y-auto px-4 pt-4 sm:px-5 sm:pt-5", children: [
|
|
2536
|
-
|
|
2184
|
+
I && /* @__PURE__ */ e.jsxs("div", { className: `mb-4 flex items-center gap-3 p-3 sm:p-3.5 rounded-xl
|
|
2537
2185
|
bg-blue-50 border border-blue-200
|
|
2538
2186
|
dark:bg-blue-600/10 dark:border-blue-500/30`, children: [
|
|
2539
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0 p-1.5 rounded-lg bg-blue-600 dark:bg-blue-500", children: /* @__PURE__ */ e.jsx(
|
|
2187
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0 p-1.5 rounded-lg bg-blue-600 dark:bg-blue-500", children: /* @__PURE__ */ e.jsx(re, { className: "w-3.5 h-3.5 text-white" }) }),
|
|
2540
2188
|
/* @__PURE__ */ e.jsxs("div", { className: "min-w-0", children: [
|
|
2541
2189
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-slate-900 dark:text-white leading-tight", children: "View Mode" }),
|
|
2542
2190
|
/* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 leading-snug", children: "Read-only — no changes will be saved" })
|
|
2543
2191
|
] })
|
|
2544
2192
|
] }),
|
|
2545
|
-
!
|
|
2193
|
+
!I && N && S && /* @__PURE__ */ e.jsxs("div", { className: `mb-4 flex items-center gap-3 p-3 sm:p-3.5 rounded-xl
|
|
2546
2194
|
bg-violet-50 border border-violet-200
|
|
2547
2195
|
dark:bg-violet-600/10 dark:border-violet-500/30`, children: [
|
|
2548
2196
|
/* @__PURE__ */ e.jsx("span", { className: "flex-shrink-0 w-2 h-2 rounded-full bg-violet-500 animate-pulse" }),
|
|
@@ -2551,64 +2199,64 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
2551
2199
|
/* @__PURE__ */ e.jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-400 truncate", children: [
|
|
2552
2200
|
"Modifying:",
|
|
2553
2201
|
" ",
|
|
2554
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-semibold text-violet-600 dark:text-violet-400", children:
|
|
2202
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-semibold text-violet-600 dark:text-violet-400", children: S })
|
|
2555
2203
|
] })
|
|
2556
2204
|
] })
|
|
2557
2205
|
] }),
|
|
2558
|
-
/* @__PURE__ */ e.jsx("div", { className: "space-y-4 pb-4", children:
|
|
2559
|
-
const
|
|
2560
|
-
if (
|
|
2561
|
-
const
|
|
2206
|
+
/* @__PURE__ */ e.jsx("div", { className: "space-y-4 pb-4", children: U.map((d, v) => {
|
|
2207
|
+
const C = j[d.name], A = T[d.name];
|
|
2208
|
+
if (g) {
|
|
2209
|
+
const O = g({
|
|
2562
2210
|
field: d,
|
|
2563
|
-
value:
|
|
2564
|
-
error:
|
|
2565
|
-
index:
|
|
2566
|
-
mode:
|
|
2567
|
-
disabled:
|
|
2568
|
-
onChange:
|
|
2211
|
+
value: C,
|
|
2212
|
+
error: A,
|
|
2213
|
+
index: v,
|
|
2214
|
+
mode: E,
|
|
2215
|
+
disabled: I || d.disabled || M,
|
|
2216
|
+
onChange: B
|
|
2569
2217
|
});
|
|
2570
|
-
if (
|
|
2218
|
+
if (O) return /* @__PURE__ */ e.jsx("div", { children: O }, d.name || v);
|
|
2571
2219
|
}
|
|
2572
2220
|
return /* @__PURE__ */ e.jsx(
|
|
2573
|
-
|
|
2221
|
+
we,
|
|
2574
2222
|
{
|
|
2575
|
-
field: { ...d, disabled:
|
|
2576
|
-
value:
|
|
2577
|
-
onChange:
|
|
2578
|
-
error:
|
|
2579
|
-
mode:
|
|
2223
|
+
field: { ...d, disabled: I || d.disabled || M },
|
|
2224
|
+
value: C,
|
|
2225
|
+
onChange: B,
|
|
2226
|
+
error: A,
|
|
2227
|
+
mode: E
|
|
2580
2228
|
},
|
|
2581
|
-
d.name ||
|
|
2229
|
+
d.name || v
|
|
2582
2230
|
);
|
|
2583
2231
|
}) })
|
|
2584
2232
|
] }),
|
|
2585
2233
|
/* @__PURE__ */ e.jsxs("div", { className: `flex-shrink-0 bg-white dark:bg-slate-800
|
|
2586
2234
|
border-t border-slate-200 dark:border-slate-700
|
|
2587
2235
|
px-4 py-3 sm:px-5 sm:py-4`, children: [
|
|
2588
|
-
|
|
2589
|
-
|
|
2236
|
+
I ? /* @__PURE__ */ e.jsxs("div", { className: `flex ${y ? "flex-col-reverse sm:flex-row" : "flex-row"} gap-2.5`, children: [
|
|
2237
|
+
Y && l && /* @__PURE__ */ e.jsxs(
|
|
2590
2238
|
"button",
|
|
2591
2239
|
{
|
|
2592
2240
|
type: "button",
|
|
2593
|
-
onClick:
|
|
2594
|
-
className: `${
|
|
2241
|
+
onClick: l,
|
|
2242
|
+
className: `${y ? "flex-1 sm:flex-none" : "w-auto"}
|
|
2595
2243
|
flex items-center justify-center gap-2
|
|
2596
2244
|
px-4 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200
|
|
2597
2245
|
bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200
|
|
2598
2246
|
dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300 dark:border-slate-600
|
|
2599
2247
|
hover:scale-[1.02] active:scale-[0.98]`,
|
|
2600
2248
|
children: [
|
|
2601
|
-
/* @__PURE__ */ e.jsx(
|
|
2249
|
+
/* @__PURE__ */ e.jsx(X, { className: "w-4 h-4" }),
|
|
2602
2250
|
/* @__PURE__ */ e.jsx("span", { children: "Close" })
|
|
2603
2251
|
]
|
|
2604
2252
|
}
|
|
2605
2253
|
),
|
|
2606
|
-
|
|
2254
|
+
c && /* @__PURE__ */ e.jsxs(
|
|
2607
2255
|
"button",
|
|
2608
2256
|
{
|
|
2609
2257
|
type: "button",
|
|
2610
|
-
onClick:
|
|
2611
|
-
className: `${
|
|
2258
|
+
onClick: c,
|
|
2259
|
+
className: `${y ? "flex-1" : "w-auto"}
|
|
2612
2260
|
flex items-center justify-center gap-2
|
|
2613
2261
|
px-4 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200
|
|
2614
2262
|
bg-gradient-to-r from-violet-600 to-indigo-600
|
|
@@ -2616,21 +2264,21 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
2616
2264
|
text-white shadow-md hover:shadow-lg
|
|
2617
2265
|
hover:scale-[1.02] active:scale-[0.98]`,
|
|
2618
2266
|
children: [
|
|
2619
|
-
/* @__PURE__ */ e.jsx(
|
|
2620
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
2267
|
+
/* @__PURE__ */ e.jsx(oe, { className: "w-4 h-4" }),
|
|
2268
|
+
/* @__PURE__ */ e.jsx("span", { children: p })
|
|
2621
2269
|
]
|
|
2622
2270
|
}
|
|
2623
2271
|
)
|
|
2624
2272
|
] }) : (
|
|
2625
2273
|
/* Edit mode actions */
|
|
2626
|
-
/* @__PURE__ */ e.jsxs("div", { className: `flex ${
|
|
2627
|
-
|
|
2274
|
+
/* @__PURE__ */ e.jsxs("div", { className: `flex ${y ? "flex-col-reverse sm:flex-row" : "flex-row justify-start"} gap-2.5`, children: [
|
|
2275
|
+
l && /* @__PURE__ */ e.jsxs(
|
|
2628
2276
|
"button",
|
|
2629
2277
|
{
|
|
2630
2278
|
type: "button",
|
|
2631
|
-
onClick:
|
|
2632
|
-
disabled:
|
|
2633
|
-
className: `${
|
|
2279
|
+
onClick: l,
|
|
2280
|
+
disabled: M,
|
|
2281
|
+
className: `${y ? "flex-1 sm:flex-none" : "w-auto"}
|
|
2634
2282
|
flex items-center justify-center gap-2
|
|
2635
2283
|
px-4 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200
|
|
2636
2284
|
bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200
|
|
@@ -2638,8 +2286,8 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
2638
2286
|
disabled:opacity-50 disabled:cursor-not-allowed
|
|
2639
2287
|
hover:scale-[1.02] active:scale-[0.98]`,
|
|
2640
2288
|
children: [
|
|
2641
|
-
/* @__PURE__ */ e.jsx(
|
|
2642
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
2289
|
+
/* @__PURE__ */ e.jsx(X, { className: "w-4 h-4" }),
|
|
2290
|
+
/* @__PURE__ */ e.jsx("span", { children: m })
|
|
2643
2291
|
]
|
|
2644
2292
|
}
|
|
2645
2293
|
),
|
|
@@ -2647,8 +2295,8 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
2647
2295
|
"button",
|
|
2648
2296
|
{
|
|
2649
2297
|
type: "submit",
|
|
2650
|
-
disabled:
|
|
2651
|
-
className: `${
|
|
2298
|
+
disabled: M,
|
|
2299
|
+
className: `${y ? "flex-1" : "w-auto"}
|
|
2652
2300
|
flex items-center justify-center gap-2
|
|
2653
2301
|
px-4 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200
|
|
2654
2302
|
bg-gradient-to-r from-violet-600 to-indigo-600
|
|
@@ -2657,80 +2305,80 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
2657
2305
|
disabled:opacity-50 disabled:cursor-not-allowed
|
|
2658
2306
|
hover:scale-[1.02] active:scale-[0.98] disabled:hover:scale-100`,
|
|
2659
2307
|
children: [
|
|
2660
|
-
|
|
2661
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
2308
|
+
M ? /* @__PURE__ */ e.jsx("span", { className: "w-4 h-4 rounded-full border-2 border-white/30 border-t-white animate-spin flex-shrink-0" }) : /* @__PURE__ */ e.jsx(re, { className: "w-4 h-4 flex-shrink-0" }),
|
|
2309
|
+
/* @__PURE__ */ e.jsx("span", { children: M ? "Saving..." : x })
|
|
2662
2310
|
]
|
|
2663
2311
|
}
|
|
2664
2312
|
)
|
|
2665
2313
|
] })
|
|
2666
2314
|
),
|
|
2667
|
-
!
|
|
2315
|
+
!I && R && /* @__PURE__ */ e.jsx("p", { className: "mt-2.5 text-xs text-slate-400 dark:text-slate-500 text-center", children: R })
|
|
2668
2316
|
] })
|
|
2669
2317
|
] });
|
|
2670
|
-
},
|
|
2671
|
-
isOpen:
|
|
2672
|
-
onClose:
|
|
2673
|
-
onSelect:
|
|
2674
|
-
options:
|
|
2675
|
-
selectedValue:
|
|
2676
|
-
title:
|
|
2677
|
-
subtitle:
|
|
2678
|
-
icon:
|
|
2679
|
-
searchable:
|
|
2680
|
-
searchPlaceholder:
|
|
2318
|
+
}, Fe = ({
|
|
2319
|
+
isOpen: t,
|
|
2320
|
+
onClose: r,
|
|
2321
|
+
onSelect: n,
|
|
2322
|
+
options: l = [],
|
|
2323
|
+
selectedValue: c,
|
|
2324
|
+
title: h = "Select Option",
|
|
2325
|
+
subtitle: x = "Choose from the list below",
|
|
2326
|
+
icon: m,
|
|
2327
|
+
searchable: p = !0,
|
|
2328
|
+
searchPlaceholder: N = "Search options..."
|
|
2681
2329
|
}) => {
|
|
2682
|
-
const [
|
|
2683
|
-
|
|
2684
|
-
const
|
|
2685
|
-
|
|
2330
|
+
const [S, R] = z(""), y = K(null);
|
|
2331
|
+
J(() => {
|
|
2332
|
+
const g = (i) => {
|
|
2333
|
+
i.key === "Escape" && r();
|
|
2686
2334
|
};
|
|
2687
|
-
return
|
|
2688
|
-
var
|
|
2689
|
-
return (
|
|
2690
|
-
}, 100)), () => document.removeEventListener("keydown",
|
|
2691
|
-
}, [
|
|
2692
|
-
const
|
|
2693
|
-
(
|
|
2694
|
-
) :
|
|
2695
|
-
|
|
2335
|
+
return t && (document.addEventListener("keydown", g), p && y.current && setTimeout(() => {
|
|
2336
|
+
var i;
|
|
2337
|
+
return (i = y.current) == null ? void 0 : i.focus();
|
|
2338
|
+
}, 100)), () => document.removeEventListener("keydown", g);
|
|
2339
|
+
}, [t, r, p]);
|
|
2340
|
+
const E = S ? l.filter(
|
|
2341
|
+
(g) => g.label.toLowerCase().includes(S.toLowerCase())
|
|
2342
|
+
) : l, M = (g) => {
|
|
2343
|
+
n(g), r(), R("");
|
|
2696
2344
|
};
|
|
2697
|
-
return
|
|
2345
|
+
return t ? /* @__PURE__ */ e.jsxs("div", { className: "fixed inset-0 z-[60] flex items-center justify-center p-4 animate-in fade-in duration-200", children: [
|
|
2698
2346
|
/* @__PURE__ */ e.jsx(
|
|
2699
2347
|
"div",
|
|
2700
2348
|
{
|
|
2701
2349
|
className: "absolute inset-0 bg-slate-900/60 backdrop-blur-sm",
|
|
2702
|
-
onClick:
|
|
2350
|
+
onClick: r
|
|
2703
2351
|
}
|
|
2704
2352
|
),
|
|
2705
2353
|
/* @__PURE__ */ e.jsx("div", { className: "relative w-full max-w-md animate-in zoom-in-95 duration-200", children: /* @__PURE__ */ e.jsxs("div", { className: "rounded-2xl border overflow-hidden bg-white border-slate-200/50 shadow-2xl dark:bg-slate-800 dark:border-slate-700/50 max-h-[80vh] flex flex-col", children: [
|
|
2706
2354
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-shrink-0 px-6 py-5 bg-gradient-to-r from-violet-50 via-indigo-50 to-violet-50 border-b border-slate-200 dark:bg-gradient-to-r dark:from-slate-700/50 dark:via-slate-800/50 dark:to-slate-700/50 dark:border-slate-700", children: [
|
|
2707
2355
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2708
2356
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-3", children: [
|
|
2709
|
-
|
|
2357
|
+
m && /* @__PURE__ */ e.jsx("div", { className: "w-12 h-12 rounded-xl flex items-center justify-center bg-gradient-to-br from-violet-600 to-indigo-600 shadow-lg", children: /* @__PURE__ */ e.jsx(m, { className: "w-6 h-6 text-white" }) }),
|
|
2710
2358
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
2711
|
-
/* @__PURE__ */ e.jsx("h3", { className: "text-lg font-bold text-slate-900 dark:text-white", children:
|
|
2712
|
-
|
|
2359
|
+
/* @__PURE__ */ e.jsx("h3", { className: "text-lg font-bold text-slate-900 dark:text-white", children: h }),
|
|
2360
|
+
x && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400 mt-0.5", children: x })
|
|
2713
2361
|
] })
|
|
2714
2362
|
] }),
|
|
2715
2363
|
/* @__PURE__ */ e.jsx(
|
|
2716
2364
|
"button",
|
|
2717
2365
|
{
|
|
2718
|
-
onClick:
|
|
2366
|
+
onClick: r,
|
|
2719
2367
|
className: "p-2 rounded-lg border transition-all duration-200 text-slate-400 hover:bg-slate-100 hover:text-slate-900 border-slate-300 hover:border-slate-400 dark:border-slate-600 dark:hover:bg-slate-700 dark:hover:text-white dark:hover:border-slate-500",
|
|
2720
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2368
|
+
children: /* @__PURE__ */ e.jsx(X, { className: "w-5 h-5" })
|
|
2721
2369
|
}
|
|
2722
2370
|
)
|
|
2723
2371
|
] }),
|
|
2724
|
-
|
|
2725
|
-
/* @__PURE__ */ e.jsx(
|
|
2372
|
+
p && /* @__PURE__ */ e.jsxs("div", { className: "mt-4 relative", children: [
|
|
2373
|
+
/* @__PURE__ */ e.jsx(le, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400 dark:text-slate-500" }),
|
|
2726
2374
|
/* @__PURE__ */ e.jsx(
|
|
2727
2375
|
"input",
|
|
2728
2376
|
{
|
|
2729
|
-
ref:
|
|
2377
|
+
ref: y,
|
|
2730
2378
|
type: "text",
|
|
2731
|
-
value:
|
|
2732
|
-
onChange: (
|
|
2733
|
-
placeholder:
|
|
2379
|
+
value: S,
|
|
2380
|
+
onChange: (g) => R(g.target.value),
|
|
2381
|
+
placeholder: N,
|
|
2734
2382
|
className: `w-full pl-11 pr-4 py-3 rounded-xl border transition-all duration-200
|
|
2735
2383
|
bg-white border-slate-200 text-slate-900 placeholder-slate-400
|
|
2736
2384
|
focus:border-violet-400 focus:bg-slate-50
|
|
@@ -2741,185 +2389,185 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
2741
2389
|
)
|
|
2742
2390
|
] })
|
|
2743
2391
|
] }),
|
|
2744
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex-grow overflow-y-auto custom-scrollbar", children:
|
|
2745
|
-
const
|
|
2392
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-grow overflow-y-auto custom-scrollbar", children: E.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "p-3 space-y-1", children: E.map((g) => {
|
|
2393
|
+
const i = g.value === c;
|
|
2746
2394
|
return /* @__PURE__ */ e.jsxs(
|
|
2747
2395
|
"button",
|
|
2748
2396
|
{
|
|
2749
2397
|
type: "button",
|
|
2750
|
-
onClick: () =>
|
|
2398
|
+
onClick: () => M(g.value),
|
|
2751
2399
|
className: `w-full px-4 py-3.5 rounded-xl text-left flex items-center justify-between transition-all duration-200 group
|
|
2752
|
-
${
|
|
2400
|
+
${i ? "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-lg shadow-violet-500/30 dark:shadow-violet-900/30" : "text-slate-700 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-700/50"}`,
|
|
2753
2401
|
children: [
|
|
2754
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-medium", children:
|
|
2755
|
-
|
|
2402
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-medium", children: g.label }),
|
|
2403
|
+
i && /* @__PURE__ */ e.jsx("div", { className: "w-6 h-6 rounded-full bg-white/20 flex items-center justify-center", children: /* @__PURE__ */ e.jsx(re, { className: "w-4 h-4 text-white" }) })
|
|
2756
2404
|
]
|
|
2757
2405
|
},
|
|
2758
|
-
|
|
2406
|
+
g.value
|
|
2759
2407
|
);
|
|
2760
2408
|
}) }) : /* @__PURE__ */ e.jsxs("div", { className: "px-4 py-12 text-center", children: [
|
|
2761
|
-
/* @__PURE__ */ e.jsx("div", { className: "w-16 h-16 mx-auto mb-4 rounded-full bg-slate-100 dark:bg-slate-700/50 flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
|
|
2409
|
+
/* @__PURE__ */ e.jsx("div", { className: "w-16 h-16 mx-auto mb-4 rounded-full bg-slate-100 dark:bg-slate-700/50 flex items-center justify-center", children: /* @__PURE__ */ e.jsx(le, { className: "w-8 h-8 text-slate-400 dark:text-slate-500" }) }),
|
|
2762
2410
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-slate-600 dark:text-slate-400", children: "No options found" }),
|
|
2763
2411
|
/* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-500 mt-1", children: "Try adjusting your search terms" })
|
|
2764
2412
|
] }) }),
|
|
2765
2413
|
/* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0 px-6 py-3 border-t border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-800/50", children: /* @__PURE__ */ e.jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-400 text-center", children: [
|
|
2766
|
-
|
|
2414
|
+
E.length,
|
|
2767
2415
|
" option",
|
|
2768
|
-
|
|
2416
|
+
E.length !== 1 ? "s" : "",
|
|
2769
2417
|
" available"
|
|
2770
2418
|
] }) })
|
|
2771
2419
|
] }) })
|
|
2772
2420
|
] }) : null;
|
|
2773
|
-
},
|
|
2774
|
-
value:
|
|
2775
|
-
onChange:
|
|
2776
|
-
options:
|
|
2777
|
-
placeholder:
|
|
2778
|
-
label:
|
|
2779
|
-
icon:
|
|
2780
|
-
required:
|
|
2781
|
-
disabled:
|
|
2782
|
-
error:
|
|
2783
|
-
searchable:
|
|
2784
|
-
name:
|
|
2785
|
-
modalTitle:
|
|
2786
|
-
modalSubtitle:
|
|
2421
|
+
}, et = ({
|
|
2422
|
+
value: t,
|
|
2423
|
+
onChange: r,
|
|
2424
|
+
options: n = [],
|
|
2425
|
+
placeholder: l = "Select an option",
|
|
2426
|
+
label: c,
|
|
2427
|
+
icon: h,
|
|
2428
|
+
required: x = !1,
|
|
2429
|
+
disabled: m = !1,
|
|
2430
|
+
error: p,
|
|
2431
|
+
searchable: N = !0,
|
|
2432
|
+
name: S,
|
|
2433
|
+
modalTitle: R,
|
|
2434
|
+
modalSubtitle: y
|
|
2787
2435
|
}) => {
|
|
2788
|
-
const [
|
|
2789
|
-
|
|
2436
|
+
const [E, M] = z(!1), g = n.find((D) => D.value === t), i = (g == null ? void 0 : g.label) || l, j = (D) => {
|
|
2437
|
+
r(S, D);
|
|
2790
2438
|
};
|
|
2791
2439
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2792
2440
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2441
|
+
c && /* @__PURE__ */ e.jsxs("label", { className: "flex items-center text-sm font-semibold text-slate-700 dark:text-slate-300", children: [
|
|
2442
|
+
h && /* @__PURE__ */ e.jsx(h, { className: "w-4 h-4 mr-2 text-violet-600 dark:text-violet-400" }),
|
|
2443
|
+
c,
|
|
2444
|
+
x && /* @__PURE__ */ e.jsx("span", { className: "text-red-500 ml-1", children: "*" })
|
|
2797
2445
|
] }),
|
|
2798
2446
|
/* @__PURE__ */ e.jsxs(
|
|
2799
2447
|
"button",
|
|
2800
2448
|
{
|
|
2801
2449
|
type: "button",
|
|
2802
|
-
onClick: () => !
|
|
2803
|
-
disabled:
|
|
2450
|
+
onClick: () => !m && M(!0),
|
|
2451
|
+
disabled: m,
|
|
2804
2452
|
className: `w-full px-4 py-3 rounded-xl border transition-all duration-200 flex items-center justify-between text-left
|
|
2805
|
-
${
|
|
2806
|
-
${
|
|
2453
|
+
${p ? "border-red-500 focus:border-red-500 focus:ring-red-500/20" : "border-slate-200 focus:border-violet-400 dark:border-slate-600 dark:focus:border-violet-500"}
|
|
2454
|
+
${m ? "opacity-50 cursor-not-allowed bg-slate-100 dark:bg-slate-800" : "bg-slate-50 hover:bg-white dark:bg-slate-700/50 dark:hover:bg-slate-700 cursor-pointer"}
|
|
2807
2455
|
text-slate-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-violet-500/20`,
|
|
2808
2456
|
children: [
|
|
2809
2457
|
/* @__PURE__ */ e.jsx(
|
|
2810
2458
|
"span",
|
|
2811
2459
|
{
|
|
2812
|
-
className: `text-sm ${
|
|
2813
|
-
children:
|
|
2460
|
+
className: `text-sm ${t ? "" : "text-slate-400 dark:text-slate-500"}`,
|
|
2461
|
+
children: i
|
|
2814
2462
|
}
|
|
2815
2463
|
),
|
|
2816
|
-
/* @__PURE__ */ e.jsx(
|
|
2464
|
+
/* @__PURE__ */ e.jsx(se, { className: "w-5 h-5 text-slate-400 dark:text-slate-500" })
|
|
2817
2465
|
]
|
|
2818
2466
|
}
|
|
2819
2467
|
),
|
|
2820
|
-
!
|
|
2821
|
-
/* @__PURE__ */ e.jsx("div", { className: "w-5 h-5 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
|
|
2468
|
+
!p && t && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2 mt-2", children: [
|
|
2469
|
+
/* @__PURE__ */ e.jsx("div", { className: "w-5 h-5 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center", children: /* @__PURE__ */ e.jsx(re, { className: "w-3 h-3 text-green-600 dark:text-green-400" }) }),
|
|
2822
2470
|
/* @__PURE__ */ e.jsx("span", { className: "text-xs text-green-600 dark:text-green-400 font-medium", children: "Selected" })
|
|
2823
2471
|
] }),
|
|
2824
|
-
|
|
2472
|
+
p && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-red-500 flex items-center space-x-1 mt-1", children: /* @__PURE__ */ e.jsx("span", { children: p }) })
|
|
2825
2473
|
] }),
|
|
2826
2474
|
/* @__PURE__ */ e.jsx(
|
|
2827
|
-
|
|
2475
|
+
Fe,
|
|
2828
2476
|
{
|
|
2829
|
-
isOpen:
|
|
2830
|
-
onClose: () =>
|
|
2831
|
-
onSelect:
|
|
2832
|
-
options:
|
|
2833
|
-
selectedValue:
|
|
2834
|
-
title:
|
|
2835
|
-
subtitle:
|
|
2836
|
-
icon:
|
|
2837
|
-
searchable:
|
|
2477
|
+
isOpen: E,
|
|
2478
|
+
onClose: () => M(!1),
|
|
2479
|
+
onSelect: j,
|
|
2480
|
+
options: n,
|
|
2481
|
+
selectedValue: t,
|
|
2482
|
+
title: R || c || "Select Option",
|
|
2483
|
+
subtitle: y || `Choose from ${n.length} options`,
|
|
2484
|
+
icon: h,
|
|
2485
|
+
searchable: N
|
|
2838
2486
|
}
|
|
2839
2487
|
)
|
|
2840
2488
|
] });
|
|
2841
|
-
},
|
|
2842
|
-
steps:
|
|
2843
|
-
initialData:
|
|
2844
|
-
onSubmit:
|
|
2845
|
-
onCancel:
|
|
2846
|
-
onEdit:
|
|
2847
|
-
onStepChange:
|
|
2848
|
-
submitButtonText:
|
|
2849
|
-
cancelButtonText:
|
|
2850
|
-
editButtonText:
|
|
2851
|
-
showEditingBadge:
|
|
2852
|
-
editingEntity:
|
|
2853
|
-
helpText:
|
|
2854
|
-
isModal:
|
|
2855
|
-
mode:
|
|
2489
|
+
}, tt = ({
|
|
2490
|
+
steps: t = [],
|
|
2491
|
+
initialData: r = {},
|
|
2492
|
+
onSubmit: n,
|
|
2493
|
+
onCancel: l,
|
|
2494
|
+
onEdit: c,
|
|
2495
|
+
onStepChange: h,
|
|
2496
|
+
submitButtonText: x = "Submit",
|
|
2497
|
+
cancelButtonText: m = "Cancel",
|
|
2498
|
+
editButtonText: p = "Edit Record",
|
|
2499
|
+
showEditingBadge: N = !1,
|
|
2500
|
+
editingEntity: S = "",
|
|
2501
|
+
helpText: R = "All fields marked with * are required",
|
|
2502
|
+
isModal: y = !0,
|
|
2503
|
+
mode: E = "create"
|
|
2856
2504
|
}) => {
|
|
2857
|
-
var
|
|
2858
|
-
const
|
|
2505
|
+
var s;
|
|
2506
|
+
const M = K(null), [g, i] = z(0), [j, D] = z(
|
|
2859
2507
|
() => typeof window < "u" ? window.innerWidth >= 1024 : !0
|
|
2860
|
-
), [
|
|
2861
|
-
const
|
|
2862
|
-
return
|
|
2863
|
-
|
|
2864
|
-
|
|
2508
|
+
), [T, V] = z(() => {
|
|
2509
|
+
const a = typeof t == "function" ? t(r) : t, o = {};
|
|
2510
|
+
return a.forEach((f) => {
|
|
2511
|
+
f.fields && f.fields.forEach((k) => {
|
|
2512
|
+
o[k.name] = r[k.name] || "";
|
|
2865
2513
|
});
|
|
2866
|
-
}),
|
|
2867
|
-
}), [
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
}, [
|
|
2871
|
-
const
|
|
2872
|
-
var
|
|
2873
|
-
(
|
|
2874
|
-
},
|
|
2875
|
-
if (
|
|
2876
|
-
const
|
|
2877
|
-
|
|
2878
|
-
const
|
|
2879
|
-
return
|
|
2880
|
-
|
|
2881
|
-
}),
|
|
2882
|
-
}),
|
|
2883
|
-
},
|
|
2884
|
-
if (
|
|
2885
|
-
const
|
|
2886
|
-
if (
|
|
2887
|
-
const
|
|
2888
|
-
Object.assign(
|
|
2514
|
+
}), o;
|
|
2515
|
+
}), [I, Y] = z({}), [U, B] = z(/* @__PURE__ */ new Set([0])), w = E === "view", W = E === "edit", d = typeof t == "function" ? t(T) : t;
|
|
2516
|
+
J(() => {
|
|
2517
|
+
h && h(g, T);
|
|
2518
|
+
}, [g, T, h]);
|
|
2519
|
+
const v = () => {
|
|
2520
|
+
var a;
|
|
2521
|
+
(a = M.current) == null || a.scrollTo({ top: 0, behavior: "smooth" });
|
|
2522
|
+
}, C = (a, o) => {
|
|
2523
|
+
if (w) return;
|
|
2524
|
+
const k = d.flatMap((P) => P.fields || []).find((P) => P.name === a);
|
|
2525
|
+
V((P) => {
|
|
2526
|
+
const L = { ...P, [a]: o };
|
|
2527
|
+
return k != null && k.resetFieldsOnChange && k.resetFieldsOnChange.forEach((q) => {
|
|
2528
|
+
L[q] = "";
|
|
2529
|
+
}), L;
|
|
2530
|
+
}), I[a] && Y((P) => ({ ...P, [a]: "" })), k != null && k.onChange && k.onChange(a, o);
|
|
2531
|
+
}, A = (a) => {
|
|
2532
|
+
if (w) return !0;
|
|
2533
|
+
const o = {}, f = d[a];
|
|
2534
|
+
if (f.customValidator) {
|
|
2535
|
+
const k = f.customValidator(a, T);
|
|
2536
|
+
Object.assign(o, k);
|
|
2889
2537
|
}
|
|
2890
|
-
return
|
|
2891
|
-
const
|
|
2892
|
-
if (
|
|
2893
|
-
|
|
2538
|
+
return f.fields && f.fields.length > 0 && f.fields.forEach((k) => {
|
|
2539
|
+
const P = T[k.name];
|
|
2540
|
+
if (k.required && !P) {
|
|
2541
|
+
o[k.name] = `${k.label} is required`;
|
|
2894
2542
|
return;
|
|
2895
2543
|
}
|
|
2896
|
-
if (
|
|
2897
|
-
const { minLength:
|
|
2898
|
-
|
|
2544
|
+
if (P && k.validation) {
|
|
2545
|
+
const { minLength: L, maxLength: q, pattern: u, min: Q, max: Z, custom: me } = k.validation;
|
|
2546
|
+
L && P.length < L && (o[k.name] = `Minimum ${L} characters required`), q && P.length > q && (o[k.name] = `Maximum ${q} characters allowed`), u && !u.test(P) && (o[k.name] = k.validation.message || "Invalid format"), Q !== void 0 && parseFloat(P) < Q && (o[k.name] = k.validation.message || `Minimum value is ${Q}`), Z !== void 0 && parseFloat(P) > Z && (o[k.name] = k.validation.message || `Maximum value is ${Z}`), me && !me(P) && (o[k.name] = k.validation.message || "Validation failed");
|
|
2899
2547
|
}
|
|
2900
|
-
}),
|
|
2901
|
-
},
|
|
2902
|
-
if (
|
|
2903
|
-
const
|
|
2904
|
-
|
|
2548
|
+
}), Y(o), Object.keys(o).length === 0;
|
|
2549
|
+
}, O = (a) => {
|
|
2550
|
+
if (a.preventDefault(), a.stopPropagation(), A(g)) {
|
|
2551
|
+
const o = g + 1;
|
|
2552
|
+
i(o), B((f) => /* @__PURE__ */ new Set([...f, o])), v();
|
|
2905
2553
|
}
|
|
2906
|
-
},
|
|
2907
|
-
|
|
2908
|
-
},
|
|
2909
|
-
if (typeof window < "u" && window.innerWidth < 1024 &&
|
|
2910
|
-
|
|
2554
|
+
}, b = (a) => {
|
|
2555
|
+
a.preventDefault(), a.stopPropagation(), i((o) => o - 1), v();
|
|
2556
|
+
}, $ = (a) => {
|
|
2557
|
+
if (typeof window < "u" && window.innerWidth < 1024 && D(!1), w) {
|
|
2558
|
+
i(a), B((o) => /* @__PURE__ */ new Set([...o, a])), v();
|
|
2911
2559
|
return;
|
|
2912
2560
|
}
|
|
2913
|
-
(
|
|
2914
|
-
},
|
|
2915
|
-
|
|
2916
|
-
},
|
|
2917
|
-
return /* @__PURE__ */ e.jsxs("form", { onSubmit:
|
|
2918
|
-
|
|
2561
|
+
(U.has(a) || a === g + 1) && (a > g ? A(g) && (i(a), B((o) => /* @__PURE__ */ new Set([...o, a])), v()) : (i(a), v()));
|
|
2562
|
+
}, F = (a) => {
|
|
2563
|
+
a.preventDefault(), !w && A(g) && n(T);
|
|
2564
|
+
}, H = g === d.length - 1, G = g === 0;
|
|
2565
|
+
return /* @__PURE__ */ e.jsxs("form", { onSubmit: F, className: "flex h-full overflow-hidden relative", children: [
|
|
2566
|
+
j && /* @__PURE__ */ e.jsx(
|
|
2919
2567
|
"div",
|
|
2920
2568
|
{
|
|
2921
2569
|
className: "lg:hidden absolute inset-0 z-20 bg-black/40 backdrop-blur-[1px]",
|
|
2922
|
-
onClick: () =>
|
|
2570
|
+
onClick: () => D(!1)
|
|
2923
2571
|
}
|
|
2924
2572
|
),
|
|
2925
2573
|
/* @__PURE__ */ e.jsxs("div", { className: `
|
|
@@ -2927,45 +2575,45 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
2927
2575
|
border-r border-slate-200 dark:border-slate-700
|
|
2928
2576
|
absolute z-30 h-full bg-white dark:bg-slate-800
|
|
2929
2577
|
lg:relative lg:flex-shrink-0 lg:z-auto lg:h-auto lg:bg-transparent dark:lg:bg-transparent
|
|
2930
|
-
${
|
|
2578
|
+
${j ? "w-52 lg:w-56" : "w-0 lg:w-10"}
|
|
2931
2579
|
`, children: [
|
|
2932
|
-
!
|
|
2933
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center gap-2 flex-1 justify-center", children: d.map((
|
|
2934
|
-
const
|
|
2580
|
+
!j && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col h-full items-center justify-between py-4 px-2 gap-3", children: [
|
|
2581
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center gap-2 flex-1 justify-center", children: d.map((a, o) => {
|
|
2582
|
+
const f = o === g, k = o < g;
|
|
2935
2583
|
return /* @__PURE__ */ e.jsx(
|
|
2936
2584
|
"button",
|
|
2937
2585
|
{
|
|
2938
2586
|
type: "button",
|
|
2939
|
-
onClick: () =>
|
|
2940
|
-
title: d[
|
|
2587
|
+
onClick: () => $(o),
|
|
2588
|
+
title: d[o].title,
|
|
2941
2589
|
className: `
|
|
2942
2590
|
rounded-full transition-all duration-300 flex-shrink-0
|
|
2943
|
-
${
|
|
2591
|
+
${k ? "w-2 h-2 bg-emerald-500 shadow-sm" : f ? w ? "w-2.5 h-2.5 bg-blue-500 shadow-md ring-2 ring-blue-300/40 dark:ring-blue-600/40" : "w-2.5 h-2.5 bg-violet-500 shadow-md ring-2 ring-violet-300/40 dark:ring-violet-600/40" : "w-2 h-2 bg-slate-300 dark:bg-slate-600 hover:bg-slate-400"}
|
|
2944
2592
|
`
|
|
2945
2593
|
},
|
|
2946
|
-
|
|
2594
|
+
o
|
|
2947
2595
|
);
|
|
2948
2596
|
}) }),
|
|
2949
2597
|
/* @__PURE__ */ e.jsx("div", { className: "w-1 h-16 bg-slate-200/60 dark:bg-slate-700/60 rounded-full overflow-hidden", children: /* @__PURE__ */ e.jsx(
|
|
2950
2598
|
"div",
|
|
2951
2599
|
{
|
|
2952
|
-
className: `w-full rounded-full transition-all duration-500 ${
|
|
2953
|
-
style: { height: `${(
|
|
2600
|
+
className: `w-full rounded-full transition-all duration-500 ${w ? "bg-blue-500" : "bg-gradient-to-b from-violet-500 to-indigo-500"}`,
|
|
2601
|
+
style: { height: `${(g + 1) / d.length * 100}%` }
|
|
2954
2602
|
}
|
|
2955
2603
|
) })
|
|
2956
2604
|
] }),
|
|
2957
|
-
|
|
2958
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex-1 space-y-1.5 mb-4", children: d.map((
|
|
2959
|
-
const
|
|
2605
|
+
j && /* @__PURE__ */ e.jsxs("div", { className: "h-full flex flex-col px-3 sm:px-4 pt-4 pb-4 overflow-y-auto", children: [
|
|
2606
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-1 space-y-1.5 mb-4", children: d.map((a, o) => {
|
|
2607
|
+
const f = o === g, k = (w || U.has(o)) && o < g, P = w ? !0 : U.has(o) || o === g + 1, L = a.icon;
|
|
2960
2608
|
return /* @__PURE__ */ e.jsx(
|
|
2961
2609
|
"button",
|
|
2962
2610
|
{
|
|
2963
2611
|
type: "button",
|
|
2964
|
-
onClick: () =>
|
|
2965
|
-
disabled: !
|
|
2612
|
+
onClick: () => P && $(o),
|
|
2613
|
+
disabled: !P,
|
|
2966
2614
|
className: `
|
|
2967
2615
|
w-full p-3 rounded-xl transition-all duration-200 text-left
|
|
2968
|
-
${
|
|
2616
|
+
${f ? w ? "bg-gradient-to-r from-blue-600 to-cyan-600 text-white shadow-md scale-[1.01]" : "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-md scale-[1.01]" : k ? "bg-white dark:bg-slate-800/50 border border-emerald-200 dark:border-emerald-500/30 hover:shadow-sm" : P ? "bg-white dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700 hover:shadow-sm" : "bg-slate-100 dark:bg-slate-800/30 border border-slate-200 dark:border-slate-700 opacity-50 cursor-not-allowed"}
|
|
2969
2617
|
`,
|
|
2970
2618
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2.5", children: [
|
|
2971
2619
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2973,35 +2621,35 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
2973
2621
|
{
|
|
2974
2622
|
className: `
|
|
2975
2623
|
w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0 transition-all
|
|
2976
|
-
${
|
|
2624
|
+
${f ? "bg-white/20" : k ? "bg-emerald-100 dark:bg-emerald-500/20" : "bg-slate-100 dark:bg-slate-700"}
|
|
2977
2625
|
`,
|
|
2978
|
-
children:
|
|
2979
|
-
|
|
2626
|
+
children: k && !f ? /* @__PURE__ */ e.jsx(_e, { className: "w-4 h-4 text-emerald-600 dark:text-emerald-400" }) : /* @__PURE__ */ e.jsx(
|
|
2627
|
+
L,
|
|
2980
2628
|
{
|
|
2981
|
-
className: `w-4 h-4 ${
|
|
2629
|
+
className: `w-4 h-4 ${f ? "text-white" : P ? w ? "text-blue-600 dark:text-blue-400" : "text-violet-600 dark:text-violet-400" : "text-slate-400 dark:text-slate-500"}`
|
|
2982
2630
|
}
|
|
2983
2631
|
)
|
|
2984
2632
|
}
|
|
2985
2633
|
),
|
|
2986
2634
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
2987
2635
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1.5 mb-0.5", children: [
|
|
2988
|
-
/* @__PURE__ */ e.jsxs("span", { className: `text-[10px] font-semibold uppercase tracking-wider ${
|
|
2989
|
-
|
|
2990
|
-
|
|
2636
|
+
/* @__PURE__ */ e.jsxs("span", { className: `text-[10px] font-semibold uppercase tracking-wider ${f ? "text-white/70" : "text-slate-400 dark:text-slate-500"}`, children: [
|
|
2637
|
+
w ? "§" : "#",
|
|
2638
|
+
o + 1
|
|
2991
2639
|
] }),
|
|
2992
|
-
|
|
2640
|
+
k && !f && !w && /* @__PURE__ */ e.jsx("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded-full text-[10px] font-semibold bg-emerald-100 text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-400", children: "✓" })
|
|
2993
2641
|
] }),
|
|
2994
|
-
/* @__PURE__ */ e.jsx("p", { className: `text-xs font-semibold truncate leading-tight ${
|
|
2995
|
-
|
|
2642
|
+
/* @__PURE__ */ e.jsx("p", { className: `text-xs font-semibold truncate leading-tight ${f ? "text-white" : k ? "text-slate-900 dark:text-white" : P ? "text-slate-700 dark:text-slate-300" : "text-slate-400 dark:text-slate-500"}`, children: a.title }),
|
|
2643
|
+
a.subtitle && /* @__PURE__ */ e.jsx("p", { className: `text-[10px] mt-0.5 line-clamp-1 leading-snug ${f ? "text-white/75" : "text-slate-400 dark:text-slate-500"}`, children: a.subtitle })
|
|
2996
2644
|
] })
|
|
2997
2645
|
] })
|
|
2998
2646
|
},
|
|
2999
|
-
|
|
2647
|
+
o
|
|
3000
2648
|
);
|
|
3001
2649
|
}) }),
|
|
3002
|
-
|
|
2650
|
+
!w && R && /* @__PURE__ */ e.jsx("div", { className: "p-3 rounded-xl bg-blue-50 border border-blue-200 dark:bg-blue-900/20 dark:border-blue-800/30 flex-shrink-0", children: /* @__PURE__ */ e.jsxs("p", { className: "text-[11px] text-slate-600 dark:text-slate-400 leading-relaxed", children: [
|
|
3003
2651
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold text-blue-600 dark:text-blue-400", children: "Tip: " }),
|
|
3004
|
-
|
|
2652
|
+
R
|
|
3005
2653
|
] }) })
|
|
3006
2654
|
] })
|
|
3007
2655
|
] }),
|
|
@@ -3013,22 +2661,22 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
3013
2661
|
"button",
|
|
3014
2662
|
{
|
|
3015
2663
|
type: "button",
|
|
3016
|
-
onClick: () =>
|
|
2664
|
+
onClick: () => D(!j),
|
|
3017
2665
|
className: `p-2.5 rounded-lg border border-slate-200 dark:border-slate-600
|
|
3018
2666
|
bg-white dark:bg-slate-700 text-slate-500 dark:text-slate-400
|
|
3019
2667
|
hover:bg-violet-50 hover:border-violet-300 hover:text-violet-600
|
|
3020
2668
|
dark:hover:bg-violet-900/30 dark:hover:border-violet-600 dark:hover:text-violet-400
|
|
3021
2669
|
transition-all duration-200 active:scale-95`,
|
|
3022
2670
|
"aria-label": "Toggle steps",
|
|
3023
|
-
children:
|
|
2671
|
+
children: j ? /* @__PURE__ */ e.jsx(ie, { className: "w-4 h-4" }) : /* @__PURE__ */ e.jsx(se, { className: "w-4 h-4" })
|
|
3024
2672
|
}
|
|
3025
2673
|
),
|
|
3026
2674
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
3027
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-xs font-semibold text-slate-700 dark:text-slate-300 truncate", children: d[
|
|
3028
|
-
/* @__PURE__ */ e.jsxs("p", { className: `text-[10px] font-medium ${
|
|
3029
|
-
|
|
2675
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-xs font-semibold text-slate-700 dark:text-slate-300 truncate", children: d[g].title }),
|
|
2676
|
+
/* @__PURE__ */ e.jsxs("p", { className: `text-[10px] font-medium ${w ? "text-blue-500" : "text-violet-500"}`, children: [
|
|
2677
|
+
w ? "Section" : "Step",
|
|
3030
2678
|
" ",
|
|
3031
|
-
|
|
2679
|
+
g + 1,
|
|
3032
2680
|
"/",
|
|
3033
2681
|
d.length
|
|
3034
2682
|
] })
|
|
@@ -3036,8 +2684,8 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
3036
2684
|
/* @__PURE__ */ e.jsx("div", { className: "w-16 h-1.5 bg-slate-200 dark:bg-slate-700 rounded-full overflow-hidden flex-shrink-0", children: /* @__PURE__ */ e.jsx(
|
|
3037
2685
|
"div",
|
|
3038
2686
|
{
|
|
3039
|
-
className: `h-1.5 rounded-full transition-all duration-300 ${
|
|
3040
|
-
style: { width: `${(
|
|
2687
|
+
className: `h-1.5 rounded-full transition-all duration-300 ${w ? "bg-blue-500" : "bg-gradient-to-r from-violet-500 to-indigo-500"}`,
|
|
2688
|
+
style: { width: `${(g + 1) / d.length * 100}%` }
|
|
3041
2689
|
}
|
|
3042
2690
|
) })
|
|
3043
2691
|
] }),
|
|
@@ -3045,7 +2693,7 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
3045
2693
|
"button",
|
|
3046
2694
|
{
|
|
3047
2695
|
type: "button",
|
|
3048
|
-
onClick: () =>
|
|
2696
|
+
onClick: () => D(!j),
|
|
3049
2697
|
className: `hidden lg:flex absolute left-0 top-5 -translate-x-[1.625rem] z-20
|
|
3050
2698
|
w-6 h-6 lg:w-7 lg:h-7 rounded-full
|
|
3051
2699
|
bg-white dark:bg-slate-800
|
|
@@ -3056,30 +2704,30 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
3056
2704
|
hover:border-violet-300 dark:hover:border-violet-600
|
|
3057
2705
|
hover:scale-110 active:scale-95
|
|
3058
2706
|
transition-all duration-200 group`,
|
|
3059
|
-
"aria-label":
|
|
3060
|
-
children:
|
|
2707
|
+
"aria-label": j ? "Collapse steps" : "Expand steps",
|
|
2708
|
+
children: j ? /* @__PURE__ */ e.jsx(ie, { className: "w-3 h-3 lg:w-3.5 lg:h-3.5 text-slate-400 group-hover:text-violet-500 transition-colors" }) : /* @__PURE__ */ e.jsx(se, { className: "w-3 h-3 lg:w-3.5 lg:h-3.5 text-slate-400 group-hover:text-violet-500 transition-colors" })
|
|
3061
2709
|
}
|
|
3062
2710
|
),
|
|
3063
|
-
/* @__PURE__ */ e.jsx("div", { ref:
|
|
3064
|
-
|
|
2711
|
+
/* @__PURE__ */ e.jsx("div", { ref: M, className: "flex-1 min-h-0 overflow-y-auto px-3.5 sm:px-5 lg:px-6 py-4 sm:py-5", children: /* @__PURE__ */ e.jsx("div", { className: "space-y-4 sm:space-y-5 w-full", children: d[g].customRender ? w && d[g].customViewRender ? /* @__PURE__ */ e.jsx("div", { className: "w-full", children: typeof d[g].customViewRender == "function" ? d[g].customViewRender() : d[g].customViewRender }) : /* @__PURE__ */ e.jsx("div", { className: "w-full", children: typeof d[g].customRender == "function" ? d[g].customRender({ formData: T, errors: I, handleChange: C, mode: E }) : d[g].customRender }) : (s = d[g].fields) == null ? void 0 : s.map((a, o) => /* @__PURE__ */ e.jsx(
|
|
2712
|
+
we,
|
|
3065
2713
|
{
|
|
3066
|
-
index:
|
|
3067
|
-
field: { ...
|
|
3068
|
-
value:
|
|
3069
|
-
onChange:
|
|
3070
|
-
error:
|
|
3071
|
-
mode:
|
|
2714
|
+
index: o,
|
|
2715
|
+
field: { ...a, disabled: w || a.disabled },
|
|
2716
|
+
value: T[a.name],
|
|
2717
|
+
onChange: C,
|
|
2718
|
+
error: I[a.name],
|
|
2719
|
+
mode: E
|
|
3072
2720
|
},
|
|
3073
|
-
|
|
2721
|
+
a.name || o
|
|
3074
2722
|
)) }) }),
|
|
3075
2723
|
/* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 px-4 py-3 sm:px-5 sm:py-3.5
|
|
3076
2724
|
border-t border-slate-200 dark:border-slate-700
|
|
3077
2725
|
bg-white dark:bg-slate-800`, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-2.5", children: [
|
|
3078
|
-
|
|
2726
|
+
G ? /* @__PURE__ */ e.jsx("div", {}) : /* @__PURE__ */ e.jsxs(
|
|
3079
2727
|
"button",
|
|
3080
2728
|
{
|
|
3081
2729
|
type: "button",
|
|
3082
|
-
onClick:
|
|
2730
|
+
onClick: b,
|
|
3083
2731
|
className: `inline-flex items-center gap-2 px-3.5 py-2.5 sm:px-4 sm:py-2.5
|
|
3084
2732
|
rounded-xl text-sm font-semibold transition-all duration-200
|
|
3085
2733
|
bg-white hover:bg-slate-50 text-slate-700
|
|
@@ -3087,18 +2735,18 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
3087
2735
|
dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300
|
|
3088
2736
|
shadow-sm hover:shadow-md hover:scale-105 active:scale-95`,
|
|
3089
2737
|
children: [
|
|
3090
|
-
/* @__PURE__ */ e.jsx(
|
|
3091
|
-
/* @__PURE__ */ e.jsx("span", { className:
|
|
2738
|
+
/* @__PURE__ */ e.jsx(ie, { className: "w-4 h-4 flex-shrink-0" }),
|
|
2739
|
+
/* @__PURE__ */ e.jsx("span", { className: W ? void 0 : "hidden sm:inline", children: "Previous" })
|
|
3092
2740
|
]
|
|
3093
2741
|
}
|
|
3094
2742
|
),
|
|
3095
2743
|
/* @__PURE__ */ e.jsx("div", { className: "flex-1" }),
|
|
3096
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children:
|
|
2744
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: w ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3097
2745
|
/* @__PURE__ */ e.jsxs(
|
|
3098
2746
|
"button",
|
|
3099
2747
|
{
|
|
3100
2748
|
type: "button",
|
|
3101
|
-
onClick:
|
|
2749
|
+
onClick: l,
|
|
3102
2750
|
className: `hidden sm:inline-flex items-center gap-1.5 px-3.5 py-2.5 sm:px-4 sm:py-2.5
|
|
3103
2751
|
rounded-xl text-sm font-semibold transition-all duration-200
|
|
3104
2752
|
bg-white hover:bg-slate-50 text-slate-700
|
|
@@ -3106,16 +2754,16 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
3106
2754
|
dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300
|
|
3107
2755
|
shadow-sm hover:shadow-md hover:scale-105 active:scale-95`,
|
|
3108
2756
|
children: [
|
|
3109
|
-
/* @__PURE__ */ e.jsx(
|
|
2757
|
+
/* @__PURE__ */ e.jsx(X, { className: "w-4 h-4 flex-shrink-0" }),
|
|
3110
2758
|
/* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: "Close" })
|
|
3111
2759
|
]
|
|
3112
2760
|
}
|
|
3113
2761
|
),
|
|
3114
|
-
!
|
|
2762
|
+
!H && /* @__PURE__ */ e.jsxs(
|
|
3115
2763
|
"button",
|
|
3116
2764
|
{
|
|
3117
2765
|
type: "button",
|
|
3118
|
-
onClick:
|
|
2766
|
+
onClick: O,
|
|
3119
2767
|
className: `inline-flex items-center gap-1.5 px-3.5 py-2.5 sm:px-4 sm:py-2.5
|
|
3120
2768
|
rounded-xl text-sm font-semibold transition-all duration-200
|
|
3121
2769
|
bg-white hover:bg-slate-50 text-slate-700
|
|
@@ -3124,15 +2772,15 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
3124
2772
|
shadow-sm hover:shadow-md hover:scale-105 active:scale-95`,
|
|
3125
2773
|
children: [
|
|
3126
2774
|
/* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: "Next" }),
|
|
3127
|
-
/* @__PURE__ */ e.jsx(
|
|
2775
|
+
/* @__PURE__ */ e.jsx(se, { className: "w-4 h-4 flex-shrink-0" })
|
|
3128
2776
|
]
|
|
3129
2777
|
}
|
|
3130
2778
|
),
|
|
3131
|
-
|
|
2779
|
+
c && /* @__PURE__ */ e.jsxs(
|
|
3132
2780
|
"button",
|
|
3133
2781
|
{
|
|
3134
2782
|
type: "button",
|
|
3135
|
-
onClick:
|
|
2783
|
+
onClick: c,
|
|
3136
2784
|
className: `inline-flex items-center gap-1.5 px-3.5 py-2.5 sm:px-4 sm:py-2.5
|
|
3137
2785
|
rounded-xl text-sm font-semibold transition-all duration-200
|
|
3138
2786
|
bg-gradient-to-r from-violet-600 to-indigo-600
|
|
@@ -3140,8 +2788,8 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
3140
2788
|
text-white shadow-md hover:shadow-lg
|
|
3141
2789
|
hover:scale-105 active:scale-95`,
|
|
3142
2790
|
children: [
|
|
3143
|
-
/* @__PURE__ */ e.jsx(
|
|
3144
|
-
/* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children:
|
|
2791
|
+
/* @__PURE__ */ e.jsx(oe, { className: "w-4 h-4 flex-shrink-0" }),
|
|
2792
|
+
/* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: p }),
|
|
3145
2793
|
/* @__PURE__ */ e.jsx("span", { className: "sm:hidden", children: "Edit" })
|
|
3146
2794
|
]
|
|
3147
2795
|
}
|
|
@@ -3151,7 +2799,7 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
3151
2799
|
"button",
|
|
3152
2800
|
{
|
|
3153
2801
|
type: "button",
|
|
3154
|
-
onClick:
|
|
2802
|
+
onClick: l,
|
|
3155
2803
|
className: `
|
|
3156
2804
|
items-center gap-1.5 px-3.5 py-2.5 sm:px-4 sm:py-2.5
|
|
3157
2805
|
rounded-xl text-sm font-semibold transition-all duration-200
|
|
@@ -3159,15 +2807,15 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
3159
2807
|
border border-slate-200 dark:border-slate-600
|
|
3160
2808
|
dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300
|
|
3161
2809
|
shadow-sm hover:shadow-md hover:scale-105 active:scale-95
|
|
3162
|
-
${
|
|
2810
|
+
${W ? "hidden sm:inline-flex" : "inline-flex"}
|
|
3163
2811
|
`,
|
|
3164
2812
|
children: [
|
|
3165
|
-
/* @__PURE__ */ e.jsx(
|
|
3166
|
-
/* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children:
|
|
2813
|
+
/* @__PURE__ */ e.jsx(X, { className: "w-4 h-4 flex-shrink-0" }),
|
|
2814
|
+
/* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: m })
|
|
3167
2815
|
]
|
|
3168
2816
|
}
|
|
3169
2817
|
),
|
|
3170
|
-
|
|
2818
|
+
H ? /* @__PURE__ */ e.jsxs(
|
|
3171
2819
|
"button",
|
|
3172
2820
|
{
|
|
3173
2821
|
type: "submit",
|
|
@@ -3178,15 +2826,15 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
3178
2826
|
text-white shadow-md hover:shadow-lg
|
|
3179
2827
|
hover:scale-105 active:scale-95`,
|
|
3180
2828
|
children: [
|
|
3181
|
-
/* @__PURE__ */ e.jsx(
|
|
3182
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
2829
|
+
/* @__PURE__ */ e.jsx(re, { className: "w-4 h-4 flex-shrink-0" }),
|
|
2830
|
+
/* @__PURE__ */ e.jsx("span", { children: x })
|
|
3183
2831
|
]
|
|
3184
2832
|
}
|
|
3185
2833
|
) : /* @__PURE__ */ e.jsxs(
|
|
3186
2834
|
"button",
|
|
3187
2835
|
{
|
|
3188
2836
|
type: "button",
|
|
3189
|
-
onClick:
|
|
2837
|
+
onClick: O,
|
|
3190
2838
|
className: `inline-flex items-center gap-1.5 px-3.5 py-2.5 sm:px-4 sm:py-2.5
|
|
3191
2839
|
rounded-xl text-sm font-semibold transition-all duration-200
|
|
3192
2840
|
bg-white hover:bg-slate-50 text-slate-700
|
|
@@ -3195,7 +2843,7 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
3195
2843
|
shadow-sm hover:shadow-md hover:scale-105 active:scale-95`,
|
|
3196
2844
|
children: [
|
|
3197
2845
|
/* @__PURE__ */ e.jsx("span", { children: "Next" }),
|
|
3198
|
-
/* @__PURE__ */ e.jsx(
|
|
2846
|
+
/* @__PURE__ */ e.jsx(se, { className: "w-4 h-4 flex-shrink-0" })
|
|
3199
2847
|
]
|
|
3200
2848
|
}
|
|
3201
2849
|
)
|
|
@@ -3203,17 +2851,17 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
3203
2851
|
] }) })
|
|
3204
2852
|
] })
|
|
3205
2853
|
] });
|
|
3206
|
-
},
|
|
3207
|
-
header:
|
|
3208
|
-
error:
|
|
3209
|
-
errorDescription:
|
|
3210
|
-
onErrorClose:
|
|
3211
|
-
children:
|
|
3212
|
-
loading:
|
|
3213
|
-
loadingMessage:
|
|
2854
|
+
}, st = ({
|
|
2855
|
+
header: t,
|
|
2856
|
+
error: r = null,
|
|
2857
|
+
errorDescription: n = null,
|
|
2858
|
+
onErrorClose: l,
|
|
2859
|
+
children: c,
|
|
2860
|
+
loading: h = !1,
|
|
2861
|
+
loadingMessage: x = "Loading data..."
|
|
3214
2862
|
}) => /* @__PURE__ */ e.jsx("div", { className: "h-full w-full flex flex-col overflow-hidden p-2.5 sm:p-3.5", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2.5 sm:gap-3 h-full overflow-hidden", children: [
|
|
3215
|
-
|
|
3216
|
-
|
|
2863
|
+
t && /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0", children: t }),
|
|
2864
|
+
r && /* @__PURE__ */ e.jsx("div", { className: `
|
|
3217
2865
|
flex-shrink-0 rounded-xl border overflow-hidden
|
|
3218
2866
|
bg-red-50 border-red-200/70 shadow-sm
|
|
3219
2867
|
dark:bg-red-900/20 dark:border-red-800/40
|
|
@@ -3223,26 +2871,26 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
3223
2871
|
flex-shrink-0 w-7 h-7 sm:w-8 sm:h-8 rounded-lg mt-0.5
|
|
3224
2872
|
bg-red-100 dark:bg-red-800/30
|
|
3225
2873
|
flex items-center justify-center
|
|
3226
|
-
`, children: /* @__PURE__ */ e.jsx(
|
|
2874
|
+
`, children: /* @__PURE__ */ e.jsx(ke, { className: "w-3.5 h-3.5 sm:w-4 sm:h-4 text-red-600 dark:text-red-400" }) }),
|
|
3227
2875
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
3228
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-red-800 dark:text-red-300 leading-snug", children:
|
|
3229
|
-
|
|
2876
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-red-800 dark:text-red-300 leading-snug", children: r }),
|
|
2877
|
+
n && /* @__PURE__ */ e.jsx("p", { className: "mt-0.5 text-xs text-red-700/80 dark:text-red-400 leading-relaxed", children: n })
|
|
3230
2878
|
] }),
|
|
3231
|
-
|
|
2879
|
+
l && /* @__PURE__ */ e.jsx(
|
|
3232
2880
|
"button",
|
|
3233
2881
|
{
|
|
3234
|
-
onClick:
|
|
2882
|
+
onClick: l,
|
|
3235
2883
|
className: `flex-shrink-0 p-2 rounded-lg mt-0.5
|
|
3236
2884
|
text-red-400 transition-all duration-200
|
|
3237
2885
|
hover:bg-red-100 hover:text-red-600
|
|
3238
2886
|
dark:hover:bg-red-800/50 dark:hover:text-red-300
|
|
3239
2887
|
hover:scale-105 active:scale-95`,
|
|
3240
2888
|
"aria-label": "Dismiss error",
|
|
3241
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2889
|
+
children: /* @__PURE__ */ e.jsx(X, { className: "w-3.5 h-3.5" })
|
|
3242
2890
|
}
|
|
3243
2891
|
)
|
|
3244
2892
|
] }) }) }),
|
|
3245
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex-grow min-h-0 overflow-y-auto", children:
|
|
2893
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-grow min-h-0 overflow-y-auto", children: h ? /* @__PURE__ */ e.jsx("div", { className: `
|
|
3246
2894
|
h-full flex items-center justify-center
|
|
3247
2895
|
rounded-xl sm:rounded-2xl border
|
|
3248
2896
|
bg-white border-slate-200/60 shadow-sm
|
|
@@ -3253,88 +2901,88 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
3253
2901
|
/* @__PURE__ */ e.jsx("div", { className: `absolute inset-0 rounded-full border-[2.5px] border-transparent
|
|
3254
2902
|
border-t-violet-600 dark:border-t-violet-400 animate-spin` })
|
|
3255
2903
|
] }),
|
|
3256
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1", children: [0, 120, 240].map((
|
|
2904
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1", children: [0, 120, 240].map((m) => /* @__PURE__ */ e.jsx(
|
|
3257
2905
|
"span",
|
|
3258
2906
|
{
|
|
3259
2907
|
className: `w-1 h-1 rounded-full bg-gradient-to-r from-violet-500 to-indigo-500
|
|
3260
2908
|
animate-bounce`,
|
|
3261
|
-
style: { animationDelay: `${
|
|
2909
|
+
style: { animationDelay: `${m}ms` }
|
|
3262
2910
|
},
|
|
3263
|
-
|
|
2911
|
+
m
|
|
3264
2912
|
)) }),
|
|
3265
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-xs font-medium text-slate-500 dark:text-slate-400", children:
|
|
3266
|
-
] }) }) :
|
|
3267
|
-
] }) }),
|
|
3268
|
-
message:
|
|
3269
|
-
supportingMessage:
|
|
3270
|
-
title:
|
|
3271
|
-
className:
|
|
3272
|
-
size:
|
|
2913
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-xs font-medium text-slate-500 dark:text-slate-400", children: x })
|
|
2914
|
+
] }) }) : c })
|
|
2915
|
+
] }) }), at = ({
|
|
2916
|
+
message: t = "Loading...",
|
|
2917
|
+
supportingMessage: r = !1,
|
|
2918
|
+
title: n = "Loading Data",
|
|
2919
|
+
className: l = "",
|
|
2920
|
+
size: c = "lg"
|
|
3273
2921
|
}) => {
|
|
3274
|
-
const
|
|
2922
|
+
const h = {
|
|
3275
2923
|
sm: "h-7 w-7 border-2",
|
|
3276
2924
|
md: "h-9 w-9 border-[3px]",
|
|
3277
2925
|
lg: "h-10 w-10 sm:h-12 sm:w-12 border-[3px] sm:border-[4px]",
|
|
3278
2926
|
xl: "h-12 w-12 sm:h-16 sm:w-16 border-[4px]"
|
|
3279
2927
|
};
|
|
3280
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col items-center justify-center h-full w-full text-center px-4 ${
|
|
3281
|
-
/* @__PURE__ */ e.jsx("div", { className: `animate-spin rounded-full ${
|
|
2928
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col items-center justify-center h-full w-full text-center px-4 ${l}`, children: [
|
|
2929
|
+
/* @__PURE__ */ e.jsx("div", { className: `animate-spin rounded-full ${h[c]}
|
|
3282
2930
|
border-slate-200 border-t-violet-500 border-r-violet-500 mb-4` }),
|
|
3283
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1 mb-3", children: [0, 120, 240].map((
|
|
2931
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1 mb-3", children: [0, 120, 240].map((x) => /* @__PURE__ */ e.jsx(
|
|
3284
2932
|
"span",
|
|
3285
2933
|
{
|
|
3286
2934
|
className: "w-1 h-1 rounded-full bg-gradient-to-r from-violet-500 to-indigo-500 animate-bounce",
|
|
3287
|
-
style: { animationDelay: `${
|
|
2935
|
+
style: { animationDelay: `${x}ms` }
|
|
3288
2936
|
},
|
|
3289
|
-
|
|
2937
|
+
x
|
|
3290
2938
|
)) }),
|
|
3291
|
-
/* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-semibold text-slate-900 dark:text-slate-200 mb-1", children:
|
|
3292
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-xs sm:text-sm text-slate-500 dark:text-slate-400 max-w-xs", children:
|
|
2939
|
+
/* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-semibold text-slate-900 dark:text-slate-200 mb-1", children: n }),
|
|
2940
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-xs sm:text-sm text-slate-500 dark:text-slate-400 max-w-xs", children: r || t })
|
|
3293
2941
|
] });
|
|
3294
|
-
},
|
|
2942
|
+
}, rt = ({ error: t, errorDescription: r, onClose: n }) => t ? /* @__PURE__ */ e.jsx("div", { className: `mx-4 mt-3 sm:mx-5 sm:mt-4 rounded-xl border
|
|
3295
2943
|
border-red-200 bg-red-50
|
|
3296
2944
|
dark:bg-red-900/20 dark:border-red-800/50
|
|
3297
2945
|
animate-in slide-in-from-top-1 duration-200`, children: /* @__PURE__ */ e.jsx("div", { className: "px-3.5 py-3 sm:px-4", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2.5", children: [
|
|
3298
2946
|
/* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 w-7 h-7 rounded-lg mt-0.5
|
|
3299
2947
|
bg-red-100 dark:bg-red-800/30
|
|
3300
|
-
flex items-center justify-center`, children: /* @__PURE__ */ e.jsx(
|
|
2948
|
+
flex items-center justify-center`, children: /* @__PURE__ */ e.jsx(ke, { className: "w-3.5 h-3.5 text-red-600 dark:text-red-400" }) }),
|
|
3301
2949
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
3302
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-red-800 dark:text-red-300 leading-snug", children:
|
|
3303
|
-
|
|
2950
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-red-800 dark:text-red-300 leading-snug", children: t }),
|
|
2951
|
+
r && /* @__PURE__ */ e.jsx("p", { className: "mt-0.5 text-xs text-red-700/80 dark:text-red-400 leading-relaxed", children: r })
|
|
3304
2952
|
] }),
|
|
3305
|
-
|
|
2953
|
+
n && /* @__PURE__ */ e.jsx(
|
|
3306
2954
|
"button",
|
|
3307
2955
|
{
|
|
3308
2956
|
type: "button",
|
|
3309
|
-
onClick:
|
|
2957
|
+
onClick: n,
|
|
3310
2958
|
"aria-label": "Close error",
|
|
3311
2959
|
className: `flex-shrink-0 p-1 rounded-lg mt-0.5 transition-all duration-200
|
|
3312
2960
|
text-red-400
|
|
3313
2961
|
hover:bg-red-100 hover:text-red-600
|
|
3314
2962
|
dark:hover:bg-red-800/50 dark:hover:text-red-300
|
|
3315
2963
|
hover:scale-105 active:scale-95`,
|
|
3316
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2964
|
+
children: /* @__PURE__ */ e.jsx(X, { className: "w-3.5 h-3.5" })
|
|
3317
2965
|
}
|
|
3318
2966
|
)
|
|
3319
|
-
] }) }) }) : null,
|
|
3320
|
-
content:
|
|
3321
|
-
className:
|
|
3322
|
-
emptyText:
|
|
3323
|
-
size:
|
|
2967
|
+
] }) }) }) : null, lt = ({
|
|
2968
|
+
content: t,
|
|
2969
|
+
className: r = "",
|
|
2970
|
+
emptyText: n = null,
|
|
2971
|
+
size: l = "md"
|
|
3324
2972
|
// 'xs' | 'sm' | 'md'
|
|
3325
2973
|
}) => {
|
|
3326
|
-
if (!
|
|
3327
|
-
return
|
|
3328
|
-
const
|
|
2974
|
+
if (!t || !t.replace(/<[^>]*>/g, "").trim())
|
|
2975
|
+
return n ? /* @__PURE__ */ e.jsx("span", { className: "text-slate-400 dark:text-slate-500 text-sm italic", children: n }) : null;
|
|
2976
|
+
const c = {
|
|
3329
2977
|
xs: "prose-xs text-xs",
|
|
3330
2978
|
sm: "prose-sm text-sm",
|
|
3331
2979
|
md: "prose-base text-base"
|
|
3332
|
-
}[
|
|
2980
|
+
}[l] || "prose-sm text-sm";
|
|
3333
2981
|
return /* @__PURE__ */ e.jsx(
|
|
3334
2982
|
"div",
|
|
3335
2983
|
{
|
|
3336
2984
|
className: `
|
|
3337
|
-
prose ${
|
|
2985
|
+
prose ${c} max-w-none
|
|
3338
2986
|
text-slate-700 dark:text-slate-300
|
|
3339
2987
|
|
|
3340
2988
|
[&>*]:my-0.5
|
|
@@ -3350,111 +2998,111 @@ const Ht = ({ user: r, onLogout: a, showEmail: o = !0 }) => {
|
|
|
3350
2998
|
|
|
3351
2999
|
[&>strong]:font-semibold
|
|
3352
3000
|
|
|
3353
|
-
${
|
|
3001
|
+
${r}
|
|
3354
3002
|
`,
|
|
3355
|
-
dangerouslySetInnerHTML: { __html:
|
|
3003
|
+
dangerouslySetInnerHTML: { __html: t }
|
|
3356
3004
|
}
|
|
3357
3005
|
);
|
|
3358
3006
|
};
|
|
3359
|
-
let
|
|
3360
|
-
const
|
|
3361
|
-
items:
|
|
3362
|
-
onReorder:
|
|
3363
|
-
onDropFrom:
|
|
3364
|
-
onDropTo:
|
|
3365
|
-
listId:
|
|
3366
|
-
disabled:
|
|
3367
|
-
renderItem:
|
|
3368
|
-
className:
|
|
3369
|
-
dropZoneClassName:
|
|
3370
|
-
activeDropZoneClassName:
|
|
3371
|
-
children:
|
|
3372
|
-
footer:
|
|
3007
|
+
let _ = null;
|
|
3008
|
+
const ot = ({
|
|
3009
|
+
items: t = [],
|
|
3010
|
+
onReorder: r,
|
|
3011
|
+
onDropFrom: n,
|
|
3012
|
+
onDropTo: l,
|
|
3013
|
+
listId: c = "default",
|
|
3014
|
+
disabled: h = !1,
|
|
3015
|
+
renderItem: x,
|
|
3016
|
+
className: m = "",
|
|
3017
|
+
dropZoneClassName: p = "",
|
|
3018
|
+
activeDropZoneClassName: N = "",
|
|
3019
|
+
children: S,
|
|
3020
|
+
footer: R = null
|
|
3373
3021
|
}) => {
|
|
3374
|
-
const
|
|
3375
|
-
|
|
3022
|
+
const y = K(null), [E, M] = z(null), [g, i] = z(!1), [j, D] = z(null);
|
|
3023
|
+
J(() => {
|
|
3376
3024
|
const d = () => {
|
|
3377
|
-
|
|
3025
|
+
_ && (_ = null, D(null), M(null), i(!1), y.current = null);
|
|
3378
3026
|
};
|
|
3379
3027
|
return document.addEventListener("dragend", d), () => document.removeEventListener("dragend", d);
|
|
3380
3028
|
}, []);
|
|
3381
|
-
const
|
|
3382
|
-
|
|
3383
|
-
},
|
|
3384
|
-
d.preventDefault(), (
|
|
3385
|
-
},
|
|
3386
|
-
|
|
3387
|
-
},
|
|
3388
|
-
d.preventDefault(), !
|
|
3389
|
-
},
|
|
3390
|
-
d.currentTarget.contains(d.relatedTarget) || (
|
|
3391
|
-
},
|
|
3392
|
-
if (d.preventDefault(), d.stopPropagation(), !!
|
|
3393
|
-
if (
|
|
3394
|
-
const
|
|
3395
|
-
if (
|
|
3396
|
-
|
|
3029
|
+
const T = (d, v) => {
|
|
3030
|
+
y.current = v, D(t[v].id), _ = { listId: c, index: v, item: t[v] }, d.dataTransfer.effectAllowed = "move";
|
|
3031
|
+
}, V = (d, v) => {
|
|
3032
|
+
d.preventDefault(), (_ == null ? void 0 : _.listId) === c && M(v);
|
|
3033
|
+
}, I = () => {
|
|
3034
|
+
y.current = null, D(null), M(null), i(!1), _ = null;
|
|
3035
|
+
}, Y = (d) => {
|
|
3036
|
+
d.preventDefault(), !h && (_ == null ? void 0 : _.listId) !== c && i(!0);
|
|
3037
|
+
}, U = (d) => {
|
|
3038
|
+
d.currentTarget.contains(d.relatedTarget) || (i(!1), (_ == null ? void 0 : _.listId) === c && M(null));
|
|
3039
|
+
}, B = (d, v) => {
|
|
3040
|
+
if (d.preventDefault(), d.stopPropagation(), !!_) {
|
|
3041
|
+
if (_.listId === c) {
|
|
3042
|
+
const C = y.current;
|
|
3043
|
+
if (C === v) {
|
|
3044
|
+
I();
|
|
3397
3045
|
return;
|
|
3398
3046
|
}
|
|
3399
|
-
const
|
|
3400
|
-
|
|
3047
|
+
const A = [...t], [O] = A.splice(C, 1);
|
|
3048
|
+
A.splice(v, 0, O), r == null || r(A);
|
|
3401
3049
|
} else
|
|
3402
|
-
|
|
3403
|
-
|
|
3050
|
+
n == null || n({ item: _.item, fromListId: _.listId, toIndex: v }), l == null || l({ item: _.item, fromIndex: _.index });
|
|
3051
|
+
I();
|
|
3404
3052
|
}
|
|
3405
|
-
},
|
|
3406
|
-
if (d.preventDefault(), !!
|
|
3407
|
-
if (
|
|
3408
|
-
|
|
3053
|
+
}, w = (d) => {
|
|
3054
|
+
if (d.preventDefault(), !!_) {
|
|
3055
|
+
if (_.listId === c) {
|
|
3056
|
+
I();
|
|
3409
3057
|
return;
|
|
3410
3058
|
}
|
|
3411
|
-
|
|
3059
|
+
n == null || n({ item: _.item, fromListId: _.listId, toIndex: t.length }), l == null || l({ item: _.item, fromIndex: _.index }), I();
|
|
3412
3060
|
}
|
|
3413
|
-
},
|
|
3061
|
+
}, W = g && !h && (_ == null ? void 0 : _.listId) !== c;
|
|
3414
3062
|
return /* @__PURE__ */ e.jsxs(
|
|
3415
3063
|
"div",
|
|
3416
3064
|
{
|
|
3417
|
-
className: `${
|
|
3418
|
-
onDragOver:
|
|
3419
|
-
onDragLeave:
|
|
3420
|
-
onDrop:
|
|
3065
|
+
className: `${p} ${W ? N : ""} ${m}`,
|
|
3066
|
+
onDragOver: h ? void 0 : Y,
|
|
3067
|
+
onDragLeave: h ? void 0 : U,
|
|
3068
|
+
onDrop: h ? void 0 : w,
|
|
3421
3069
|
children: [
|
|
3422
|
-
|
|
3423
|
-
const
|
|
3424
|
-
return
|
|
3070
|
+
t.length === 0 ? S : t.map((d, v) => {
|
|
3071
|
+
const C = j === d.id, A = (_ == null ? void 0 : _.listId) === c && E === v && j !== d.id;
|
|
3072
|
+
return x(d, v, h ? {} : {
|
|
3425
3073
|
draggable: !0,
|
|
3426
|
-
onDragStart: (
|
|
3427
|
-
onDragEnter: (
|
|
3428
|
-
onDragEnd:
|
|
3429
|
-
onDrop: (
|
|
3430
|
-
},
|
|
3074
|
+
onDragStart: (b) => T(b, v),
|
|
3075
|
+
onDragEnter: (b) => V(b, v),
|
|
3076
|
+
onDragEnd: I,
|
|
3077
|
+
onDrop: (b) => B(b, v)
|
|
3078
|
+
}, C, A);
|
|
3431
3079
|
}),
|
|
3432
|
-
|
|
3080
|
+
R
|
|
3433
3081
|
]
|
|
3434
3082
|
}
|
|
3435
3083
|
);
|
|
3436
3084
|
};
|
|
3437
3085
|
export {
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3086
|
+
Qe as ActionButton,
|
|
3087
|
+
Xe as DataTable,
|
|
3088
|
+
ot as DragDropList,
|
|
3089
|
+
Ke as DynamicForm,
|
|
3090
|
+
tt as DynamicFormMultiStep,
|
|
3091
|
+
Be as Footer,
|
|
3092
|
+
we as FormField,
|
|
3093
|
+
lt as HtmlContent,
|
|
3094
|
+
qe as IconButton,
|
|
3095
|
+
at as Loader,
|
|
3096
|
+
st as ManagerLayout,
|
|
3097
|
+
Ze as Modal,
|
|
3098
|
+
rt as ModalErrorAlert,
|
|
3099
|
+
He as Navbar,
|
|
3100
|
+
Ue as PageHeader,
|
|
3101
|
+
Ge as PrimaryButton,
|
|
3102
|
+
Je as SearchInput,
|
|
3103
|
+
Fe as SelectModal,
|
|
3104
|
+
et as SelectModalField,
|
|
3105
|
+
Ye as Sidebar,
|
|
3106
|
+
Pe as Toggle,
|
|
3107
|
+
Ae as UserMenu
|
|
3460
3108
|
};
|