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