kelt-ui-kit-react 0.1.2 → 0.1.4
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/README.md +46 -46
- package/dist/App.d.ts +3 -0
- package/dist/App.menu.d.ts +9 -0
- package/dist/App.routes.d.ts +1 -0
- package/dist/button/button.d.ts +3 -0
- package/dist/button/button.interface.d.ts +8 -0
- package/dist/button/button.view.d.ts +1 -0
- package/dist/expands/expand/expand.d.ts +1 -0
- package/dist/form/form.d.ts +9 -0
- package/dist/form/form.interface.d.ts +3 -0
- package/dist/form/form.view.d.ts +1 -0
- package/dist/header/header.d.ts +3 -0
- package/dist/header/header.interface.d.ts +8 -0
- package/dist/header/header.view.d.ts +1 -0
- package/dist/home/home.d.ts +1 -0
- package/dist/icon/icon.d.ts +3 -0
- package/dist/icon/icon.interface.d.ts +3 -0
- package/dist/icon/icons.view.d.ts +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.html +43 -43
- package/dist/index.js +1448 -0
- package/dist/main.d.ts +0 -1
- package/dist/manifest.json +25 -25
- package/dist/menus/menu/menu.d.ts +8 -0
- package/dist/menus/menu/menu.interface.d.ts +6 -0
- package/dist/menus/menus.d.ts +7 -0
- package/dist/menus/menus.view.d.ts +1 -0
- package/dist/notFound/notFound.d.ts +1 -0
- package/dist/robots.txt +3 -3
- package/dist/sidebar/sidebar.d.ts +8 -0
- package/dist/sidebar/sidebar.view.d.ts +1 -0
- package/dist/style.css +5 -1
- package/dist/toaster/toaster.d.ts +7 -0
- package/dist/toaster/toaster.view.d.ts +1 -0
- package/index.html +18 -11
- package/package.json +52 -52
- package/public/index.html +43 -43
- package/public/manifest.json +25 -25
- package/public/robots.txt +3 -3
- package/src/App.css +9 -9
- package/src/App.menu.tsx +44 -0
- package/src/App.routes.tsx +16 -0
- package/src/App.tsx +25 -0
- package/src/button/button.css +32 -0
- package/src/button/button.interface.tsx +7 -0
- package/src/button/button.tsx +32 -0
- package/src/button/button.view.tsx +28 -0
- package/src/expands/expand/expand.tsx +5 -2
- package/src/expands/expands.css +47 -29
- package/src/form/form.css +19 -0
- package/src/form/form.interface.tsx +3 -0
- package/src/form/form.tsx +58 -0
- package/src/form/form.view.tsx +17 -0
- package/src/header/header.css +27 -0
- package/src/header/header.interface.tsx +7 -0
- package/src/header/header.tsx +30 -0
- package/src/header/header.view.tsx +5 -0
- package/src/home/home.tsx +3 -0
- package/src/icon/icon.css +3 -0
- package/src/icon/icon.interface.tsx +3 -0
- package/src/icon/icon.tsx +5 -0
- package/src/icon/icons.view.tsx +29 -0
- package/src/index.css +286 -167
- package/src/index.ts +9 -0
- package/src/main.tsx +9 -1
- package/src/menus/menu/menu.interface.tsx +6 -0
- package/src/menus/menu/menu.tsx +17 -0
- package/src/menus/menus.css +24 -0
- package/src/menus/menus.tsx +34 -0
- package/src/menus/menus.view.tsx +28 -0
- package/src/notFound/notFound.tsx +3 -0
- package/src/sidebar/sidebar.css +65 -0
- package/src/sidebar/sidebar.tsx +48 -0
- package/src/sidebar/sidebar.view.tsx +17 -0
- package/src/toaster/toaster.css +12 -0
- package/src/toaster/toaster.tsx +43 -0
- package/src/toaster/toaster.view.tsx +11 -0
- package/vite.config.ts +6 -3
- package/dist/main.js +0 -2136
package/dist/index.js
ADDED
|
@@ -0,0 +1,1448 @@
|
|
|
1
|
+
import * as p from "react";
|
|
2
|
+
import mt, { useState as pe, useCallback as Le, useEffect as ut } from "react";
|
|
3
|
+
import ar from "react-dom";
|
|
4
|
+
var je = { exports: {} }, H = {};
|
|
5
|
+
/**
|
|
6
|
+
* @license React
|
|
7
|
+
* react-jsx-runtime.production.min.js
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the MIT license found in the
|
|
12
|
+
* LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/
|
|
14
|
+
var ct;
|
|
15
|
+
function ir() {
|
|
16
|
+
if (ct) return H;
|
|
17
|
+
ct = 1;
|
|
18
|
+
var e = mt, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
19
|
+
function u(c, f, d) {
|
|
20
|
+
var v, g = {}, x = null, k = null;
|
|
21
|
+
d !== void 0 && (x = "" + d), f.key !== void 0 && (x = "" + f.key), f.ref !== void 0 && (k = f.ref);
|
|
22
|
+
for (v in f) a.call(f, v) && !l.hasOwnProperty(v) && (g[v] = f[v]);
|
|
23
|
+
if (c && c.defaultProps) for (v in f = c.defaultProps, f) g[v] === void 0 && (g[v] = f[v]);
|
|
24
|
+
return { $$typeof: r, type: c, key: x, ref: k, props: g, _owner: i.current };
|
|
25
|
+
}
|
|
26
|
+
return H.Fragment = n, H.jsx = u, H.jsxs = u, H;
|
|
27
|
+
}
|
|
28
|
+
var ee = {};
|
|
29
|
+
/**
|
|
30
|
+
* @license React
|
|
31
|
+
* react-jsx-runtime.development.js
|
|
32
|
+
*
|
|
33
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
34
|
+
*
|
|
35
|
+
* This source code is licensed under the MIT license found in the
|
|
36
|
+
* LICENSE file in the root directory of this source tree.
|
|
37
|
+
*/
|
|
38
|
+
var ft;
|
|
39
|
+
function or() {
|
|
40
|
+
return ft || (ft = 1, process.env.NODE_ENV !== "production" && function() {
|
|
41
|
+
var e = mt, r = Symbol.for("react.element"), n = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), c = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), k = Symbol.for("react.offscreen"), P = Symbol.iterator, F = "@@iterator";
|
|
42
|
+
function I(t) {
|
|
43
|
+
if (t === null || typeof t != "object")
|
|
44
|
+
return null;
|
|
45
|
+
var o = P && t[P] || t[F];
|
|
46
|
+
return typeof o == "function" ? o : null;
|
|
47
|
+
}
|
|
48
|
+
var D = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
49
|
+
function b(t) {
|
|
50
|
+
{
|
|
51
|
+
for (var o = arguments.length, s = new Array(o > 1 ? o - 1 : 0), h = 1; h < o; h++)
|
|
52
|
+
s[h - 1] = arguments[h];
|
|
53
|
+
O("error", t, s);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function O(t, o, s) {
|
|
57
|
+
{
|
|
58
|
+
var h = D.ReactDebugCurrentFrame, R = h.getStackAddendum();
|
|
59
|
+
R !== "" && (o += "%s", s = s.concat([R]));
|
|
60
|
+
var C = s.map(function(E) {
|
|
61
|
+
return String(E);
|
|
62
|
+
});
|
|
63
|
+
C.unshift("Warning: " + o), Function.prototype.apply.call(console[t], console, C);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
var N = !1, W = !1, q = !1, ie = !1, z = !1, oe;
|
|
67
|
+
oe = Symbol.for("react.module.reference");
|
|
68
|
+
function G(t) {
|
|
69
|
+
return !!(typeof t == "string" || typeof t == "function" || t === a || t === l || z || t === i || t === d || t === v || ie || t === k || N || W || q || typeof t == "object" && t !== null && (t.$$typeof === x || t.$$typeof === g || t.$$typeof === u || t.$$typeof === c || t.$$typeof === f || // This needs to include all possible module reference object
|
|
70
|
+
// types supported by any Flight configuration anywhere since
|
|
71
|
+
// we don't know which Flight build this will end up being used
|
|
72
|
+
// with.
|
|
73
|
+
t.$$typeof === oe || t.getModuleId !== void 0));
|
|
74
|
+
}
|
|
75
|
+
function be(t, o, s) {
|
|
76
|
+
var h = t.displayName;
|
|
77
|
+
if (h)
|
|
78
|
+
return h;
|
|
79
|
+
var R = o.displayName || o.name || "";
|
|
80
|
+
return R !== "" ? s + "(" + R + ")" : s;
|
|
81
|
+
}
|
|
82
|
+
function $e(t) {
|
|
83
|
+
return t.displayName || "Context";
|
|
84
|
+
}
|
|
85
|
+
function A(t) {
|
|
86
|
+
if (t == null)
|
|
87
|
+
return null;
|
|
88
|
+
if (typeof t.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
|
|
89
|
+
return t.displayName || t.name || null;
|
|
90
|
+
if (typeof t == "string")
|
|
91
|
+
return t;
|
|
92
|
+
switch (t) {
|
|
93
|
+
case a:
|
|
94
|
+
return "Fragment";
|
|
95
|
+
case n:
|
|
96
|
+
return "Portal";
|
|
97
|
+
case l:
|
|
98
|
+
return "Profiler";
|
|
99
|
+
case i:
|
|
100
|
+
return "StrictMode";
|
|
101
|
+
case d:
|
|
102
|
+
return "Suspense";
|
|
103
|
+
case v:
|
|
104
|
+
return "SuspenseList";
|
|
105
|
+
}
|
|
106
|
+
if (typeof t == "object")
|
|
107
|
+
switch (t.$$typeof) {
|
|
108
|
+
case c:
|
|
109
|
+
var o = t;
|
|
110
|
+
return $e(o) + ".Consumer";
|
|
111
|
+
case u:
|
|
112
|
+
var s = t;
|
|
113
|
+
return $e(s._context) + ".Provider";
|
|
114
|
+
case f:
|
|
115
|
+
return be(t, t.render, "ForwardRef");
|
|
116
|
+
case g:
|
|
117
|
+
var h = t.displayName || null;
|
|
118
|
+
return h !== null ? h : A(t.type) || "Memo";
|
|
119
|
+
case x: {
|
|
120
|
+
var R = t, C = R._payload, E = R._init;
|
|
121
|
+
try {
|
|
122
|
+
return A(E(C));
|
|
123
|
+
} catch {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
var U = Object.assign, X = 0, We, Me, Ye, Be, Je, Ke, qe;
|
|
131
|
+
function ze() {
|
|
132
|
+
}
|
|
133
|
+
ze.__reactDisabledLog = !0;
|
|
134
|
+
function Tt() {
|
|
135
|
+
{
|
|
136
|
+
if (X === 0) {
|
|
137
|
+
We = console.log, Me = console.info, Ye = console.warn, Be = console.error, Je = console.group, Ke = console.groupCollapsed, qe = console.groupEnd;
|
|
138
|
+
var t = {
|
|
139
|
+
configurable: !0,
|
|
140
|
+
enumerable: !0,
|
|
141
|
+
value: ze,
|
|
142
|
+
writable: !0
|
|
143
|
+
};
|
|
144
|
+
Object.defineProperties(console, {
|
|
145
|
+
info: t,
|
|
146
|
+
log: t,
|
|
147
|
+
warn: t,
|
|
148
|
+
error: t,
|
|
149
|
+
group: t,
|
|
150
|
+
groupCollapsed: t,
|
|
151
|
+
groupEnd: t
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
X++;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function Dt() {
|
|
158
|
+
{
|
|
159
|
+
if (X--, X === 0) {
|
|
160
|
+
var t = {
|
|
161
|
+
configurable: !0,
|
|
162
|
+
enumerable: !0,
|
|
163
|
+
writable: !0
|
|
164
|
+
};
|
|
165
|
+
Object.defineProperties(console, {
|
|
166
|
+
log: U({}, t, {
|
|
167
|
+
value: We
|
|
168
|
+
}),
|
|
169
|
+
info: U({}, t, {
|
|
170
|
+
value: Me
|
|
171
|
+
}),
|
|
172
|
+
warn: U({}, t, {
|
|
173
|
+
value: Ye
|
|
174
|
+
}),
|
|
175
|
+
error: U({}, t, {
|
|
176
|
+
value: Be
|
|
177
|
+
}),
|
|
178
|
+
group: U({}, t, {
|
|
179
|
+
value: Je
|
|
180
|
+
}),
|
|
181
|
+
groupCollapsed: U({}, t, {
|
|
182
|
+
value: Ke
|
|
183
|
+
}),
|
|
184
|
+
groupEnd: U({}, t, {
|
|
185
|
+
value: qe
|
|
186
|
+
})
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
X < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
var ye = D.ReactCurrentDispatcher, Ee;
|
|
193
|
+
function se(t, o, s) {
|
|
194
|
+
{
|
|
195
|
+
if (Ee === void 0)
|
|
196
|
+
try {
|
|
197
|
+
throw Error();
|
|
198
|
+
} catch (R) {
|
|
199
|
+
var h = R.stack.trim().match(/\n( *(at )?)/);
|
|
200
|
+
Ee = h && h[1] || "";
|
|
201
|
+
}
|
|
202
|
+
return `
|
|
203
|
+
` + Ee + t;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
var xe = !1, le;
|
|
207
|
+
{
|
|
208
|
+
var kt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
209
|
+
le = new kt();
|
|
210
|
+
}
|
|
211
|
+
function Ge(t, o) {
|
|
212
|
+
if (!t || xe)
|
|
213
|
+
return "";
|
|
214
|
+
{
|
|
215
|
+
var s = le.get(t);
|
|
216
|
+
if (s !== void 0)
|
|
217
|
+
return s;
|
|
218
|
+
}
|
|
219
|
+
var h;
|
|
220
|
+
xe = !0;
|
|
221
|
+
var R = Error.prepareStackTrace;
|
|
222
|
+
Error.prepareStackTrace = void 0;
|
|
223
|
+
var C;
|
|
224
|
+
C = ye.current, ye.current = null, Tt();
|
|
225
|
+
try {
|
|
226
|
+
if (o) {
|
|
227
|
+
var E = function() {
|
|
228
|
+
throw Error();
|
|
229
|
+
};
|
|
230
|
+
if (Object.defineProperty(E.prototype, "props", {
|
|
231
|
+
set: function() {
|
|
232
|
+
throw Error();
|
|
233
|
+
}
|
|
234
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
235
|
+
try {
|
|
236
|
+
Reflect.construct(E, []);
|
|
237
|
+
} catch (T) {
|
|
238
|
+
h = T;
|
|
239
|
+
}
|
|
240
|
+
Reflect.construct(t, [], E);
|
|
241
|
+
} else {
|
|
242
|
+
try {
|
|
243
|
+
E.call();
|
|
244
|
+
} catch (T) {
|
|
245
|
+
h = T;
|
|
246
|
+
}
|
|
247
|
+
t.call(E.prototype);
|
|
248
|
+
}
|
|
249
|
+
} else {
|
|
250
|
+
try {
|
|
251
|
+
throw Error();
|
|
252
|
+
} catch (T) {
|
|
253
|
+
h = T;
|
|
254
|
+
}
|
|
255
|
+
t();
|
|
256
|
+
}
|
|
257
|
+
} catch (T) {
|
|
258
|
+
if (T && h && typeof T.stack == "string") {
|
|
259
|
+
for (var y = T.stack.split(`
|
|
260
|
+
`), j = h.stack.split(`
|
|
261
|
+
`), w = y.length - 1, S = j.length - 1; w >= 1 && S >= 0 && y[w] !== j[S]; )
|
|
262
|
+
S--;
|
|
263
|
+
for (; w >= 1 && S >= 0; w--, S--)
|
|
264
|
+
if (y[w] !== j[S]) {
|
|
265
|
+
if (w !== 1 || S !== 1)
|
|
266
|
+
do
|
|
267
|
+
if (w--, S--, S < 0 || y[w] !== j[S]) {
|
|
268
|
+
var L = `
|
|
269
|
+
` + y[w].replace(" at new ", " at ");
|
|
270
|
+
return t.displayName && L.includes("<anonymous>") && (L = L.replace("<anonymous>", t.displayName)), typeof t == "function" && le.set(t, L), L;
|
|
271
|
+
}
|
|
272
|
+
while (w >= 1 && S >= 0);
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
} finally {
|
|
277
|
+
xe = !1, ye.current = C, Dt(), Error.prepareStackTrace = R;
|
|
278
|
+
}
|
|
279
|
+
var Y = t ? t.displayName || t.name : "", $ = Y ? se(Y) : "";
|
|
280
|
+
return typeof t == "function" && le.set(t, $), $;
|
|
281
|
+
}
|
|
282
|
+
function Lt(t, o, s) {
|
|
283
|
+
return Ge(t, !1);
|
|
284
|
+
}
|
|
285
|
+
function Ft(t) {
|
|
286
|
+
var o = t.prototype;
|
|
287
|
+
return !!(o && o.isReactComponent);
|
|
288
|
+
}
|
|
289
|
+
function ue(t, o, s) {
|
|
290
|
+
if (t == null)
|
|
291
|
+
return "";
|
|
292
|
+
if (typeof t == "function")
|
|
293
|
+
return Ge(t, Ft(t));
|
|
294
|
+
if (typeof t == "string")
|
|
295
|
+
return se(t);
|
|
296
|
+
switch (t) {
|
|
297
|
+
case d:
|
|
298
|
+
return se("Suspense");
|
|
299
|
+
case v:
|
|
300
|
+
return se("SuspenseList");
|
|
301
|
+
}
|
|
302
|
+
if (typeof t == "object")
|
|
303
|
+
switch (t.$$typeof) {
|
|
304
|
+
case f:
|
|
305
|
+
return Lt(t.render);
|
|
306
|
+
case g:
|
|
307
|
+
return ue(t.type, o, s);
|
|
308
|
+
case x: {
|
|
309
|
+
var h = t, R = h._payload, C = h._init;
|
|
310
|
+
try {
|
|
311
|
+
return ue(C(R), o, s);
|
|
312
|
+
} catch {
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
return "";
|
|
317
|
+
}
|
|
318
|
+
var Z = Object.prototype.hasOwnProperty, Xe = {}, Ze = D.ReactDebugCurrentFrame;
|
|
319
|
+
function ce(t) {
|
|
320
|
+
if (t) {
|
|
321
|
+
var o = t._owner, s = ue(t.type, t._source, o ? o.type : null);
|
|
322
|
+
Ze.setExtraStackFrame(s);
|
|
323
|
+
} else
|
|
324
|
+
Ze.setExtraStackFrame(null);
|
|
325
|
+
}
|
|
326
|
+
function At(t, o, s, h, R) {
|
|
327
|
+
{
|
|
328
|
+
var C = Function.call.bind(Z);
|
|
329
|
+
for (var E in t)
|
|
330
|
+
if (C(t, E)) {
|
|
331
|
+
var y = void 0;
|
|
332
|
+
try {
|
|
333
|
+
if (typeof t[E] != "function") {
|
|
334
|
+
var j = Error((h || "React class") + ": " + s + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
335
|
+
throw j.name = "Invariant Violation", j;
|
|
336
|
+
}
|
|
337
|
+
y = t[E](o, E, h, s, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
338
|
+
} catch (w) {
|
|
339
|
+
y = w;
|
|
340
|
+
}
|
|
341
|
+
y && !(y instanceof Error) && (ce(R), b("%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).", h || "React class", s, E, typeof y), ce(null)), y instanceof Error && !(y.message in Xe) && (Xe[y.message] = !0, ce(R), b("Failed %s type: %s", s, y.message), ce(null));
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
var Vt = Array.isArray;
|
|
346
|
+
function Re(t) {
|
|
347
|
+
return Vt(t);
|
|
348
|
+
}
|
|
349
|
+
function It(t) {
|
|
350
|
+
{
|
|
351
|
+
var o = typeof Symbol == "function" && Symbol.toStringTag, s = o && t[Symbol.toStringTag] || t.constructor.name || "Object";
|
|
352
|
+
return s;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
function Ut(t) {
|
|
356
|
+
try {
|
|
357
|
+
return Qe(t), !1;
|
|
358
|
+
} catch {
|
|
359
|
+
return !0;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
function Qe(t) {
|
|
363
|
+
return "" + t;
|
|
364
|
+
}
|
|
365
|
+
function He(t) {
|
|
366
|
+
if (Ut(t))
|
|
367
|
+
return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", It(t)), Qe(t);
|
|
368
|
+
}
|
|
369
|
+
var Q = D.ReactCurrentOwner, $t = {
|
|
370
|
+
key: !0,
|
|
371
|
+
ref: !0,
|
|
372
|
+
__self: !0,
|
|
373
|
+
__source: !0
|
|
374
|
+
}, et, tt, Ce;
|
|
375
|
+
Ce = {};
|
|
376
|
+
function Wt(t) {
|
|
377
|
+
if (Z.call(t, "ref")) {
|
|
378
|
+
var o = Object.getOwnPropertyDescriptor(t, "ref").get;
|
|
379
|
+
if (o && o.isReactWarning)
|
|
380
|
+
return !1;
|
|
381
|
+
}
|
|
382
|
+
return t.ref !== void 0;
|
|
383
|
+
}
|
|
384
|
+
function Mt(t) {
|
|
385
|
+
if (Z.call(t, "key")) {
|
|
386
|
+
var o = Object.getOwnPropertyDescriptor(t, "key").get;
|
|
387
|
+
if (o && o.isReactWarning)
|
|
388
|
+
return !1;
|
|
389
|
+
}
|
|
390
|
+
return t.key !== void 0;
|
|
391
|
+
}
|
|
392
|
+
function Yt(t, o) {
|
|
393
|
+
if (typeof t.ref == "string" && Q.current && o && Q.current.stateNode !== o) {
|
|
394
|
+
var s = A(Q.current.type);
|
|
395
|
+
Ce[s] || (b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', A(Q.current.type), t.ref), Ce[s] = !0);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
function Bt(t, o) {
|
|
399
|
+
{
|
|
400
|
+
var s = function() {
|
|
401
|
+
et || (et = !0, b("%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)", o));
|
|
402
|
+
};
|
|
403
|
+
s.isReactWarning = !0, Object.defineProperty(t, "key", {
|
|
404
|
+
get: s,
|
|
405
|
+
configurable: !0
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
function Jt(t, o) {
|
|
410
|
+
{
|
|
411
|
+
var s = function() {
|
|
412
|
+
tt || (tt = !0, b("%s: `ref` 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)", o));
|
|
413
|
+
};
|
|
414
|
+
s.isReactWarning = !0, Object.defineProperty(t, "ref", {
|
|
415
|
+
get: s,
|
|
416
|
+
configurable: !0
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
var Kt = function(t, o, s, h, R, C, E) {
|
|
421
|
+
var y = {
|
|
422
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
423
|
+
$$typeof: r,
|
|
424
|
+
// Built-in properties that belong on the element
|
|
425
|
+
type: t,
|
|
426
|
+
key: o,
|
|
427
|
+
ref: s,
|
|
428
|
+
props: E,
|
|
429
|
+
// Record the component responsible for creating this element.
|
|
430
|
+
_owner: C
|
|
431
|
+
};
|
|
432
|
+
return y._store = {}, Object.defineProperty(y._store, "validated", {
|
|
433
|
+
configurable: !1,
|
|
434
|
+
enumerable: !1,
|
|
435
|
+
writable: !0,
|
|
436
|
+
value: !1
|
|
437
|
+
}), Object.defineProperty(y, "_self", {
|
|
438
|
+
configurable: !1,
|
|
439
|
+
enumerable: !1,
|
|
440
|
+
writable: !1,
|
|
441
|
+
value: h
|
|
442
|
+
}), Object.defineProperty(y, "_source", {
|
|
443
|
+
configurable: !1,
|
|
444
|
+
enumerable: !1,
|
|
445
|
+
writable: !1,
|
|
446
|
+
value: R
|
|
447
|
+
}), Object.freeze && (Object.freeze(y.props), Object.freeze(y)), y;
|
|
448
|
+
};
|
|
449
|
+
function qt(t, o, s, h, R) {
|
|
450
|
+
{
|
|
451
|
+
var C, E = {}, y = null, j = null;
|
|
452
|
+
s !== void 0 && (He(s), y = "" + s), Mt(o) && (He(o.key), y = "" + o.key), Wt(o) && (j = o.ref, Yt(o, R));
|
|
453
|
+
for (C in o)
|
|
454
|
+
Z.call(o, C) && !$t.hasOwnProperty(C) && (E[C] = o[C]);
|
|
455
|
+
if (t && t.defaultProps) {
|
|
456
|
+
var w = t.defaultProps;
|
|
457
|
+
for (C in w)
|
|
458
|
+
E[C] === void 0 && (E[C] = w[C]);
|
|
459
|
+
}
|
|
460
|
+
if (y || j) {
|
|
461
|
+
var S = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
|
|
462
|
+
y && Bt(E, S), j && Jt(E, S);
|
|
463
|
+
}
|
|
464
|
+
return Kt(t, y, j, R, h, Q.current, E);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
var we = D.ReactCurrentOwner, rt = D.ReactDebugCurrentFrame;
|
|
468
|
+
function M(t) {
|
|
469
|
+
if (t) {
|
|
470
|
+
var o = t._owner, s = ue(t.type, t._source, o ? o.type : null);
|
|
471
|
+
rt.setExtraStackFrame(s);
|
|
472
|
+
} else
|
|
473
|
+
rt.setExtraStackFrame(null);
|
|
474
|
+
}
|
|
475
|
+
var _e;
|
|
476
|
+
_e = !1;
|
|
477
|
+
function Ne(t) {
|
|
478
|
+
return typeof t == "object" && t !== null && t.$$typeof === r;
|
|
479
|
+
}
|
|
480
|
+
function nt() {
|
|
481
|
+
{
|
|
482
|
+
if (we.current) {
|
|
483
|
+
var t = A(we.current.type);
|
|
484
|
+
if (t)
|
|
485
|
+
return `
|
|
486
|
+
|
|
487
|
+
Check the render method of \`` + t + "`.";
|
|
488
|
+
}
|
|
489
|
+
return "";
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
function zt(t) {
|
|
493
|
+
return "";
|
|
494
|
+
}
|
|
495
|
+
var at = {};
|
|
496
|
+
function Gt(t) {
|
|
497
|
+
{
|
|
498
|
+
var o = nt();
|
|
499
|
+
if (!o) {
|
|
500
|
+
var s = typeof t == "string" ? t : t.displayName || t.name;
|
|
501
|
+
s && (o = `
|
|
502
|
+
|
|
503
|
+
Check the top-level render call using <` + s + ">.");
|
|
504
|
+
}
|
|
505
|
+
return o;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
function it(t, o) {
|
|
509
|
+
{
|
|
510
|
+
if (!t._store || t._store.validated || t.key != null)
|
|
511
|
+
return;
|
|
512
|
+
t._store.validated = !0;
|
|
513
|
+
var s = Gt(o);
|
|
514
|
+
if (at[s])
|
|
515
|
+
return;
|
|
516
|
+
at[s] = !0;
|
|
517
|
+
var h = "";
|
|
518
|
+
t && t._owner && t._owner !== we.current && (h = " It was passed a child from " + A(t._owner.type) + "."), M(t), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', s, h), M(null);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
function ot(t, o) {
|
|
522
|
+
{
|
|
523
|
+
if (typeof t != "object")
|
|
524
|
+
return;
|
|
525
|
+
if (Re(t))
|
|
526
|
+
for (var s = 0; s < t.length; s++) {
|
|
527
|
+
var h = t[s];
|
|
528
|
+
Ne(h) && it(h, o);
|
|
529
|
+
}
|
|
530
|
+
else if (Ne(t))
|
|
531
|
+
t._store && (t._store.validated = !0);
|
|
532
|
+
else if (t) {
|
|
533
|
+
var R = I(t);
|
|
534
|
+
if (typeof R == "function" && R !== t.entries)
|
|
535
|
+
for (var C = R.call(t), E; !(E = C.next()).done; )
|
|
536
|
+
Ne(E.value) && it(E.value, o);
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
function Xt(t) {
|
|
541
|
+
{
|
|
542
|
+
var o = t.type;
|
|
543
|
+
if (o == null || typeof o == "string")
|
|
544
|
+
return;
|
|
545
|
+
var s;
|
|
546
|
+
if (typeof o == "function")
|
|
547
|
+
s = o.propTypes;
|
|
548
|
+
else if (typeof o == "object" && (o.$$typeof === f || // Note: Memo only checks outer props here.
|
|
549
|
+
// Inner props are checked in the reconciler.
|
|
550
|
+
o.$$typeof === g))
|
|
551
|
+
s = o.propTypes;
|
|
552
|
+
else
|
|
553
|
+
return;
|
|
554
|
+
if (s) {
|
|
555
|
+
var h = A(o);
|
|
556
|
+
At(s, t.props, "prop", h, t);
|
|
557
|
+
} else if (o.PropTypes !== void 0 && !_e) {
|
|
558
|
+
_e = !0;
|
|
559
|
+
var R = A(o);
|
|
560
|
+
b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", R || "Unknown");
|
|
561
|
+
}
|
|
562
|
+
typeof o.getDefaultProps == "function" && !o.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
function Zt(t) {
|
|
566
|
+
{
|
|
567
|
+
for (var o = Object.keys(t.props), s = 0; s < o.length; s++) {
|
|
568
|
+
var h = o[s];
|
|
569
|
+
if (h !== "children" && h !== "key") {
|
|
570
|
+
M(t), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", h), M(null);
|
|
571
|
+
break;
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
t.ref !== null && (M(t), b("Invalid attribute `ref` supplied to `React.Fragment`."), M(null));
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
var st = {};
|
|
578
|
+
function lt(t, o, s, h, R, C) {
|
|
579
|
+
{
|
|
580
|
+
var E = G(t);
|
|
581
|
+
if (!E) {
|
|
582
|
+
var y = "";
|
|
583
|
+
(t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (y += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
584
|
+
var j = zt();
|
|
585
|
+
j ? y += j : y += nt();
|
|
586
|
+
var w;
|
|
587
|
+
t === null ? w = "null" : Re(t) ? w = "array" : t !== void 0 && t.$$typeof === r ? (w = "<" + (A(t.type) || "Unknown") + " />", y = " Did you accidentally export a JSX literal instead of a component?") : w = typeof t, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", w, y);
|
|
588
|
+
}
|
|
589
|
+
var S = qt(t, o, s, R, C);
|
|
590
|
+
if (S == null)
|
|
591
|
+
return S;
|
|
592
|
+
if (E) {
|
|
593
|
+
var L = o.children;
|
|
594
|
+
if (L !== void 0)
|
|
595
|
+
if (h)
|
|
596
|
+
if (Re(L)) {
|
|
597
|
+
for (var Y = 0; Y < L.length; Y++)
|
|
598
|
+
ot(L[Y], t);
|
|
599
|
+
Object.freeze && Object.freeze(L);
|
|
600
|
+
} else
|
|
601
|
+
b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
602
|
+
else
|
|
603
|
+
ot(L, t);
|
|
604
|
+
}
|
|
605
|
+
if (Z.call(o, "key")) {
|
|
606
|
+
var $ = A(t), T = Object.keys(o).filter(function(nr) {
|
|
607
|
+
return nr !== "key";
|
|
608
|
+
}), Se = T.length > 0 ? "{key: someKey, " + T.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
609
|
+
if (!st[$ + Se]) {
|
|
610
|
+
var rr = T.length > 0 ? "{" + T.join(": ..., ") + ": ...}" : "{}";
|
|
611
|
+
b(`A props object containing a "key" prop is being spread into JSX:
|
|
612
|
+
let props = %s;
|
|
613
|
+
<%s {...props} />
|
|
614
|
+
React keys must be passed directly to JSX without using spread:
|
|
615
|
+
let props = %s;
|
|
616
|
+
<%s key={someKey} {...props} />`, Se, $, rr, $), st[$ + Se] = !0;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
return t === a ? Zt(S) : Xt(S), S;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
function Qt(t, o, s) {
|
|
623
|
+
return lt(t, o, s, !0);
|
|
624
|
+
}
|
|
625
|
+
function Ht(t, o, s) {
|
|
626
|
+
return lt(t, o, s, !1);
|
|
627
|
+
}
|
|
628
|
+
var er = Ht, tr = Qt;
|
|
629
|
+
ee.Fragment = a, ee.jsx = er, ee.jsxs = tr;
|
|
630
|
+
}()), ee;
|
|
631
|
+
}
|
|
632
|
+
process.env.NODE_ENV === "production" ? je.exports = ir() : je.exports = or();
|
|
633
|
+
var m = je.exports;
|
|
634
|
+
const te = ({ classIcon: e }) => /* @__PURE__ */ m.jsx("i", { className: `bi ${e}` }), sr = ({
|
|
635
|
+
className: e,
|
|
636
|
+
onClick: r,
|
|
637
|
+
title: n,
|
|
638
|
+
classIcon: a,
|
|
639
|
+
positionicon: i
|
|
640
|
+
}) => {
|
|
641
|
+
const l = (u) => {
|
|
642
|
+
r && r(u);
|
|
643
|
+
};
|
|
644
|
+
return /* @__PURE__ */ m.jsxs("button", { type: "submit", onClick: (u) => l(u), className: e, children: [
|
|
645
|
+
a && i == 1 && /* @__PURE__ */ m.jsx("span", { className: "mr-2", children: /* @__PURE__ */ m.jsx(te, { classIcon: a }) }),
|
|
646
|
+
/* @__PURE__ */ m.jsx("span", { children: n }),
|
|
647
|
+
a && i == 2 && /* @__PURE__ */ m.jsx("span", { className: "ml-2", children: /* @__PURE__ */ m.jsx(te, { classIcon: a }) })
|
|
648
|
+
] });
|
|
649
|
+
}, lr = (e) => {
|
|
650
|
+
const r = e.active ? "expand--active" : "";
|
|
651
|
+
return /* @__PURE__ */ m.jsxs(
|
|
652
|
+
"div",
|
|
653
|
+
{
|
|
654
|
+
onClick: () => e.onChange(e.item),
|
|
655
|
+
className: `expand ${r} ${e.className}`,
|
|
656
|
+
children: [
|
|
657
|
+
/* @__PURE__ */ m.jsxs("div", { className: "expand-header", children: [
|
|
658
|
+
/* @__PURE__ */ m.jsx("span", { className: "flex-1 expand-header-title-left", children: e.item.title }),
|
|
659
|
+
e.item.description && /* @__PURE__ */ m.jsx("span", { className: "expand-header-title-right", children: e.item.description })
|
|
660
|
+
] }),
|
|
661
|
+
/* @__PURE__ */ m.jsx("div", { className: "expand-body", children: e.item.content })
|
|
662
|
+
]
|
|
663
|
+
}
|
|
664
|
+
);
|
|
665
|
+
}, Qr = (e) => {
|
|
666
|
+
const [r, n] = pe(e.items[0]), a = Le(
|
|
667
|
+
(i) => {
|
|
668
|
+
n(i);
|
|
669
|
+
},
|
|
670
|
+
[n]
|
|
671
|
+
);
|
|
672
|
+
return /* @__PURE__ */ m.jsx("div", { className: `expands ${e.className || ""}`, children: e.items.map((i) => /* @__PURE__ */ m.jsx(
|
|
673
|
+
lr,
|
|
674
|
+
{
|
|
675
|
+
item: i,
|
|
676
|
+
onChange: a,
|
|
677
|
+
active: r.id === i.id
|
|
678
|
+
},
|
|
679
|
+
i.id
|
|
680
|
+
)) });
|
|
681
|
+
}, Hr = ({
|
|
682
|
+
children: e,
|
|
683
|
+
logo: r,
|
|
684
|
+
onClickMenu: n,
|
|
685
|
+
onClickUser: a,
|
|
686
|
+
positionFixed: i
|
|
687
|
+
}) => /* @__PURE__ */ m.jsxs("div", { className: `header ${i ? "header--fixed" : ""}`, children: [
|
|
688
|
+
/* @__PURE__ */ m.jsxs("div", { className: "flex-1 d-flex align-items-center", children: [
|
|
689
|
+
/* @__PURE__ */ m.jsx("span", { onClick: n, children: /* @__PURE__ */ m.jsx(te, { classIcon: "bi-list" }) }),
|
|
690
|
+
/* @__PURE__ */ m.jsx("span", { className: "header-logo", children: r && /* @__PURE__ */ m.jsx("img", { src: r, alt: "logo" }) })
|
|
691
|
+
] }),
|
|
692
|
+
/* @__PURE__ */ m.jsxs("div", { className: "d-flex", children: [
|
|
693
|
+
e,
|
|
694
|
+
/* @__PURE__ */ m.jsx("span", { onClick: a, children: /* @__PURE__ */ m.jsx(te, { classIcon: "bi-person-circle" }) })
|
|
695
|
+
] })
|
|
696
|
+
] });
|
|
697
|
+
/**
|
|
698
|
+
* @remix-run/router v1.20.0
|
|
699
|
+
*
|
|
700
|
+
* Copyright (c) Remix Software Inc.
|
|
701
|
+
*
|
|
702
|
+
* This source code is licensed under the MIT license found in the
|
|
703
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
704
|
+
*
|
|
705
|
+
* @license MIT
|
|
706
|
+
*/
|
|
707
|
+
function Te() {
|
|
708
|
+
return Te = Object.assign ? Object.assign.bind() : function(e) {
|
|
709
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
710
|
+
var n = arguments[r];
|
|
711
|
+
for (var a in n)
|
|
712
|
+
Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
|
|
713
|
+
}
|
|
714
|
+
return e;
|
|
715
|
+
}, Te.apply(this, arguments);
|
|
716
|
+
}
|
|
717
|
+
var dt;
|
|
718
|
+
(function(e) {
|
|
719
|
+
e.Pop = "POP", e.Push = "PUSH", e.Replace = "REPLACE";
|
|
720
|
+
})(dt || (dt = {}));
|
|
721
|
+
function _(e, r) {
|
|
722
|
+
if (e === !1 || e === null || typeof e > "u")
|
|
723
|
+
throw new Error(r);
|
|
724
|
+
}
|
|
725
|
+
function re(e, r) {
|
|
726
|
+
if (!e) {
|
|
727
|
+
typeof console < "u" && console.warn(r);
|
|
728
|
+
try {
|
|
729
|
+
throw new Error(r);
|
|
730
|
+
} catch {
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
function De(e) {
|
|
735
|
+
let {
|
|
736
|
+
pathname: r = "/",
|
|
737
|
+
search: n = "",
|
|
738
|
+
hash: a = ""
|
|
739
|
+
} = e;
|
|
740
|
+
return n && n !== "?" && (r += n.charAt(0) === "?" ? n : "?" + n), a && a !== "#" && (r += a.charAt(0) === "#" ? a : "#" + a), r;
|
|
741
|
+
}
|
|
742
|
+
function gt(e) {
|
|
743
|
+
let r = {};
|
|
744
|
+
if (e) {
|
|
745
|
+
let n = e.indexOf("#");
|
|
746
|
+
n >= 0 && (r.hash = e.substr(n), e = e.substr(0, n));
|
|
747
|
+
let a = e.indexOf("?");
|
|
748
|
+
a >= 0 && (r.search = e.substr(a), e = e.substr(0, a)), e && (r.pathname = e);
|
|
749
|
+
}
|
|
750
|
+
return r;
|
|
751
|
+
}
|
|
752
|
+
var ht;
|
|
753
|
+
(function(e) {
|
|
754
|
+
e.data = "data", e.deferred = "deferred", e.redirect = "redirect", e.error = "error";
|
|
755
|
+
})(ht || (ht = {}));
|
|
756
|
+
function vt(e, r) {
|
|
757
|
+
typeof e == "string" && (e = {
|
|
758
|
+
path: e,
|
|
759
|
+
caseSensitive: !1,
|
|
760
|
+
end: !0
|
|
761
|
+
});
|
|
762
|
+
let [n, a] = ur(e.path, e.caseSensitive, e.end), i = r.match(n);
|
|
763
|
+
if (!i) return null;
|
|
764
|
+
let l = i[0], u = l.replace(/(.)\/+$/, "$1"), c = i.slice(1);
|
|
765
|
+
return {
|
|
766
|
+
params: a.reduce((d, v, g) => {
|
|
767
|
+
let {
|
|
768
|
+
paramName: x,
|
|
769
|
+
isOptional: k
|
|
770
|
+
} = v;
|
|
771
|
+
if (x === "*") {
|
|
772
|
+
let F = c[g] || "";
|
|
773
|
+
u = l.slice(0, l.length - F.length).replace(/(.)\/+$/, "$1");
|
|
774
|
+
}
|
|
775
|
+
const P = c[g];
|
|
776
|
+
return k && !P ? d[x] = void 0 : d[x] = (P || "").replace(/%2F/g, "/"), d;
|
|
777
|
+
}, {}),
|
|
778
|
+
pathname: l,
|
|
779
|
+
pathnameBase: u,
|
|
780
|
+
pattern: e
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
function ur(e, r, n) {
|
|
784
|
+
r === void 0 && (r = !1), n === void 0 && (n = !0), re(e === "*" || !e.endsWith("*") || e.endsWith("/*"), 'Route path "' + e + '" will be treated as if it were ' + ('"' + e.replace(/\*$/, "/*") + '" because the `*` character must ') + "always follow a `/` in the pattern. To get rid of this warning, " + ('please change the route path to "' + e.replace(/\*$/, "/*") + '".'));
|
|
785
|
+
let a = [], i = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (u, c, f) => (a.push({
|
|
786
|
+
paramName: c,
|
|
787
|
+
isOptional: f != null
|
|
788
|
+
}), f ? "/?([^\\/]+)?" : "/([^\\/]+)"));
|
|
789
|
+
return e.endsWith("*") ? (a.push({
|
|
790
|
+
paramName: "*"
|
|
791
|
+
}), i += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? i += "\\/*$" : e !== "" && e !== "/" && (i += "(?:(?=\\/|$))"), [new RegExp(i, r ? void 0 : "i"), a];
|
|
792
|
+
}
|
|
793
|
+
function B(e, r) {
|
|
794
|
+
if (r === "/") return e;
|
|
795
|
+
if (!e.toLowerCase().startsWith(r.toLowerCase()))
|
|
796
|
+
return null;
|
|
797
|
+
let n = r.endsWith("/") ? r.length - 1 : r.length, a = e.charAt(n);
|
|
798
|
+
return a && a !== "/" ? null : e.slice(n) || "/";
|
|
799
|
+
}
|
|
800
|
+
function cr(e, r) {
|
|
801
|
+
r === void 0 && (r = "/");
|
|
802
|
+
let {
|
|
803
|
+
pathname: n,
|
|
804
|
+
search: a = "",
|
|
805
|
+
hash: i = ""
|
|
806
|
+
} = typeof e == "string" ? gt(e) : e;
|
|
807
|
+
return {
|
|
808
|
+
pathname: n ? n.startsWith("/") ? n : fr(n, r) : r,
|
|
809
|
+
search: hr(a),
|
|
810
|
+
hash: vr(i)
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
function fr(e, r) {
|
|
814
|
+
let n = r.replace(/\/+$/, "").split("/");
|
|
815
|
+
return e.split("/").forEach((i) => {
|
|
816
|
+
i === ".." ? n.length > 1 && n.pop() : i !== "." && n.push(i);
|
|
817
|
+
}), n.length > 1 ? n.join("/") : "/";
|
|
818
|
+
}
|
|
819
|
+
function Oe(e, r, n, a) {
|
|
820
|
+
return "Cannot include a '" + e + "' character in a manually specified " + ("`to." + r + "` field [" + JSON.stringify(a) + "]. Please separate it out to the ") + ("`to." + n + "` field. Alternatively you may provide the full path as ") + 'a string in <Link to="..."> and the router will parse it for you.';
|
|
821
|
+
}
|
|
822
|
+
function dr(e) {
|
|
823
|
+
return e.filter((r, n) => n === 0 || r.route.path && r.route.path.length > 0);
|
|
824
|
+
}
|
|
825
|
+
function bt(e, r) {
|
|
826
|
+
let n = dr(e);
|
|
827
|
+
return r ? n.map((a, i) => i === n.length - 1 ? a.pathname : a.pathnameBase) : n.map((a) => a.pathnameBase);
|
|
828
|
+
}
|
|
829
|
+
function yt(e, r, n, a) {
|
|
830
|
+
a === void 0 && (a = !1);
|
|
831
|
+
let i;
|
|
832
|
+
typeof e == "string" ? i = gt(e) : (i = Te({}, e), _(!i.pathname || !i.pathname.includes("?"), Oe("?", "pathname", "search", i)), _(!i.pathname || !i.pathname.includes("#"), Oe("#", "pathname", "hash", i)), _(!i.search || !i.search.includes("#"), Oe("#", "search", "hash", i)));
|
|
833
|
+
let l = e === "" || i.pathname === "", u = l ? "/" : i.pathname, c;
|
|
834
|
+
if (u == null)
|
|
835
|
+
c = n;
|
|
836
|
+
else {
|
|
837
|
+
let g = r.length - 1;
|
|
838
|
+
if (!a && u.startsWith("..")) {
|
|
839
|
+
let x = u.split("/");
|
|
840
|
+
for (; x[0] === ".."; )
|
|
841
|
+
x.shift(), g -= 1;
|
|
842
|
+
i.pathname = x.join("/");
|
|
843
|
+
}
|
|
844
|
+
c = g >= 0 ? r[g] : "/";
|
|
845
|
+
}
|
|
846
|
+
let f = cr(i, c), d = u && u !== "/" && u.endsWith("/"), v = (l || u === ".") && n.endsWith("/");
|
|
847
|
+
return !f.pathname.endsWith("/") && (d || v) && (f.pathname += "/"), f;
|
|
848
|
+
}
|
|
849
|
+
const Fe = (e) => e.join("/").replace(/\/\/+/g, "/"), hr = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, vr = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, Et = ["post", "put", "patch", "delete"];
|
|
850
|
+
new Set(Et);
|
|
851
|
+
const pr = ["get", ...Et];
|
|
852
|
+
new Set(pr);
|
|
853
|
+
/**
|
|
854
|
+
* React Router v6.27.0
|
|
855
|
+
*
|
|
856
|
+
* Copyright (c) Remix Software Inc.
|
|
857
|
+
*
|
|
858
|
+
* This source code is licensed under the MIT license found in the
|
|
859
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
860
|
+
*
|
|
861
|
+
* @license MIT
|
|
862
|
+
*/
|
|
863
|
+
function ke() {
|
|
864
|
+
return ke = Object.assign ? Object.assign.bind() : function(e) {
|
|
865
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
866
|
+
var n = arguments[r];
|
|
867
|
+
for (var a in n)
|
|
868
|
+
Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
|
|
869
|
+
}
|
|
870
|
+
return e;
|
|
871
|
+
}, ke.apply(this, arguments);
|
|
872
|
+
}
|
|
873
|
+
const me = /* @__PURE__ */ p.createContext(null);
|
|
874
|
+
process.env.NODE_ENV !== "production" && (me.displayName = "DataRouter");
|
|
875
|
+
const xt = /* @__PURE__ */ p.createContext(null);
|
|
876
|
+
process.env.NODE_ENV !== "production" && (xt.displayName = "DataRouterState");
|
|
877
|
+
const mr = /* @__PURE__ */ p.createContext(null);
|
|
878
|
+
process.env.NODE_ENV !== "production" && (mr.displayName = "Await");
|
|
879
|
+
const V = /* @__PURE__ */ p.createContext(null);
|
|
880
|
+
process.env.NODE_ENV !== "production" && (V.displayName = "Navigation");
|
|
881
|
+
const Ae = /* @__PURE__ */ p.createContext(null);
|
|
882
|
+
process.env.NODE_ENV !== "production" && (Ae.displayName = "Location");
|
|
883
|
+
const K = /* @__PURE__ */ p.createContext({
|
|
884
|
+
outlet: null,
|
|
885
|
+
matches: [],
|
|
886
|
+
isDataRoute: !1
|
|
887
|
+
});
|
|
888
|
+
process.env.NODE_ENV !== "production" && (K.displayName = "Route");
|
|
889
|
+
const gr = /* @__PURE__ */ p.createContext(null);
|
|
890
|
+
process.env.NODE_ENV !== "production" && (gr.displayName = "RouteError");
|
|
891
|
+
function br(e, r) {
|
|
892
|
+
let {
|
|
893
|
+
relative: n
|
|
894
|
+
} = r === void 0 ? {} : r;
|
|
895
|
+
Ve() || (process.env.NODE_ENV !== "production" ? _(
|
|
896
|
+
!1,
|
|
897
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
898
|
+
// router loaded. We can help them understand how to avoid that.
|
|
899
|
+
"useHref() may be used only in the context of a <Router> component."
|
|
900
|
+
) : _(!1));
|
|
901
|
+
let {
|
|
902
|
+
basename: a,
|
|
903
|
+
navigator: i
|
|
904
|
+
} = p.useContext(V), {
|
|
905
|
+
hash: l,
|
|
906
|
+
pathname: u,
|
|
907
|
+
search: c
|
|
908
|
+
} = ae(e, {
|
|
909
|
+
relative: n
|
|
910
|
+
}), f = u;
|
|
911
|
+
return a !== "/" && (f = u === "/" ? a : Fe([a, u])), i.createHref({
|
|
912
|
+
pathname: f,
|
|
913
|
+
search: c,
|
|
914
|
+
hash: l
|
|
915
|
+
});
|
|
916
|
+
}
|
|
917
|
+
function Ve() {
|
|
918
|
+
return p.useContext(Ae) != null;
|
|
919
|
+
}
|
|
920
|
+
function ne() {
|
|
921
|
+
return Ve() || (process.env.NODE_ENV !== "production" ? _(
|
|
922
|
+
!1,
|
|
923
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
924
|
+
// router loaded. We can help them understand how to avoid that.
|
|
925
|
+
"useLocation() may be used only in the context of a <Router> component."
|
|
926
|
+
) : _(!1)), p.useContext(Ae).location;
|
|
927
|
+
}
|
|
928
|
+
const Rt = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
929
|
+
function Ct(e) {
|
|
930
|
+
p.useContext(V).static || p.useLayoutEffect(e);
|
|
931
|
+
}
|
|
932
|
+
function yr() {
|
|
933
|
+
let {
|
|
934
|
+
isDataRoute: e
|
|
935
|
+
} = p.useContext(K);
|
|
936
|
+
return e ? wr() : Er();
|
|
937
|
+
}
|
|
938
|
+
function Er() {
|
|
939
|
+
Ve() || (process.env.NODE_ENV !== "production" ? _(
|
|
940
|
+
!1,
|
|
941
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
942
|
+
// router loaded. We can help them understand how to avoid that.
|
|
943
|
+
"useNavigate() may be used only in the context of a <Router> component."
|
|
944
|
+
) : _(!1));
|
|
945
|
+
let e = p.useContext(me), {
|
|
946
|
+
basename: r,
|
|
947
|
+
future: n,
|
|
948
|
+
navigator: a
|
|
949
|
+
} = p.useContext(V), {
|
|
950
|
+
matches: i
|
|
951
|
+
} = p.useContext(K), {
|
|
952
|
+
pathname: l
|
|
953
|
+
} = ne(), u = JSON.stringify(bt(i, n.v7_relativeSplatPath)), c = p.useRef(!1);
|
|
954
|
+
return Ct(() => {
|
|
955
|
+
c.current = !0;
|
|
956
|
+
}), p.useCallback(function(d, v) {
|
|
957
|
+
if (v === void 0 && (v = {}), process.env.NODE_ENV !== "production" && re(c.current, Rt), !c.current) return;
|
|
958
|
+
if (typeof d == "number") {
|
|
959
|
+
a.go(d);
|
|
960
|
+
return;
|
|
961
|
+
}
|
|
962
|
+
let g = yt(d, JSON.parse(u), l, v.relative === "path");
|
|
963
|
+
e == null && r !== "/" && (g.pathname = g.pathname === "/" ? r : Fe([r, g.pathname])), (v.replace ? a.replace : a.push)(g, v.state, v);
|
|
964
|
+
}, [r, a, u, l, e]);
|
|
965
|
+
}
|
|
966
|
+
function ae(e, r) {
|
|
967
|
+
let {
|
|
968
|
+
relative: n
|
|
969
|
+
} = r === void 0 ? {} : r, {
|
|
970
|
+
future: a
|
|
971
|
+
} = p.useContext(V), {
|
|
972
|
+
matches: i
|
|
973
|
+
} = p.useContext(K), {
|
|
974
|
+
pathname: l
|
|
975
|
+
} = ne(), u = JSON.stringify(bt(i, a.v7_relativeSplatPath));
|
|
976
|
+
return p.useMemo(() => yt(e, JSON.parse(u), l, n === "path"), [e, u, l, n]);
|
|
977
|
+
}
|
|
978
|
+
var wt = /* @__PURE__ */ function(e) {
|
|
979
|
+
return e.UseBlocker = "useBlocker", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e;
|
|
980
|
+
}(wt || {}), Ie = /* @__PURE__ */ function(e) {
|
|
981
|
+
return e.UseBlocker = "useBlocker", e.UseLoaderData = "useLoaderData", e.UseActionData = "useActionData", e.UseRouteError = "useRouteError", e.UseNavigation = "useNavigation", e.UseRouteLoaderData = "useRouteLoaderData", e.UseMatches = "useMatches", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e.UseRouteId = "useRouteId", e;
|
|
982
|
+
}(Ie || {});
|
|
983
|
+
function _t(e) {
|
|
984
|
+
return e + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";
|
|
985
|
+
}
|
|
986
|
+
function xr(e) {
|
|
987
|
+
let r = p.useContext(me);
|
|
988
|
+
return r || (process.env.NODE_ENV !== "production" ? _(!1, _t(e)) : _(!1)), r;
|
|
989
|
+
}
|
|
990
|
+
function Rr(e) {
|
|
991
|
+
let r = p.useContext(K);
|
|
992
|
+
return r || (process.env.NODE_ENV !== "production" ? _(!1, _t(e)) : _(!1)), r;
|
|
993
|
+
}
|
|
994
|
+
function Nt(e) {
|
|
995
|
+
let r = Rr(e), n = r.matches[r.matches.length - 1];
|
|
996
|
+
return n.route.id || (process.env.NODE_ENV !== "production" ? _(!1, e + ' can only be used on routes that contain a unique "id"') : _(!1)), n.route.id;
|
|
997
|
+
}
|
|
998
|
+
function Cr() {
|
|
999
|
+
return Nt(Ie.UseRouteId);
|
|
1000
|
+
}
|
|
1001
|
+
function wr() {
|
|
1002
|
+
let {
|
|
1003
|
+
router: e
|
|
1004
|
+
} = xr(wt.UseNavigateStable), r = Nt(Ie.UseNavigateStable), n = p.useRef(!1);
|
|
1005
|
+
return Ct(() => {
|
|
1006
|
+
n.current = !0;
|
|
1007
|
+
}), p.useCallback(function(i, l) {
|
|
1008
|
+
l === void 0 && (l = {}), process.env.NODE_ENV !== "production" && re(n.current, Rt), n.current && (typeof i == "number" ? e.navigate(i) : e.navigate(i, ke({
|
|
1009
|
+
fromRouteId: r
|
|
1010
|
+
}, l)));
|
|
1011
|
+
}, [e, r]);
|
|
1012
|
+
}
|
|
1013
|
+
new Promise(() => {
|
|
1014
|
+
});
|
|
1015
|
+
/**
|
|
1016
|
+
* React Router DOM v6.27.0
|
|
1017
|
+
*
|
|
1018
|
+
* Copyright (c) Remix Software Inc.
|
|
1019
|
+
*
|
|
1020
|
+
* This source code is licensed under the MIT license found in the
|
|
1021
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
1022
|
+
*
|
|
1023
|
+
* @license MIT
|
|
1024
|
+
*/
|
|
1025
|
+
function J() {
|
|
1026
|
+
return J = Object.assign ? Object.assign.bind() : function(e) {
|
|
1027
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
1028
|
+
var n = arguments[r];
|
|
1029
|
+
for (var a in n)
|
|
1030
|
+
Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
|
|
1031
|
+
}
|
|
1032
|
+
return e;
|
|
1033
|
+
}, J.apply(this, arguments);
|
|
1034
|
+
}
|
|
1035
|
+
function Ue(e, r) {
|
|
1036
|
+
if (e == null) return {};
|
|
1037
|
+
var n = {}, a = Object.keys(e), i, l;
|
|
1038
|
+
for (l = 0; l < a.length; l++)
|
|
1039
|
+
i = a[l], !(r.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
1040
|
+
return n;
|
|
1041
|
+
}
|
|
1042
|
+
const de = "get", he = "application/x-www-form-urlencoded";
|
|
1043
|
+
function ge(e) {
|
|
1044
|
+
return e != null && typeof e.tagName == "string";
|
|
1045
|
+
}
|
|
1046
|
+
function _r(e) {
|
|
1047
|
+
return ge(e) && e.tagName.toLowerCase() === "button";
|
|
1048
|
+
}
|
|
1049
|
+
function Nr(e) {
|
|
1050
|
+
return ge(e) && e.tagName.toLowerCase() === "form";
|
|
1051
|
+
}
|
|
1052
|
+
function Sr(e) {
|
|
1053
|
+
return ge(e) && e.tagName.toLowerCase() === "input";
|
|
1054
|
+
}
|
|
1055
|
+
function Or(e) {
|
|
1056
|
+
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
1057
|
+
}
|
|
1058
|
+
function Pr(e, r) {
|
|
1059
|
+
return e.button === 0 && // Ignore everything but left clicks
|
|
1060
|
+
(!r || r === "_self") && // Let browser handle "target=_blank" etc.
|
|
1061
|
+
!Or(e);
|
|
1062
|
+
}
|
|
1063
|
+
let fe = null;
|
|
1064
|
+
function jr() {
|
|
1065
|
+
if (fe === null)
|
|
1066
|
+
try {
|
|
1067
|
+
new FormData(
|
|
1068
|
+
document.createElement("form"),
|
|
1069
|
+
// @ts-expect-error if FormData supports the submitter parameter, this will throw
|
|
1070
|
+
0
|
|
1071
|
+
), fe = !1;
|
|
1072
|
+
} catch {
|
|
1073
|
+
fe = !0;
|
|
1074
|
+
}
|
|
1075
|
+
return fe;
|
|
1076
|
+
}
|
|
1077
|
+
const Tr = /* @__PURE__ */ new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
|
|
1078
|
+
function Pe(e) {
|
|
1079
|
+
return e != null && !Tr.has(e) ? (process.env.NODE_ENV !== "production" && re(!1, '"' + e + '" is not a valid `encType` for `<Form>`/`<fetcher.Form>` ' + ('and will default to "' + he + '"')), null) : e;
|
|
1080
|
+
}
|
|
1081
|
+
function Dr(e, r) {
|
|
1082
|
+
let n, a, i, l, u;
|
|
1083
|
+
if (Nr(e)) {
|
|
1084
|
+
let c = e.getAttribute("action");
|
|
1085
|
+
a = c ? B(c, r) : null, n = e.getAttribute("method") || de, i = Pe(e.getAttribute("enctype")) || he, l = new FormData(e);
|
|
1086
|
+
} else if (_r(e) || Sr(e) && (e.type === "submit" || e.type === "image")) {
|
|
1087
|
+
let c = e.form;
|
|
1088
|
+
if (c == null)
|
|
1089
|
+
throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
|
|
1090
|
+
let f = e.getAttribute("formaction") || c.getAttribute("action");
|
|
1091
|
+
if (a = f ? B(f, r) : null, n = e.getAttribute("formmethod") || c.getAttribute("method") || de, i = Pe(e.getAttribute("formenctype")) || Pe(c.getAttribute("enctype")) || he, l = new FormData(c, e), !jr()) {
|
|
1092
|
+
let {
|
|
1093
|
+
name: d,
|
|
1094
|
+
type: v,
|
|
1095
|
+
value: g
|
|
1096
|
+
} = e;
|
|
1097
|
+
if (v === "image") {
|
|
1098
|
+
let x = d ? d + "." : "";
|
|
1099
|
+
l.append(x + "x", "0"), l.append(x + "y", "0");
|
|
1100
|
+
} else d && l.append(d, g);
|
|
1101
|
+
}
|
|
1102
|
+
} else {
|
|
1103
|
+
if (ge(e))
|
|
1104
|
+
throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
|
|
1105
|
+
n = de, a = null, i = he, u = e;
|
|
1106
|
+
}
|
|
1107
|
+
return l && i === "text/plain" && (u = l, l = void 0), {
|
|
1108
|
+
action: a,
|
|
1109
|
+
method: n.toLowerCase(),
|
|
1110
|
+
encType: i,
|
|
1111
|
+
formData: l,
|
|
1112
|
+
body: u
|
|
1113
|
+
};
|
|
1114
|
+
}
|
|
1115
|
+
const kr = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "viewTransition"], Lr = ["aria-current", "caseSensitive", "className", "end", "style", "to", "viewTransition", "children"], Fr = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "viewTransition"], Ar = "6";
|
|
1116
|
+
try {
|
|
1117
|
+
window.__reactRouterVersion = Ar;
|
|
1118
|
+
} catch {
|
|
1119
|
+
}
|
|
1120
|
+
const St = /* @__PURE__ */ p.createContext({
|
|
1121
|
+
isTransitioning: !1
|
|
1122
|
+
});
|
|
1123
|
+
process.env.NODE_ENV !== "production" && (St.displayName = "ViewTransition");
|
|
1124
|
+
const Vr = /* @__PURE__ */ p.createContext(/* @__PURE__ */ new Map());
|
|
1125
|
+
process.env.NODE_ENV !== "production" && (Vr.displayName = "Fetchers");
|
|
1126
|
+
process.env.NODE_ENV;
|
|
1127
|
+
const Ir = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", Ur = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ot = /* @__PURE__ */ p.forwardRef(function(r, n) {
|
|
1128
|
+
let {
|
|
1129
|
+
onClick: a,
|
|
1130
|
+
relative: i,
|
|
1131
|
+
reloadDocument: l,
|
|
1132
|
+
replace: u,
|
|
1133
|
+
state: c,
|
|
1134
|
+
target: f,
|
|
1135
|
+
to: d,
|
|
1136
|
+
preventScrollReset: v,
|
|
1137
|
+
viewTransition: g
|
|
1138
|
+
} = r, x = Ue(r, kr), {
|
|
1139
|
+
basename: k
|
|
1140
|
+
} = p.useContext(V), P, F = !1;
|
|
1141
|
+
if (typeof d == "string" && Ur.test(d) && (P = d, Ir))
|
|
1142
|
+
try {
|
|
1143
|
+
let O = new URL(window.location.href), N = d.startsWith("//") ? new URL(O.protocol + d) : new URL(d), W = B(N.pathname, k);
|
|
1144
|
+
N.origin === O.origin && W != null ? d = W + N.search + N.hash : F = !0;
|
|
1145
|
+
} catch {
|
|
1146
|
+
process.env.NODE_ENV !== "production" && re(!1, '<Link to="' + d + '"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.');
|
|
1147
|
+
}
|
|
1148
|
+
let I = br(d, {
|
|
1149
|
+
relative: i
|
|
1150
|
+
}), D = Mr(d, {
|
|
1151
|
+
replace: u,
|
|
1152
|
+
state: c,
|
|
1153
|
+
target: f,
|
|
1154
|
+
preventScrollReset: v,
|
|
1155
|
+
relative: i,
|
|
1156
|
+
viewTransition: g
|
|
1157
|
+
});
|
|
1158
|
+
function b(O) {
|
|
1159
|
+
a && a(O), O.defaultPrevented || D(O);
|
|
1160
|
+
}
|
|
1161
|
+
return (
|
|
1162
|
+
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
1163
|
+
/* @__PURE__ */ p.createElement("a", J({}, x, {
|
|
1164
|
+
href: P || I,
|
|
1165
|
+
onClick: F || l ? a : b,
|
|
1166
|
+
ref: n,
|
|
1167
|
+
target: f
|
|
1168
|
+
}))
|
|
1169
|
+
);
|
|
1170
|
+
});
|
|
1171
|
+
process.env.NODE_ENV !== "production" && (Ot.displayName = "Link");
|
|
1172
|
+
const Pt = /* @__PURE__ */ p.forwardRef(function(r, n) {
|
|
1173
|
+
let {
|
|
1174
|
+
"aria-current": a = "page",
|
|
1175
|
+
caseSensitive: i = !1,
|
|
1176
|
+
className: l = "",
|
|
1177
|
+
end: u = !1,
|
|
1178
|
+
style: c,
|
|
1179
|
+
to: f,
|
|
1180
|
+
viewTransition: d,
|
|
1181
|
+
children: v
|
|
1182
|
+
} = r, g = Ue(r, Lr), x = ae(f, {
|
|
1183
|
+
relative: g.relative
|
|
1184
|
+
}), k = ne(), P = p.useContext(xt), {
|
|
1185
|
+
navigator: F,
|
|
1186
|
+
basename: I
|
|
1187
|
+
} = p.useContext(V), D = P != null && // Conditional usage is OK here because the usage of a data router is static
|
|
1188
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1189
|
+
zr(x) && d === !0, b = F.encodeLocation ? F.encodeLocation(x).pathname : x.pathname, O = k.pathname, N = P && P.navigation && P.navigation.location ? P.navigation.location.pathname : null;
|
|
1190
|
+
i || (O = O.toLowerCase(), N = N ? N.toLowerCase() : null, b = b.toLowerCase()), N && I && (N = B(N, I) || N);
|
|
1191
|
+
const W = b !== "/" && b.endsWith("/") ? b.length - 1 : b.length;
|
|
1192
|
+
let q = O === b || !u && O.startsWith(b) && O.charAt(W) === "/", ie = N != null && (N === b || !u && N.startsWith(b) && N.charAt(b.length) === "/"), z = {
|
|
1193
|
+
isActive: q,
|
|
1194
|
+
isPending: ie,
|
|
1195
|
+
isTransitioning: D
|
|
1196
|
+
}, oe = q ? a : void 0, G;
|
|
1197
|
+
typeof l == "function" ? G = l(z) : G = [l, q ? "active" : null, ie ? "pending" : null, D ? "transitioning" : null].filter(Boolean).join(" ");
|
|
1198
|
+
let be = typeof c == "function" ? c(z) : c;
|
|
1199
|
+
return /* @__PURE__ */ p.createElement(Ot, J({}, g, {
|
|
1200
|
+
"aria-current": oe,
|
|
1201
|
+
className: G,
|
|
1202
|
+
ref: n,
|
|
1203
|
+
style: be,
|
|
1204
|
+
to: f,
|
|
1205
|
+
viewTransition: d
|
|
1206
|
+
}), typeof v == "function" ? v(z) : v);
|
|
1207
|
+
});
|
|
1208
|
+
process.env.NODE_ENV !== "production" && (Pt.displayName = "NavLink");
|
|
1209
|
+
const $r = /* @__PURE__ */ p.forwardRef((e, r) => {
|
|
1210
|
+
let {
|
|
1211
|
+
fetcherKey: n,
|
|
1212
|
+
navigate: a,
|
|
1213
|
+
reloadDocument: i,
|
|
1214
|
+
replace: l,
|
|
1215
|
+
state: u,
|
|
1216
|
+
method: c = de,
|
|
1217
|
+
action: f,
|
|
1218
|
+
onSubmit: d,
|
|
1219
|
+
relative: v,
|
|
1220
|
+
preventScrollReset: g,
|
|
1221
|
+
viewTransition: x
|
|
1222
|
+
} = e, k = Ue(e, Fr), P = Kr(), F = qr(f, {
|
|
1223
|
+
relative: v
|
|
1224
|
+
}), I = c.toLowerCase() === "get" ? "get" : "post", D = (b) => {
|
|
1225
|
+
if (d && d(b), b.defaultPrevented) return;
|
|
1226
|
+
b.preventDefault();
|
|
1227
|
+
let O = b.nativeEvent.submitter, N = (O == null ? void 0 : O.getAttribute("formmethod")) || c;
|
|
1228
|
+
P(O || b.currentTarget, {
|
|
1229
|
+
fetcherKey: n,
|
|
1230
|
+
method: N,
|
|
1231
|
+
navigate: a,
|
|
1232
|
+
replace: l,
|
|
1233
|
+
state: u,
|
|
1234
|
+
relative: v,
|
|
1235
|
+
preventScrollReset: g,
|
|
1236
|
+
viewTransition: x
|
|
1237
|
+
});
|
|
1238
|
+
};
|
|
1239
|
+
return /* @__PURE__ */ p.createElement("form", J({
|
|
1240
|
+
ref: r,
|
|
1241
|
+
method: I,
|
|
1242
|
+
action: F,
|
|
1243
|
+
onSubmit: i ? d : D
|
|
1244
|
+
}, k));
|
|
1245
|
+
});
|
|
1246
|
+
process.env.NODE_ENV !== "production" && ($r.displayName = "Form");
|
|
1247
|
+
process.env.NODE_ENV;
|
|
1248
|
+
var ve;
|
|
1249
|
+
(function(e) {
|
|
1250
|
+
e.UseScrollRestoration = "useScrollRestoration", e.UseSubmit = "useSubmit", e.UseSubmitFetcher = "useSubmitFetcher", e.UseFetcher = "useFetcher", e.useViewTransitionState = "useViewTransitionState";
|
|
1251
|
+
})(ve || (ve = {}));
|
|
1252
|
+
var pt;
|
|
1253
|
+
(function(e) {
|
|
1254
|
+
e.UseFetcher = "useFetcher", e.UseFetchers = "useFetchers", e.UseScrollRestoration = "useScrollRestoration";
|
|
1255
|
+
})(pt || (pt = {}));
|
|
1256
|
+
function Wr(e) {
|
|
1257
|
+
return e + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";
|
|
1258
|
+
}
|
|
1259
|
+
function jt(e) {
|
|
1260
|
+
let r = p.useContext(me);
|
|
1261
|
+
return r || (process.env.NODE_ENV !== "production" ? _(!1, Wr(e)) : _(!1)), r;
|
|
1262
|
+
}
|
|
1263
|
+
function Mr(e, r) {
|
|
1264
|
+
let {
|
|
1265
|
+
target: n,
|
|
1266
|
+
replace: a,
|
|
1267
|
+
state: i,
|
|
1268
|
+
preventScrollReset: l,
|
|
1269
|
+
relative: u,
|
|
1270
|
+
viewTransition: c
|
|
1271
|
+
} = r === void 0 ? {} : r, f = yr(), d = ne(), v = ae(e, {
|
|
1272
|
+
relative: u
|
|
1273
|
+
});
|
|
1274
|
+
return p.useCallback((g) => {
|
|
1275
|
+
if (Pr(g, n)) {
|
|
1276
|
+
g.preventDefault();
|
|
1277
|
+
let x = a !== void 0 ? a : De(d) === De(v);
|
|
1278
|
+
f(e, {
|
|
1279
|
+
replace: x,
|
|
1280
|
+
state: i,
|
|
1281
|
+
preventScrollReset: l,
|
|
1282
|
+
relative: u,
|
|
1283
|
+
viewTransition: c
|
|
1284
|
+
});
|
|
1285
|
+
}
|
|
1286
|
+
}, [d, f, v, a, i, n, e, l, u, c]);
|
|
1287
|
+
}
|
|
1288
|
+
function Yr() {
|
|
1289
|
+
if (typeof document > "u")
|
|
1290
|
+
throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");
|
|
1291
|
+
}
|
|
1292
|
+
let Br = 0, Jr = () => "__" + String(++Br) + "__";
|
|
1293
|
+
function Kr() {
|
|
1294
|
+
let {
|
|
1295
|
+
router: e
|
|
1296
|
+
} = jt(ve.UseSubmit), {
|
|
1297
|
+
basename: r
|
|
1298
|
+
} = p.useContext(V), n = Cr();
|
|
1299
|
+
return p.useCallback(function(a, i) {
|
|
1300
|
+
i === void 0 && (i = {}), Yr();
|
|
1301
|
+
let {
|
|
1302
|
+
action: l,
|
|
1303
|
+
method: u,
|
|
1304
|
+
encType: c,
|
|
1305
|
+
formData: f,
|
|
1306
|
+
body: d
|
|
1307
|
+
} = Dr(a, r);
|
|
1308
|
+
if (i.navigate === !1) {
|
|
1309
|
+
let v = i.fetcherKey || Jr();
|
|
1310
|
+
e.fetch(v, n, i.action || l, {
|
|
1311
|
+
preventScrollReset: i.preventScrollReset,
|
|
1312
|
+
formData: f,
|
|
1313
|
+
body: d,
|
|
1314
|
+
formMethod: i.method || u,
|
|
1315
|
+
formEncType: i.encType || c,
|
|
1316
|
+
flushSync: i.flushSync
|
|
1317
|
+
});
|
|
1318
|
+
} else
|
|
1319
|
+
e.navigate(i.action || l, {
|
|
1320
|
+
preventScrollReset: i.preventScrollReset,
|
|
1321
|
+
formData: f,
|
|
1322
|
+
body: d,
|
|
1323
|
+
formMethod: i.method || u,
|
|
1324
|
+
formEncType: i.encType || c,
|
|
1325
|
+
replace: i.replace,
|
|
1326
|
+
state: i.state,
|
|
1327
|
+
fromRouteId: n,
|
|
1328
|
+
flushSync: i.flushSync,
|
|
1329
|
+
viewTransition: i.viewTransition
|
|
1330
|
+
});
|
|
1331
|
+
}, [e, r, n]);
|
|
1332
|
+
}
|
|
1333
|
+
function qr(e, r) {
|
|
1334
|
+
let {
|
|
1335
|
+
relative: n
|
|
1336
|
+
} = r === void 0 ? {} : r, {
|
|
1337
|
+
basename: a
|
|
1338
|
+
} = p.useContext(V), i = p.useContext(K);
|
|
1339
|
+
i || (process.env.NODE_ENV !== "production" ? _(!1, "useFormAction must be used inside a RouteContext") : _(!1));
|
|
1340
|
+
let [l] = i.matches.slice(-1), u = J({}, ae(e || ".", {
|
|
1341
|
+
relative: n
|
|
1342
|
+
})), c = ne();
|
|
1343
|
+
if (e == null) {
|
|
1344
|
+
u.search = c.search;
|
|
1345
|
+
let f = new URLSearchParams(u.search), d = f.getAll("index");
|
|
1346
|
+
if (d.some((g) => g === "")) {
|
|
1347
|
+
f.delete("index"), d.filter((x) => x).forEach((x) => f.append("index", x));
|
|
1348
|
+
let g = f.toString();
|
|
1349
|
+
u.search = g ? "?" + g : "";
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
return (!e || e === ".") && l.route.index && (u.search = u.search ? u.search.replace(/^\?/, "?index&") : "?index"), a !== "/" && (u.pathname = u.pathname === "/" ? a : Fe([a, u.pathname])), De(u);
|
|
1353
|
+
}
|
|
1354
|
+
function zr(e, r) {
|
|
1355
|
+
r === void 0 && (r = {});
|
|
1356
|
+
let n = p.useContext(St);
|
|
1357
|
+
n == null && (process.env.NODE_ENV !== "production" ? _(!1, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?") : _(!1));
|
|
1358
|
+
let {
|
|
1359
|
+
basename: a
|
|
1360
|
+
} = jt(ve.useViewTransitionState), i = ae(e, {
|
|
1361
|
+
relative: r.relative
|
|
1362
|
+
});
|
|
1363
|
+
if (!n.isTransitioning)
|
|
1364
|
+
return !1;
|
|
1365
|
+
let l = B(n.currentLocation.pathname, a) || n.currentLocation.pathname, u = B(n.nextLocation.pathname, a) || n.nextLocation.pathname;
|
|
1366
|
+
return vt(i.pathname, u) != null || vt(i.pathname, l) != null;
|
|
1367
|
+
}
|
|
1368
|
+
const Gr = (e) => /* @__PURE__ */ m.jsx(
|
|
1369
|
+
"div",
|
|
1370
|
+
{
|
|
1371
|
+
onClick: () => e.onChange(e.item),
|
|
1372
|
+
className: e.active ? "expand expand--active" : "expand",
|
|
1373
|
+
children: /* @__PURE__ */ m.jsx(Pt, { to: e.item.link, children: e.item.name })
|
|
1374
|
+
}
|
|
1375
|
+
), en = (e) => {
|
|
1376
|
+
const [r, n] = pe(e.items[0]), a = Le(
|
|
1377
|
+
(i) => {
|
|
1378
|
+
n(i);
|
|
1379
|
+
},
|
|
1380
|
+
[n]
|
|
1381
|
+
);
|
|
1382
|
+
return /* @__PURE__ */ m.jsx("div", { className: `menu ${e.className || ""}`, children: /* @__PURE__ */ m.jsx("ul", { children: e.items.map((i) => /* @__PURE__ */ m.jsx("li", { children: /* @__PURE__ */ m.jsx(
|
|
1383
|
+
Gr,
|
|
1384
|
+
{
|
|
1385
|
+
item: i,
|
|
1386
|
+
onChange: a,
|
|
1387
|
+
active: r.id === i.id
|
|
1388
|
+
}
|
|
1389
|
+
) }, i.id)) }) });
|
|
1390
|
+
}, tn = ({ open: e, content: r, title: n }) => {
|
|
1391
|
+
const [a, i] = pe(e || !1), l = document.createElement("div");
|
|
1392
|
+
l.id = "sidebar-root", ut(() => (document.body.appendChild(l), () => {
|
|
1393
|
+
document.body.removeChild(l);
|
|
1394
|
+
}), [l]), ut(() => {
|
|
1395
|
+
i(e || !1);
|
|
1396
|
+
}, [e]);
|
|
1397
|
+
const u = Le(() => {
|
|
1398
|
+
i(!1);
|
|
1399
|
+
}, [i]);
|
|
1400
|
+
return ar.createPortal(
|
|
1401
|
+
/* @__PURE__ */ m.jsxs(m.Fragment, { children: [
|
|
1402
|
+
a && /* @__PURE__ */ m.jsx("div", { className: "overlay" }),
|
|
1403
|
+
/* @__PURE__ */ m.jsxs("div", { className: `sidebar ${a ? "open" : "closed"}`, children: [
|
|
1404
|
+
/* @__PURE__ */ m.jsxs("div", { className: "sidebar-header", children: [
|
|
1405
|
+
n && /* @__PURE__ */ m.jsx("h2", { className: "flex-1", children: n }),
|
|
1406
|
+
/* @__PURE__ */ m.jsx("button", { className: "toggle-btn", onClick: u, children: /* @__PURE__ */ m.jsx(te, { classIcon: "bi-x-lg" }) })
|
|
1407
|
+
] }),
|
|
1408
|
+
r
|
|
1409
|
+
] })
|
|
1410
|
+
] }),
|
|
1411
|
+
l
|
|
1412
|
+
);
|
|
1413
|
+
}, rn = ({ initialValues: e, onSubmit: r, title: n }) => {
|
|
1414
|
+
const [a, i] = pe(e), l = (c) => {
|
|
1415
|
+
const { name: f, value: d, type: v, checked: g } = c.target;
|
|
1416
|
+
i({
|
|
1417
|
+
...a,
|
|
1418
|
+
[f]: v === "checkbox" ? g : d
|
|
1419
|
+
});
|
|
1420
|
+
}, u = (c) => {
|
|
1421
|
+
c.preventDefault(), r(a);
|
|
1422
|
+
};
|
|
1423
|
+
return /* @__PURE__ */ m.jsxs("form", { onSubmit: u, children: [
|
|
1424
|
+
Object.keys(a).map((c) => /* @__PURE__ */ m.jsxs("div", { className: "d-flex flex-column", children: [
|
|
1425
|
+
/* @__PURE__ */ m.jsx("label", { children: c }),
|
|
1426
|
+
/* @__PURE__ */ m.jsx(
|
|
1427
|
+
"input",
|
|
1428
|
+
{
|
|
1429
|
+
name: c,
|
|
1430
|
+
type: typeof a[c] == "boolean" ? "checkbox" : "text",
|
|
1431
|
+
value: typeof a[c] == "boolean" ? void 0 : a[c],
|
|
1432
|
+
checked: typeof a[c] == "boolean" ? a[c] : void 0,
|
|
1433
|
+
onChange: l
|
|
1434
|
+
}
|
|
1435
|
+
)
|
|
1436
|
+
] }, c)),
|
|
1437
|
+
/* @__PURE__ */ m.jsx(sr, { title: n || "submit" })
|
|
1438
|
+
] });
|
|
1439
|
+
};
|
|
1440
|
+
export {
|
|
1441
|
+
sr as Button,
|
|
1442
|
+
rn as DynamicForm,
|
|
1443
|
+
Qr as Expands,
|
|
1444
|
+
Hr as Header,
|
|
1445
|
+
te as Icon,
|
|
1446
|
+
en as Menus,
|
|
1447
|
+
tn as Sidebar
|
|
1448
|
+
};
|