react-ecosistema-unp 0.1.3 → 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.
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
j
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return a.length < 2 && (a = "0" + a), "%" + a;
|
|
1
|
+
import { jsx as a, Fragment as O, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import d, { useState as b, useEffect as N } from "react";
|
|
3
|
+
import { u as C, a as B } from "../../useFinalizarSesion-COlHmXt5.js";
|
|
4
|
+
import { urlBase as P, urlCertificadoLaboral as S } from "../../utils/Url.js";
|
|
5
|
+
import '../../assets/MenuLateral.css';class h extends Error {
|
|
6
|
+
}
|
|
7
|
+
h.prototype.name = "InvalidTokenError";
|
|
8
|
+
function j(e) {
|
|
9
|
+
return decodeURIComponent(atob(e).replace(/(.)/g, (t, r) => {
|
|
10
|
+
let i = r.charCodeAt(0).toString(16).toUpperCase();
|
|
11
|
+
return i.length < 2 && (i = "0" + i), "%" + i;
|
|
13
12
|
}));
|
|
14
13
|
}
|
|
15
|
-
function
|
|
14
|
+
function H(e) {
|
|
16
15
|
let t = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
17
16
|
switch (t.length % 4) {
|
|
18
17
|
case 0:
|
|
@@ -27,1595 +26,206 @@ function je(e) {
|
|
|
27
26
|
throw new Error("base64 string is not of the correct length");
|
|
28
27
|
}
|
|
29
28
|
try {
|
|
30
|
-
return
|
|
29
|
+
return j(t);
|
|
31
30
|
} catch {
|
|
32
31
|
return atob(t);
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
|
-
function
|
|
34
|
+
function x(e, t) {
|
|
36
35
|
if (typeof e != "string")
|
|
37
|
-
throw new
|
|
36
|
+
throw new h("Invalid token specified: must be a string");
|
|
38
37
|
t || (t = {});
|
|
39
|
-
const
|
|
40
|
-
if (typeof
|
|
41
|
-
throw new
|
|
42
|
-
let
|
|
43
|
-
try {
|
|
44
|
-
r = je(a);
|
|
45
|
-
} catch (i) {
|
|
46
|
-
throw new j(`Invalid token specified: invalid base64 for part #${n + 1} (${i.message})`);
|
|
47
|
-
}
|
|
38
|
+
const r = t.header === !0 ? 0 : 1, i = e.split(".")[r];
|
|
39
|
+
if (typeof i != "string")
|
|
40
|
+
throw new h(`Invalid token specified: missing part #${r + 1}`);
|
|
41
|
+
let c;
|
|
48
42
|
try {
|
|
49
|
-
|
|
50
|
-
} catch (
|
|
51
|
-
throw new
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
var F = {}, fe;
|
|
55
|
-
function Ue() {
|
|
56
|
-
if (fe) return F;
|
|
57
|
-
fe = 1, Object.defineProperty(F, "__esModule", { value: !0 }), F.parse = c, F.serialize = o;
|
|
58
|
-
const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, n = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, a = /^[\u0020-\u003A\u003D-\u007E]*$/, r = Object.prototype.toString, i = /* @__PURE__ */ (() => {
|
|
59
|
-
const h = function() {
|
|
60
|
-
};
|
|
61
|
-
return h.prototype = /* @__PURE__ */ Object.create(null), h;
|
|
62
|
-
})();
|
|
63
|
-
function c(h, m) {
|
|
64
|
-
const d = new i(), w = h.length;
|
|
65
|
-
if (w < 2)
|
|
66
|
-
return d;
|
|
67
|
-
const x = (m == null ? void 0 : m.decode) || f;
|
|
68
|
-
let g = 0;
|
|
69
|
-
do {
|
|
70
|
-
const y = h.indexOf("=", g);
|
|
71
|
-
if (y === -1)
|
|
72
|
-
break;
|
|
73
|
-
const C = h.indexOf(";", g), P = C === -1 ? w : C;
|
|
74
|
-
if (y > P) {
|
|
75
|
-
g = h.lastIndexOf(";", y - 1) + 1;
|
|
76
|
-
continue;
|
|
77
|
-
}
|
|
78
|
-
const R = u(h, g, y), B = l(h, y, R), I = h.slice(R, B);
|
|
79
|
-
if (d[I] === void 0) {
|
|
80
|
-
let z = u(h, y + 1, P), S = l(h, P, z);
|
|
81
|
-
const M = x(h.slice(z, S));
|
|
82
|
-
d[I] = M;
|
|
83
|
-
}
|
|
84
|
-
g = P + 1;
|
|
85
|
-
} while (g < w);
|
|
86
|
-
return d;
|
|
87
|
-
}
|
|
88
|
-
function u(h, m, d) {
|
|
89
|
-
do {
|
|
90
|
-
const w = h.charCodeAt(m);
|
|
91
|
-
if (w !== 32 && w !== 9)
|
|
92
|
-
return m;
|
|
93
|
-
} while (++m < d);
|
|
94
|
-
return d;
|
|
95
|
-
}
|
|
96
|
-
function l(h, m, d) {
|
|
97
|
-
for (; m > d; ) {
|
|
98
|
-
const w = h.charCodeAt(--m);
|
|
99
|
-
if (w !== 32 && w !== 9)
|
|
100
|
-
return m + 1;
|
|
101
|
-
}
|
|
102
|
-
return d;
|
|
103
|
-
}
|
|
104
|
-
function o(h, m, d) {
|
|
105
|
-
const w = (d == null ? void 0 : d.encode) || encodeURIComponent;
|
|
106
|
-
if (!e.test(h))
|
|
107
|
-
throw new TypeError(`argument name is invalid: ${h}`);
|
|
108
|
-
const x = w(m);
|
|
109
|
-
if (!t.test(x))
|
|
110
|
-
throw new TypeError(`argument val is invalid: ${m}`);
|
|
111
|
-
let g = h + "=" + x;
|
|
112
|
-
if (!d)
|
|
113
|
-
return g;
|
|
114
|
-
if (d.maxAge !== void 0) {
|
|
115
|
-
if (!Number.isInteger(d.maxAge))
|
|
116
|
-
throw new TypeError(`option maxAge is invalid: ${d.maxAge}`);
|
|
117
|
-
g += "; Max-Age=" + d.maxAge;
|
|
118
|
-
}
|
|
119
|
-
if (d.domain) {
|
|
120
|
-
if (!n.test(d.domain))
|
|
121
|
-
throw new TypeError(`option domain is invalid: ${d.domain}`);
|
|
122
|
-
g += "; Domain=" + d.domain;
|
|
123
|
-
}
|
|
124
|
-
if (d.path) {
|
|
125
|
-
if (!a.test(d.path))
|
|
126
|
-
throw new TypeError(`option path is invalid: ${d.path}`);
|
|
127
|
-
g += "; Path=" + d.path;
|
|
128
|
-
}
|
|
129
|
-
if (d.expires) {
|
|
130
|
-
if (!p(d.expires) || !Number.isFinite(d.expires.valueOf()))
|
|
131
|
-
throw new TypeError(`option expires is invalid: ${d.expires}`);
|
|
132
|
-
g += "; Expires=" + d.expires.toUTCString();
|
|
133
|
-
}
|
|
134
|
-
if (d.httpOnly && (g += "; HttpOnly"), d.secure && (g += "; Secure"), d.partitioned && (g += "; Partitioned"), d.priority)
|
|
135
|
-
switch (typeof d.priority == "string" ? d.priority.toLowerCase() : void 0) {
|
|
136
|
-
case "low":
|
|
137
|
-
g += "; Priority=Low";
|
|
138
|
-
break;
|
|
139
|
-
case "medium":
|
|
140
|
-
g += "; Priority=Medium";
|
|
141
|
-
break;
|
|
142
|
-
case "high":
|
|
143
|
-
g += "; Priority=High";
|
|
144
|
-
break;
|
|
145
|
-
default:
|
|
146
|
-
throw new TypeError(`option priority is invalid: ${d.priority}`);
|
|
147
|
-
}
|
|
148
|
-
if (d.sameSite)
|
|
149
|
-
switch (typeof d.sameSite == "string" ? d.sameSite.toLowerCase() : d.sameSite) {
|
|
150
|
-
case !0:
|
|
151
|
-
case "strict":
|
|
152
|
-
g += "; SameSite=Strict";
|
|
153
|
-
break;
|
|
154
|
-
case "lax":
|
|
155
|
-
g += "; SameSite=Lax";
|
|
156
|
-
break;
|
|
157
|
-
case "none":
|
|
158
|
-
g += "; SameSite=None";
|
|
159
|
-
break;
|
|
160
|
-
default:
|
|
161
|
-
throw new TypeError(`option sameSite is invalid: ${d.sameSite}`);
|
|
162
|
-
}
|
|
163
|
-
return g;
|
|
43
|
+
c = H(i);
|
|
44
|
+
} catch (s) {
|
|
45
|
+
throw new h(`Invalid token specified: invalid base64 for part #${r + 1} (${s.message})`);
|
|
164
46
|
}
|
|
165
|
-
function f(h) {
|
|
166
|
-
if (h.indexOf("%") === -1)
|
|
167
|
-
return h;
|
|
168
|
-
try {
|
|
169
|
-
return decodeURIComponent(h);
|
|
170
|
-
} catch {
|
|
171
|
-
return h;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
function p(h) {
|
|
175
|
-
return r.call(h) === "[object Date]";
|
|
176
|
-
}
|
|
177
|
-
return F;
|
|
178
|
-
}
|
|
179
|
-
Ue();
|
|
180
|
-
/**
|
|
181
|
-
* react-router v7.1.5
|
|
182
|
-
*
|
|
183
|
-
* Copyright (c) Remix Software Inc.
|
|
184
|
-
*
|
|
185
|
-
* This source code is licensed under the MIT license found in the
|
|
186
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
187
|
-
*
|
|
188
|
-
* @license MIT
|
|
189
|
-
*/
|
|
190
|
-
function E(e, t) {
|
|
191
|
-
if (e === !1 || e === null || typeof e > "u")
|
|
192
|
-
throw new Error(t);
|
|
193
|
-
}
|
|
194
|
-
function L(e, t) {
|
|
195
|
-
if (!e) {
|
|
196
|
-
typeof console < "u" && console.warn(t);
|
|
197
|
-
try {
|
|
198
|
-
throw new Error(t);
|
|
199
|
-
} catch {
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
function te({
|
|
204
|
-
pathname: e = "/",
|
|
205
|
-
search: t = "",
|
|
206
|
-
hash: n = ""
|
|
207
|
-
}) {
|
|
208
|
-
return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), n && n !== "#" && (e += n.charAt(0) === "#" ? n : "#" + n), e;
|
|
209
|
-
}
|
|
210
|
-
function ne(e) {
|
|
211
|
-
let t = {};
|
|
212
|
-
if (e) {
|
|
213
|
-
let n = e.indexOf("#");
|
|
214
|
-
n >= 0 && (t.hash = e.substring(n), e = e.substring(0, n));
|
|
215
|
-
let a = e.indexOf("?");
|
|
216
|
-
a >= 0 && (t.search = e.substring(a), e = e.substring(0, a)), e && (t.pathname = e);
|
|
217
|
-
}
|
|
218
|
-
return t;
|
|
219
|
-
}
|
|
220
|
-
function xe(e, t, n = "/") {
|
|
221
|
-
return Ve(e, t, n, !1);
|
|
222
|
-
}
|
|
223
|
-
function Ve(e, t, n, a) {
|
|
224
|
-
let r = typeof t == "string" ? ne(t) : t, i = T(r.pathname || "/", n);
|
|
225
|
-
if (i == null)
|
|
226
|
-
return null;
|
|
227
|
-
let c = we(e);
|
|
228
|
-
We(c);
|
|
229
|
-
let u = null;
|
|
230
|
-
for (let l = 0; u == null && l < c.length; ++l) {
|
|
231
|
-
let o = nt(i);
|
|
232
|
-
u = et(
|
|
233
|
-
c[l],
|
|
234
|
-
o,
|
|
235
|
-
a
|
|
236
|
-
);
|
|
237
|
-
}
|
|
238
|
-
return u;
|
|
239
|
-
}
|
|
240
|
-
function we(e, t = [], n = [], a = "") {
|
|
241
|
-
let r = (i, c, u) => {
|
|
242
|
-
let l = {
|
|
243
|
-
relativePath: u === void 0 ? i.path || "" : u,
|
|
244
|
-
caseSensitive: i.caseSensitive === !0,
|
|
245
|
-
childrenIndex: c,
|
|
246
|
-
route: i
|
|
247
|
-
};
|
|
248
|
-
l.relativePath.startsWith("/") && (E(
|
|
249
|
-
l.relativePath.startsWith(a),
|
|
250
|
-
`Absolute route path "${l.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
|
|
251
|
-
), l.relativePath = l.relativePath.slice(a.length));
|
|
252
|
-
let o = N([a, l.relativePath]), f = n.concat(l);
|
|
253
|
-
i.children && i.children.length > 0 && (E(
|
|
254
|
-
// Our types know better, but runtime JS may not!
|
|
255
|
-
// @ts-expect-error
|
|
256
|
-
i.index !== !0,
|
|
257
|
-
`Index routes must not have child routes. Please remove all child routes from route path "${o}".`
|
|
258
|
-
), we(i.children, t, f, o)), !(i.path == null && !i.index) && t.push({
|
|
259
|
-
path: o,
|
|
260
|
-
score: Qe(o, i.index),
|
|
261
|
-
routesMeta: f
|
|
262
|
-
});
|
|
263
|
-
};
|
|
264
|
-
return e.forEach((i, c) => {
|
|
265
|
-
var u;
|
|
266
|
-
if (i.path === "" || !((u = i.path) != null && u.includes("?")))
|
|
267
|
-
r(i, c);
|
|
268
|
-
else
|
|
269
|
-
for (let l of be(i.path))
|
|
270
|
-
r(i, c, l);
|
|
271
|
-
}), t;
|
|
272
|
-
}
|
|
273
|
-
function be(e) {
|
|
274
|
-
let t = e.split("/");
|
|
275
|
-
if (t.length === 0) return [];
|
|
276
|
-
let [n, ...a] = t, r = n.endsWith("?"), i = n.replace(/\?$/, "");
|
|
277
|
-
if (a.length === 0)
|
|
278
|
-
return r ? [i, ""] : [i];
|
|
279
|
-
let c = be(a.join("/")), u = [];
|
|
280
|
-
return u.push(
|
|
281
|
-
...c.map(
|
|
282
|
-
(l) => l === "" ? i : [i, l].join("/")
|
|
283
|
-
)
|
|
284
|
-
), r && u.push(...c), u.map(
|
|
285
|
-
(l) => e.startsWith("/") && l === "" ? "/" : l
|
|
286
|
-
);
|
|
287
|
-
}
|
|
288
|
-
function We(e) {
|
|
289
|
-
e.sort(
|
|
290
|
-
(t, n) => t.score !== n.score ? n.score - t.score : Ze(
|
|
291
|
-
t.routesMeta.map((a) => a.childrenIndex),
|
|
292
|
-
n.routesMeta.map((a) => a.childrenIndex)
|
|
293
|
-
)
|
|
294
|
-
);
|
|
295
|
-
}
|
|
296
|
-
var Je = /^:[\w-]+$/, Ke = 3, qe = 2, Ge = 1, Ye = 10, Xe = -2, me = (e) => e === "*";
|
|
297
|
-
function Qe(e, t) {
|
|
298
|
-
let n = e.split("/"), a = n.length;
|
|
299
|
-
return n.some(me) && (a += Xe), t && (a += qe), n.filter((r) => !me(r)).reduce(
|
|
300
|
-
(r, i) => r + (Je.test(i) ? Ke : i === "" ? Ge : Ye),
|
|
301
|
-
a
|
|
302
|
-
);
|
|
303
|
-
}
|
|
304
|
-
function Ze(e, t) {
|
|
305
|
-
return e.length === t.length && e.slice(0, -1).every((a, r) => a === t[r]) ? (
|
|
306
|
-
// If two routes are siblings, we should try to match the earlier sibling
|
|
307
|
-
// first. This allows people to have fine-grained control over the matching
|
|
308
|
-
// behavior by simply putting routes with identical paths in the order they
|
|
309
|
-
// want them tried.
|
|
310
|
-
e[e.length - 1] - t[t.length - 1]
|
|
311
|
-
) : (
|
|
312
|
-
// Otherwise, it doesn't really make sense to rank non-siblings by index,
|
|
313
|
-
// so they sort equally.
|
|
314
|
-
0
|
|
315
|
-
);
|
|
316
|
-
}
|
|
317
|
-
function et(e, t, n = !1) {
|
|
318
|
-
let { routesMeta: a } = e, r = {}, i = "/", c = [];
|
|
319
|
-
for (let u = 0; u < a.length; ++u) {
|
|
320
|
-
let l = a[u], o = u === a.length - 1, f = i === "/" ? t : t.slice(i.length) || "/", p = K(
|
|
321
|
-
{ path: l.relativePath, caseSensitive: l.caseSensitive, end: o },
|
|
322
|
-
f
|
|
323
|
-
), h = l.route;
|
|
324
|
-
if (!p && o && n && !a[a.length - 1].route.index && (p = K(
|
|
325
|
-
{
|
|
326
|
-
path: l.relativePath,
|
|
327
|
-
caseSensitive: l.caseSensitive,
|
|
328
|
-
end: !1
|
|
329
|
-
},
|
|
330
|
-
f
|
|
331
|
-
)), !p)
|
|
332
|
-
return null;
|
|
333
|
-
Object.assign(r, p.params), c.push({
|
|
334
|
-
// TODO: Can this as be avoided?
|
|
335
|
-
params: r,
|
|
336
|
-
pathname: N([i, p.pathname]),
|
|
337
|
-
pathnameBase: lt(
|
|
338
|
-
N([i, p.pathnameBase])
|
|
339
|
-
),
|
|
340
|
-
route: h
|
|
341
|
-
}), p.pathnameBase !== "/" && (i = N([i, p.pathnameBase]));
|
|
342
|
-
}
|
|
343
|
-
return c;
|
|
344
|
-
}
|
|
345
|
-
function K(e, t) {
|
|
346
|
-
typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
|
|
347
|
-
let [n, a] = tt(
|
|
348
|
-
e.path,
|
|
349
|
-
e.caseSensitive,
|
|
350
|
-
e.end
|
|
351
|
-
), r = t.match(n);
|
|
352
|
-
if (!r) return null;
|
|
353
|
-
let i = r[0], c = i.replace(/(.)\/+$/, "$1"), u = r.slice(1);
|
|
354
|
-
return {
|
|
355
|
-
params: a.reduce(
|
|
356
|
-
(o, { paramName: f, isOptional: p }, h) => {
|
|
357
|
-
if (f === "*") {
|
|
358
|
-
let d = u[h] || "";
|
|
359
|
-
c = i.slice(0, i.length - d.length).replace(/(.)\/+$/, "$1");
|
|
360
|
-
}
|
|
361
|
-
const m = u[h];
|
|
362
|
-
return p && !m ? o[f] = void 0 : o[f] = (m || "").replace(/%2F/g, "/"), o;
|
|
363
|
-
},
|
|
364
|
-
{}
|
|
365
|
-
),
|
|
366
|
-
pathname: i,
|
|
367
|
-
pathnameBase: c,
|
|
368
|
-
pattern: e
|
|
369
|
-
};
|
|
370
|
-
}
|
|
371
|
-
function tt(e, t = !1, n = !0) {
|
|
372
|
-
L(
|
|
373
|
-
e === "*" || !e.endsWith("*") || e.endsWith("/*"),
|
|
374
|
-
`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(/\*$/, "/*")}".`
|
|
375
|
-
);
|
|
376
|
-
let a = [], r = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
|
|
377
|
-
/\/:([\w-]+)(\?)?/g,
|
|
378
|
-
(c, u, l) => (a.push({ paramName: u, isOptional: l != null }), l ? "/?([^\\/]+)?" : "/([^\\/]+)")
|
|
379
|
-
);
|
|
380
|
-
return e.endsWith("*") ? (a.push({ paramName: "*" }), r += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? r += "\\/*$" : e !== "" && e !== "/" && (r += "(?:(?=\\/|$))"), [new RegExp(r, t ? void 0 : "i"), a];
|
|
381
|
-
}
|
|
382
|
-
function nt(e) {
|
|
383
47
|
try {
|
|
384
|
-
return
|
|
385
|
-
} catch (
|
|
386
|
-
|
|
387
|
-
!1,
|
|
388
|
-
`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`
|
|
389
|
-
), e;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
function T(e, t) {
|
|
393
|
-
if (t === "/") return e;
|
|
394
|
-
if (!e.toLowerCase().startsWith(t.toLowerCase()))
|
|
395
|
-
return null;
|
|
396
|
-
let n = t.endsWith("/") ? t.length - 1 : t.length, a = e.charAt(n);
|
|
397
|
-
return a && a !== "/" ? null : e.slice(n) || "/";
|
|
398
|
-
}
|
|
399
|
-
function rt(e, t = "/") {
|
|
400
|
-
let {
|
|
401
|
-
pathname: n,
|
|
402
|
-
search: a = "",
|
|
403
|
-
hash: r = ""
|
|
404
|
-
} = typeof e == "string" ? ne(e) : e;
|
|
405
|
-
return {
|
|
406
|
-
pathname: n ? n.startsWith("/") ? n : at(n, t) : t,
|
|
407
|
-
search: ot(a),
|
|
408
|
-
hash: st(r)
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
|
-
function at(e, t) {
|
|
412
|
-
let n = t.replace(/\/+$/, "").split("/");
|
|
413
|
-
return e.split("/").forEach((r) => {
|
|
414
|
-
r === ".." ? n.length > 1 && n.pop() : r !== "." && n.push(r);
|
|
415
|
-
}), n.length > 1 ? n.join("/") : "/";
|
|
416
|
-
}
|
|
417
|
-
function Z(e, t, n, a) {
|
|
418
|
-
return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(
|
|
419
|
-
a
|
|
420
|
-
)}]. 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.`;
|
|
421
|
-
}
|
|
422
|
-
function it(e) {
|
|
423
|
-
return e.filter(
|
|
424
|
-
(t, n) => n === 0 || t.route.path && t.route.path.length > 0
|
|
425
|
-
);
|
|
426
|
-
}
|
|
427
|
-
function Ce(e) {
|
|
428
|
-
let t = it(e);
|
|
429
|
-
return t.map(
|
|
430
|
-
(n, a) => a === t.length - 1 ? n.pathname : n.pathnameBase
|
|
431
|
-
);
|
|
432
|
-
}
|
|
433
|
-
function Ee(e, t, n, a = !1) {
|
|
434
|
-
let r;
|
|
435
|
-
typeof e == "string" ? r = ne(e) : (r = { ...e }, E(
|
|
436
|
-
!r.pathname || !r.pathname.includes("?"),
|
|
437
|
-
Z("?", "pathname", "search", r)
|
|
438
|
-
), E(
|
|
439
|
-
!r.pathname || !r.pathname.includes("#"),
|
|
440
|
-
Z("#", "pathname", "hash", r)
|
|
441
|
-
), E(
|
|
442
|
-
!r.search || !r.search.includes("#"),
|
|
443
|
-
Z("#", "search", "hash", r)
|
|
444
|
-
));
|
|
445
|
-
let i = e === "" || r.pathname === "", c = i ? "/" : r.pathname, u;
|
|
446
|
-
if (c == null)
|
|
447
|
-
u = n;
|
|
448
|
-
else {
|
|
449
|
-
let p = t.length - 1;
|
|
450
|
-
if (!a && c.startsWith("..")) {
|
|
451
|
-
let h = c.split("/");
|
|
452
|
-
for (; h[0] === ".."; )
|
|
453
|
-
h.shift(), p -= 1;
|
|
454
|
-
r.pathname = h.join("/");
|
|
455
|
-
}
|
|
456
|
-
u = p >= 0 ? t[p] : "/";
|
|
48
|
+
return JSON.parse(c);
|
|
49
|
+
} catch (s) {
|
|
50
|
+
throw new h(`Invalid token specified: invalid json for part #${r + 1} (${s.message})`);
|
|
457
51
|
}
|
|
458
|
-
let l = rt(r, u), o = c && c !== "/" && c.endsWith("/"), f = (i || c === ".") && n.endsWith("/");
|
|
459
|
-
return !l.pathname.endsWith("/") && (o || f) && (l.pathname += "/"), l;
|
|
460
|
-
}
|
|
461
|
-
var N = (e) => e.join("/").replace(/\/\/+/g, "/"), lt = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), ot = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, st = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e;
|
|
462
|
-
function ut(e) {
|
|
463
|
-
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
|
|
464
|
-
}
|
|
465
|
-
var ke = [
|
|
466
|
-
"POST",
|
|
467
|
-
"PUT",
|
|
468
|
-
"PATCH",
|
|
469
|
-
"DELETE"
|
|
470
|
-
];
|
|
471
|
-
new Set(
|
|
472
|
-
ke
|
|
473
|
-
);
|
|
474
|
-
var ct = [
|
|
475
|
-
"GET",
|
|
476
|
-
...ke
|
|
477
|
-
];
|
|
478
|
-
new Set(ct);
|
|
479
|
-
var D = s.createContext(null);
|
|
480
|
-
D.displayName = "DataRouter";
|
|
481
|
-
var Y = s.createContext(null);
|
|
482
|
-
Y.displayName = "DataRouterState";
|
|
483
|
-
var Pe = s.createContext({
|
|
484
|
-
isTransitioning: !1
|
|
485
|
-
});
|
|
486
|
-
Pe.displayName = "ViewTransition";
|
|
487
|
-
var dt = s.createContext(
|
|
488
|
-
/* @__PURE__ */ new Map()
|
|
489
|
-
);
|
|
490
|
-
dt.displayName = "Fetchers";
|
|
491
|
-
var ht = s.createContext(null);
|
|
492
|
-
ht.displayName = "Await";
|
|
493
|
-
var $ = s.createContext(
|
|
494
|
-
null
|
|
495
|
-
);
|
|
496
|
-
$.displayName = "Navigation";
|
|
497
|
-
var re = s.createContext(
|
|
498
|
-
null
|
|
499
|
-
);
|
|
500
|
-
re.displayName = "Location";
|
|
501
|
-
var O = s.createContext({
|
|
502
|
-
outlet: null,
|
|
503
|
-
matches: [],
|
|
504
|
-
isDataRoute: !1
|
|
505
|
-
});
|
|
506
|
-
O.displayName = "Route";
|
|
507
|
-
var ae = s.createContext(null);
|
|
508
|
-
ae.displayName = "RouteError";
|
|
509
|
-
function ft(e, { relative: t } = {}) {
|
|
510
|
-
E(
|
|
511
|
-
X(),
|
|
512
|
-
// TODO: This error is probably because they somehow have 2 versions of the
|
|
513
|
-
// router loaded. We can help them understand how to avoid that.
|
|
514
|
-
"useHref() may be used only in the context of a <Router> component."
|
|
515
|
-
);
|
|
516
|
-
let { basename: n, navigator: a } = s.useContext($), { hash: r, pathname: i, search: c } = U(e, { relative: t }), u = i;
|
|
517
|
-
return n !== "/" && (u = i === "/" ? n : N([n, i])), a.createHref({ pathname: u, search: c, hash: r });
|
|
518
|
-
}
|
|
519
|
-
function X() {
|
|
520
|
-
return s.useContext(re) != null;
|
|
521
|
-
}
|
|
522
|
-
function A() {
|
|
523
|
-
return E(
|
|
524
|
-
X(),
|
|
525
|
-
// TODO: This error is probably because they somehow have 2 versions of the
|
|
526
|
-
// router loaded. We can help them understand how to avoid that.
|
|
527
|
-
"useLocation() may be used only in the context of a <Router> component."
|
|
528
|
-
), s.useContext(re).location;
|
|
529
|
-
}
|
|
530
|
-
var Se = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
531
|
-
function Re(e) {
|
|
532
|
-
s.useContext($).static || s.useLayoutEffect(e);
|
|
533
|
-
}
|
|
534
|
-
function Ne() {
|
|
535
|
-
let { isDataRoute: e } = s.useContext(O);
|
|
536
|
-
return e ? St() : mt();
|
|
537
|
-
}
|
|
538
|
-
function mt() {
|
|
539
|
-
E(
|
|
540
|
-
X(),
|
|
541
|
-
// TODO: This error is probably because they somehow have 2 versions of the
|
|
542
|
-
// router loaded. We can help them understand how to avoid that.
|
|
543
|
-
"useNavigate() may be used only in the context of a <Router> component."
|
|
544
|
-
);
|
|
545
|
-
let e = s.useContext(D), { basename: t, navigator: n } = s.useContext($), { matches: a } = s.useContext(O), { pathname: r } = A(), i = JSON.stringify(Ce(a)), c = s.useRef(!1);
|
|
546
|
-
return Re(() => {
|
|
547
|
-
c.current = !0;
|
|
548
|
-
}), s.useCallback(
|
|
549
|
-
(l, o = {}) => {
|
|
550
|
-
if (L(c.current, Se), !c.current) return;
|
|
551
|
-
if (typeof l == "number") {
|
|
552
|
-
n.go(l);
|
|
553
|
-
return;
|
|
554
|
-
}
|
|
555
|
-
let f = Ee(
|
|
556
|
-
l,
|
|
557
|
-
JSON.parse(i),
|
|
558
|
-
r,
|
|
559
|
-
o.relative === "path"
|
|
560
|
-
);
|
|
561
|
-
e == null && t !== "/" && (f.pathname = f.pathname === "/" ? t : N([t, f.pathname])), (o.replace ? n.replace : n.push)(
|
|
562
|
-
f,
|
|
563
|
-
o.state,
|
|
564
|
-
o
|
|
565
|
-
);
|
|
566
|
-
},
|
|
567
|
-
[
|
|
568
|
-
t,
|
|
569
|
-
n,
|
|
570
|
-
i,
|
|
571
|
-
r,
|
|
572
|
-
e
|
|
573
|
-
]
|
|
574
|
-
);
|
|
575
|
-
}
|
|
576
|
-
s.createContext(null);
|
|
577
|
-
function U(e, { relative: t } = {}) {
|
|
578
|
-
let { matches: n } = s.useContext(O), { pathname: a } = A(), r = JSON.stringify(Ce(n));
|
|
579
|
-
return s.useMemo(
|
|
580
|
-
() => Ee(
|
|
581
|
-
e,
|
|
582
|
-
JSON.parse(r),
|
|
583
|
-
a,
|
|
584
|
-
t === "path"
|
|
585
|
-
),
|
|
586
|
-
[e, r, a, t]
|
|
587
|
-
);
|
|
588
|
-
}
|
|
589
|
-
function pt(e, t, n, a) {
|
|
590
|
-
E(
|
|
591
|
-
X(),
|
|
592
|
-
// TODO: This error is probably because they somehow have 2 versions of the
|
|
593
|
-
// router loaded. We can help them understand how to avoid that.
|
|
594
|
-
"useRoutes() may be used only in the context of a <Router> component."
|
|
595
|
-
);
|
|
596
|
-
let { navigator: r, static: i } = s.useContext($), { matches: c } = s.useContext(O), u = c[c.length - 1], l = u ? u.params : {}, o = u ? u.pathname : "/", f = u ? u.pathnameBase : "/", p = u && u.route;
|
|
597
|
-
{
|
|
598
|
-
let y = p && p.path || "";
|
|
599
|
-
Le(
|
|
600
|
-
o,
|
|
601
|
-
!p || y.endsWith("*") || y.endsWith("*?"),
|
|
602
|
-
`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${o}" (under <Route path="${y}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
603
|
-
|
|
604
|
-
Please change the parent <Route path="${y}"> to <Route path="${y === "/" ? "*" : `${y}/*`}">.`
|
|
605
|
-
);
|
|
606
|
-
}
|
|
607
|
-
let h = A(), m;
|
|
608
|
-
m = h;
|
|
609
|
-
let d = m.pathname || "/", w = d;
|
|
610
|
-
if (f !== "/") {
|
|
611
|
-
let y = f.replace(/^\//, "").split("/");
|
|
612
|
-
w = "/" + d.replace(/^\//, "").split("/").slice(y.length).join("/");
|
|
613
|
-
}
|
|
614
|
-
let x = !i && n && n.matches && n.matches.length > 0 ? n.matches : xe(e, { pathname: w });
|
|
615
|
-
return L(
|
|
616
|
-
p || x != null,
|
|
617
|
-
`No routes matched location "${m.pathname}${m.search}${m.hash}" `
|
|
618
|
-
), L(
|
|
619
|
-
x == null || x[x.length - 1].route.element !== void 0 || x[x.length - 1].route.Component !== void 0 || x[x.length - 1].route.lazy !== void 0,
|
|
620
|
-
`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
|
|
621
|
-
), wt(
|
|
622
|
-
x && x.map(
|
|
623
|
-
(y) => Object.assign({}, y, {
|
|
624
|
-
params: Object.assign({}, l, y.params),
|
|
625
|
-
pathname: N([
|
|
626
|
-
f,
|
|
627
|
-
// Re-encode pathnames that were decoded inside matchRoutes
|
|
628
|
-
r.encodeLocation ? r.encodeLocation(y.pathname).pathname : y.pathname
|
|
629
|
-
]),
|
|
630
|
-
pathnameBase: y.pathnameBase === "/" ? f : N([
|
|
631
|
-
f,
|
|
632
|
-
// Re-encode pathnames that were decoded inside matchRoutes
|
|
633
|
-
r.encodeLocation ? r.encodeLocation(y.pathnameBase).pathname : y.pathnameBase
|
|
634
|
-
])
|
|
635
|
-
})
|
|
636
|
-
),
|
|
637
|
-
c,
|
|
638
|
-
n,
|
|
639
|
-
a
|
|
640
|
-
);
|
|
641
|
-
}
|
|
642
|
-
function gt() {
|
|
643
|
-
let e = Pt(), t = ut(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null, a = "rgba(200,200,200, 0.5)", r = { padding: "0.5rem", backgroundColor: a }, i = { padding: "2px 4px", backgroundColor: a }, c = null;
|
|
644
|
-
return console.error(
|
|
645
|
-
"Error handled by React Router default ErrorBoundary:",
|
|
646
|
-
e
|
|
647
|
-
), c = /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ s.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ s.createElement("code", { style: i }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ s.createElement("code", { style: i }, "errorElement"), " prop on your route.")), /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ s.createElement("h3", { style: { fontStyle: "italic" } }, t), n ? /* @__PURE__ */ s.createElement("pre", { style: r }, n) : null, c);
|
|
648
|
-
}
|
|
649
|
-
var vt = /* @__PURE__ */ s.createElement(gt, null), yt = class extends s.Component {
|
|
650
|
-
constructor(e) {
|
|
651
|
-
super(e), this.state = {
|
|
652
|
-
location: e.location,
|
|
653
|
-
revalidation: e.revalidation,
|
|
654
|
-
error: e.error
|
|
655
|
-
};
|
|
656
|
-
}
|
|
657
|
-
static getDerivedStateFromError(e) {
|
|
658
|
-
return { error: e };
|
|
659
|
-
}
|
|
660
|
-
static getDerivedStateFromProps(e, t) {
|
|
661
|
-
return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
|
|
662
|
-
error: e.error,
|
|
663
|
-
location: e.location,
|
|
664
|
-
revalidation: e.revalidation
|
|
665
|
-
} : {
|
|
666
|
-
error: e.error !== void 0 ? e.error : t.error,
|
|
667
|
-
location: t.location,
|
|
668
|
-
revalidation: e.revalidation || t.revalidation
|
|
669
|
-
};
|
|
670
|
-
}
|
|
671
|
-
componentDidCatch(e, t) {
|
|
672
|
-
console.error(
|
|
673
|
-
"React Router caught the following error during render",
|
|
674
|
-
e,
|
|
675
|
-
t
|
|
676
|
-
);
|
|
677
|
-
}
|
|
678
|
-
render() {
|
|
679
|
-
return this.state.error !== void 0 ? /* @__PURE__ */ s.createElement(O.Provider, { value: this.props.routeContext }, /* @__PURE__ */ s.createElement(
|
|
680
|
-
ae.Provider,
|
|
681
|
-
{
|
|
682
|
-
value: this.state.error,
|
|
683
|
-
children: this.props.component
|
|
684
|
-
}
|
|
685
|
-
)) : this.props.children;
|
|
686
|
-
}
|
|
687
|
-
};
|
|
688
|
-
function xt({ routeContext: e, match: t, children: n }) {
|
|
689
|
-
let a = s.useContext(D);
|
|
690
|
-
return a && a.static && a.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (a.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ s.createElement(O.Provider, { value: e }, n);
|
|
691
|
-
}
|
|
692
|
-
function wt(e, t = [], n = null, a = null) {
|
|
693
|
-
if (e == null) {
|
|
694
|
-
if (!n)
|
|
695
|
-
return null;
|
|
696
|
-
if (n.errors)
|
|
697
|
-
e = n.matches;
|
|
698
|
-
else if (t.length === 0 && !n.initialized && n.matches.length > 0)
|
|
699
|
-
e = n.matches;
|
|
700
|
-
else
|
|
701
|
-
return null;
|
|
702
|
-
}
|
|
703
|
-
let r = e, i = n == null ? void 0 : n.errors;
|
|
704
|
-
if (i != null) {
|
|
705
|
-
let l = r.findIndex(
|
|
706
|
-
(o) => o.route.id && (i == null ? void 0 : i[o.route.id]) !== void 0
|
|
707
|
-
);
|
|
708
|
-
E(
|
|
709
|
-
l >= 0,
|
|
710
|
-
`Could not find a matching route for errors on route IDs: ${Object.keys(
|
|
711
|
-
i
|
|
712
|
-
).join(",")}`
|
|
713
|
-
), r = r.slice(
|
|
714
|
-
0,
|
|
715
|
-
Math.min(r.length, l + 1)
|
|
716
|
-
);
|
|
717
|
-
}
|
|
718
|
-
let c = !1, u = -1;
|
|
719
|
-
if (n)
|
|
720
|
-
for (let l = 0; l < r.length; l++) {
|
|
721
|
-
let o = r[l];
|
|
722
|
-
if ((o.route.HydrateFallback || o.route.hydrateFallbackElement) && (u = l), o.route.id) {
|
|
723
|
-
let { loaderData: f, errors: p } = n, h = o.route.loader && !f.hasOwnProperty(o.route.id) && (!p || p[o.route.id] === void 0);
|
|
724
|
-
if (o.route.lazy || h) {
|
|
725
|
-
c = !0, u >= 0 ? r = r.slice(0, u + 1) : r = [r[0]];
|
|
726
|
-
break;
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
return r.reduceRight((l, o, f) => {
|
|
731
|
-
let p, h = !1, m = null, d = null;
|
|
732
|
-
n && (p = i && o.route.id ? i[o.route.id] : void 0, m = o.route.errorElement || vt, c && (u < 0 && f === 0 ? (Le(
|
|
733
|
-
"route-fallback",
|
|
734
|
-
!1,
|
|
735
|
-
"No `HydrateFallback` element provided to render during initial hydration"
|
|
736
|
-
), h = !0, d = null) : u === f && (h = !0, d = o.route.hydrateFallbackElement || null)));
|
|
737
|
-
let w = t.concat(r.slice(0, f + 1)), x = () => {
|
|
738
|
-
let g;
|
|
739
|
-
return p ? g = m : h ? g = d : o.route.Component ? g = /* @__PURE__ */ s.createElement(o.route.Component, null) : o.route.element ? g = o.route.element : g = l, /* @__PURE__ */ s.createElement(
|
|
740
|
-
xt,
|
|
741
|
-
{
|
|
742
|
-
match: o,
|
|
743
|
-
routeContext: {
|
|
744
|
-
outlet: l,
|
|
745
|
-
matches: w,
|
|
746
|
-
isDataRoute: n != null
|
|
747
|
-
},
|
|
748
|
-
children: g
|
|
749
|
-
}
|
|
750
|
-
);
|
|
751
|
-
};
|
|
752
|
-
return n && (o.route.ErrorBoundary || o.route.errorElement || f === 0) ? /* @__PURE__ */ s.createElement(
|
|
753
|
-
yt,
|
|
754
|
-
{
|
|
755
|
-
location: n.location,
|
|
756
|
-
revalidation: n.revalidation,
|
|
757
|
-
component: m,
|
|
758
|
-
error: p,
|
|
759
|
-
children: x(),
|
|
760
|
-
routeContext: { outlet: null, matches: w, isDataRoute: !0 }
|
|
761
|
-
}
|
|
762
|
-
) : x();
|
|
763
|
-
}, null);
|
|
764
52
|
}
|
|
765
|
-
|
|
766
|
-
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
767
|
-
}
|
|
768
|
-
function bt(e) {
|
|
769
|
-
let t = s.useContext(D);
|
|
770
|
-
return E(t, ie(e)), t;
|
|
771
|
-
}
|
|
772
|
-
function Ct(e) {
|
|
773
|
-
let t = s.useContext(Y);
|
|
774
|
-
return E(t, ie(e)), t;
|
|
775
|
-
}
|
|
776
|
-
function Et(e) {
|
|
777
|
-
let t = s.useContext(O);
|
|
778
|
-
return E(t, ie(e)), t;
|
|
779
|
-
}
|
|
780
|
-
function le(e) {
|
|
781
|
-
let t = Et(e), n = t.matches[t.matches.length - 1];
|
|
782
|
-
return E(
|
|
783
|
-
n.route.id,
|
|
784
|
-
`${e} can only be used on routes that contain a unique "id"`
|
|
785
|
-
), n.route.id;
|
|
786
|
-
}
|
|
787
|
-
function kt() {
|
|
788
|
-
return le(
|
|
789
|
-
"useRouteId"
|
|
790
|
-
/* UseRouteId */
|
|
791
|
-
);
|
|
792
|
-
}
|
|
793
|
-
function Pt() {
|
|
794
|
-
var a;
|
|
795
|
-
let e = s.useContext(ae), t = Ct(
|
|
796
|
-
"useRouteError"
|
|
797
|
-
/* UseRouteError */
|
|
798
|
-
), n = le(
|
|
799
|
-
"useRouteError"
|
|
800
|
-
/* UseRouteError */
|
|
801
|
-
);
|
|
802
|
-
return e !== void 0 ? e : (a = t.errors) == null ? void 0 : a[n];
|
|
803
|
-
}
|
|
804
|
-
function St() {
|
|
805
|
-
let { router: e } = bt(
|
|
806
|
-
"useNavigate"
|
|
807
|
-
/* UseNavigateStable */
|
|
808
|
-
), t = le(
|
|
809
|
-
"useNavigate"
|
|
810
|
-
/* UseNavigateStable */
|
|
811
|
-
), n = s.useRef(!1);
|
|
812
|
-
return Re(() => {
|
|
813
|
-
n.current = !0;
|
|
814
|
-
}), s.useCallback(
|
|
815
|
-
async (r, i = {}) => {
|
|
816
|
-
L(n.current, Se), n.current && (typeof r == "number" ? e.navigate(r) : await e.navigate(r, { fromRouteId: t, ...i }));
|
|
817
|
-
},
|
|
818
|
-
[e, t]
|
|
819
|
-
);
|
|
820
|
-
}
|
|
821
|
-
var pe = {};
|
|
822
|
-
function Le(e, t, n) {
|
|
823
|
-
!t && !pe[e] && (pe[e] = !0, L(!1, n));
|
|
824
|
-
}
|
|
825
|
-
s.memo(Rt);
|
|
826
|
-
function Rt({
|
|
827
|
-
routes: e,
|
|
828
|
-
future: t,
|
|
829
|
-
state: n
|
|
830
|
-
}) {
|
|
831
|
-
return pt(e, void 0, n, t);
|
|
832
|
-
}
|
|
833
|
-
var W = "get", J = "application/x-www-form-urlencoded";
|
|
834
|
-
function Q(e) {
|
|
835
|
-
return e != null && typeof e.tagName == "string";
|
|
836
|
-
}
|
|
837
|
-
function Nt(e) {
|
|
838
|
-
return Q(e) && e.tagName.toLowerCase() === "button";
|
|
839
|
-
}
|
|
840
|
-
function Lt(e) {
|
|
841
|
-
return Q(e) && e.tagName.toLowerCase() === "form";
|
|
842
|
-
}
|
|
843
|
-
function $t(e) {
|
|
844
|
-
return Q(e) && e.tagName.toLowerCase() === "input";
|
|
845
|
-
}
|
|
846
|
-
function Ot(e) {
|
|
847
|
-
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
848
|
-
}
|
|
849
|
-
function It(e, t) {
|
|
850
|
-
return e.button === 0 && // Ignore everything but left clicks
|
|
851
|
-
(!t || t === "_self") && // Let browser handle "target=_blank" etc.
|
|
852
|
-
!Ot(e);
|
|
853
|
-
}
|
|
854
|
-
var V = null;
|
|
855
|
-
function Mt() {
|
|
856
|
-
if (V === null)
|
|
857
|
-
try {
|
|
858
|
-
new FormData(
|
|
859
|
-
document.createElement("form"),
|
|
860
|
-
// @ts-expect-error if FormData supports the submitter parameter, this will throw
|
|
861
|
-
0
|
|
862
|
-
), V = !1;
|
|
863
|
-
} catch {
|
|
864
|
-
V = !0;
|
|
865
|
-
}
|
|
866
|
-
return V;
|
|
867
|
-
}
|
|
868
|
-
var zt = /* @__PURE__ */ new Set([
|
|
869
|
-
"application/x-www-form-urlencoded",
|
|
870
|
-
"multipart/form-data",
|
|
871
|
-
"text/plain"
|
|
872
|
-
]);
|
|
873
|
-
function ee(e) {
|
|
874
|
-
return e != null && !zt.has(e) ? (L(
|
|
875
|
-
!1,
|
|
876
|
-
`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${J}"`
|
|
877
|
-
), null) : e;
|
|
878
|
-
}
|
|
879
|
-
function _t(e, t) {
|
|
880
|
-
let n, a, r, i, c;
|
|
881
|
-
if (Lt(e)) {
|
|
882
|
-
let u = e.getAttribute("action");
|
|
883
|
-
a = u ? T(u, t) : null, n = e.getAttribute("method") || W, r = ee(e.getAttribute("enctype")) || J, i = new FormData(e);
|
|
884
|
-
} else if (Nt(e) || $t(e) && (e.type === "submit" || e.type === "image")) {
|
|
885
|
-
let u = e.form;
|
|
886
|
-
if (u == null)
|
|
887
|
-
throw new Error(
|
|
888
|
-
'Cannot submit a <button> or <input type="submit"> without a <form>'
|
|
889
|
-
);
|
|
890
|
-
let l = e.getAttribute("formaction") || u.getAttribute("action");
|
|
891
|
-
if (a = l ? T(l, t) : null, n = e.getAttribute("formmethod") || u.getAttribute("method") || W, r = ee(e.getAttribute("formenctype")) || ee(u.getAttribute("enctype")) || J, i = new FormData(u, e), !Mt()) {
|
|
892
|
-
let { name: o, type: f, value: p } = e;
|
|
893
|
-
if (f === "image") {
|
|
894
|
-
let h = o ? `${o}.` : "";
|
|
895
|
-
i.append(`${h}x`, "0"), i.append(`${h}y`, "0");
|
|
896
|
-
} else o && i.append(o, p);
|
|
897
|
-
}
|
|
898
|
-
} else {
|
|
899
|
-
if (Q(e))
|
|
900
|
-
throw new Error(
|
|
901
|
-
'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
|
|
902
|
-
);
|
|
903
|
-
n = W, a = null, r = J, c = e;
|
|
904
|
-
}
|
|
905
|
-
return i && r === "text/plain" && (c = i, i = void 0), { action: a, method: n.toLowerCase(), encType: r, formData: i, body: c };
|
|
906
|
-
}
|
|
907
|
-
function oe(e, t) {
|
|
908
|
-
if (e === !1 || e === null || typeof e > "u")
|
|
909
|
-
throw new Error(t);
|
|
910
|
-
}
|
|
911
|
-
async function Tt(e, t) {
|
|
912
|
-
if (e.id in t)
|
|
913
|
-
return t[e.id];
|
|
914
|
-
try {
|
|
915
|
-
let n = await import(
|
|
916
|
-
/* @vite-ignore */
|
|
917
|
-
/* webpackIgnore: true */
|
|
918
|
-
e.module
|
|
919
|
-
);
|
|
920
|
-
return t[e.id] = n, n;
|
|
921
|
-
} catch (n) {
|
|
922
|
-
return console.error(
|
|
923
|
-
`Error loading route module \`${e.module}\`, reloading page...`
|
|
924
|
-
), console.error(n), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {
|
|
925
|
-
});
|
|
926
|
-
}
|
|
927
|
-
}
|
|
928
|
-
function At(e) {
|
|
929
|
-
return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
|
|
930
|
-
}
|
|
931
|
-
async function Bt(e, t, n) {
|
|
932
|
-
let a = await Promise.all(
|
|
933
|
-
e.map(async (r) => {
|
|
934
|
-
let i = t.routes[r.route.id];
|
|
935
|
-
if (i) {
|
|
936
|
-
let c = await Tt(i, n);
|
|
937
|
-
return c.links ? c.links() : [];
|
|
938
|
-
}
|
|
939
|
-
return [];
|
|
940
|
-
})
|
|
941
|
-
);
|
|
942
|
-
return jt(
|
|
943
|
-
a.flat(1).filter(At).filter((r) => r.rel === "stylesheet" || r.rel === "preload").map(
|
|
944
|
-
(r) => r.rel === "stylesheet" ? { ...r, rel: "prefetch", as: "style" } : { ...r, rel: "prefetch" }
|
|
945
|
-
)
|
|
946
|
-
);
|
|
947
|
-
}
|
|
948
|
-
function ge(e, t, n, a, r, i) {
|
|
949
|
-
let c = (l, o) => n[o] ? l.route.id !== n[o].route.id : !0, u = (l, o) => {
|
|
950
|
-
var f;
|
|
951
|
-
return (
|
|
952
|
-
// param change, /users/123 -> /users/456
|
|
953
|
-
n[o].pathname !== l.pathname || // splat param changed, which is not present in match.path
|
|
954
|
-
// e.g. /files/images/avatar.jpg -> files/finances.xls
|
|
955
|
-
((f = n[o].route.path) == null ? void 0 : f.endsWith("*")) && n[o].params["*"] !== l.params["*"]
|
|
956
|
-
);
|
|
957
|
-
};
|
|
958
|
-
return i === "assets" ? t.filter(
|
|
959
|
-
(l, o) => c(l, o) || u(l, o)
|
|
960
|
-
) : i === "data" ? t.filter((l, o) => {
|
|
961
|
-
var p;
|
|
962
|
-
let f = a.routes[l.route.id];
|
|
963
|
-
if (!f || !f.hasLoader)
|
|
964
|
-
return !1;
|
|
965
|
-
if (c(l, o) || u(l, o))
|
|
966
|
-
return !0;
|
|
967
|
-
if (l.route.shouldRevalidate) {
|
|
968
|
-
let h = l.route.shouldRevalidate({
|
|
969
|
-
currentUrl: new URL(
|
|
970
|
-
r.pathname + r.search + r.hash,
|
|
971
|
-
window.origin
|
|
972
|
-
),
|
|
973
|
-
currentParams: ((p = n[0]) == null ? void 0 : p.params) || {},
|
|
974
|
-
nextUrl: new URL(e, window.origin),
|
|
975
|
-
nextParams: l.params,
|
|
976
|
-
defaultShouldRevalidate: !0
|
|
977
|
-
});
|
|
978
|
-
if (typeof h == "boolean")
|
|
979
|
-
return h;
|
|
980
|
-
}
|
|
981
|
-
return !0;
|
|
982
|
-
}) : [];
|
|
983
|
-
}
|
|
984
|
-
function Dt(e, t) {
|
|
985
|
-
return Ft(
|
|
986
|
-
e.map((n) => {
|
|
987
|
-
let a = t.routes[n.route.id];
|
|
988
|
-
if (!a) return [];
|
|
989
|
-
let r = [a.module];
|
|
990
|
-
return a.imports && (r = r.concat(a.imports)), r;
|
|
991
|
-
}).flat(1)
|
|
992
|
-
);
|
|
993
|
-
}
|
|
994
|
-
function Ft(e) {
|
|
995
|
-
return [...new Set(e)];
|
|
996
|
-
}
|
|
997
|
-
function Ht(e) {
|
|
998
|
-
let t = {}, n = Object.keys(e).sort();
|
|
999
|
-
for (let a of n)
|
|
1000
|
-
t[a] = e[a];
|
|
1001
|
-
return t;
|
|
1002
|
-
}
|
|
1003
|
-
function jt(e, t) {
|
|
1004
|
-
let n = /* @__PURE__ */ new Set();
|
|
1005
|
-
return new Set(t), e.reduce((a, r) => {
|
|
1006
|
-
let i = JSON.stringify(Ht(r));
|
|
1007
|
-
return n.has(i) || (n.add(i), a.push({ key: i, link: r })), a;
|
|
1008
|
-
}, []);
|
|
1009
|
-
}
|
|
1010
|
-
function Ut(e) {
|
|
1011
|
-
let t = typeof e == "string" ? new URL(
|
|
1012
|
-
e,
|
|
1013
|
-
// This can be called during the SSR flow via PrefetchPageLinksImpl so
|
|
1014
|
-
// don't assume window is available
|
|
1015
|
-
typeof window > "u" ? "server://singlefetch/" : window.location.origin
|
|
1016
|
-
) : e;
|
|
1017
|
-
return t.pathname === "/" ? t.pathname = "_root.data" : t.pathname = `${t.pathname.replace(/\/$/, "")}.data`, t;
|
|
1018
|
-
}
|
|
1019
|
-
function Vt() {
|
|
1020
|
-
let e = s.useContext(D);
|
|
1021
|
-
return oe(
|
|
1022
|
-
e,
|
|
1023
|
-
"You must render this element inside a <DataRouterContext.Provider> element"
|
|
1024
|
-
), e;
|
|
1025
|
-
}
|
|
1026
|
-
function Wt() {
|
|
1027
|
-
let e = s.useContext(Y);
|
|
1028
|
-
return oe(
|
|
1029
|
-
e,
|
|
1030
|
-
"You must render this element inside a <DataRouterStateContext.Provider> element"
|
|
1031
|
-
), e;
|
|
1032
|
-
}
|
|
1033
|
-
var se = s.createContext(void 0);
|
|
1034
|
-
se.displayName = "FrameworkContext";
|
|
1035
|
-
function $e() {
|
|
1036
|
-
let e = s.useContext(se);
|
|
1037
|
-
return oe(
|
|
1038
|
-
e,
|
|
1039
|
-
"You must render this element inside a <HydratedRouter> element"
|
|
1040
|
-
), e;
|
|
1041
|
-
}
|
|
1042
|
-
function Jt(e, t) {
|
|
1043
|
-
let n = s.useContext(se), [a, r] = s.useState(!1), [i, c] = s.useState(!1), { onFocus: u, onBlur: l, onMouseEnter: o, onMouseLeave: f, onTouchStart: p } = t, h = s.useRef(null);
|
|
1044
|
-
s.useEffect(() => {
|
|
1045
|
-
if (e === "render" && c(!0), e === "viewport") {
|
|
1046
|
-
let w = (g) => {
|
|
1047
|
-
g.forEach((y) => {
|
|
1048
|
-
c(y.isIntersecting);
|
|
1049
|
-
});
|
|
1050
|
-
}, x = new IntersectionObserver(w, { threshold: 0.5 });
|
|
1051
|
-
return h.current && x.observe(h.current), () => {
|
|
1052
|
-
x.disconnect();
|
|
1053
|
-
};
|
|
1054
|
-
}
|
|
1055
|
-
}, [e]), s.useEffect(() => {
|
|
1056
|
-
if (a) {
|
|
1057
|
-
let w = setTimeout(() => {
|
|
1058
|
-
c(!0);
|
|
1059
|
-
}, 100);
|
|
1060
|
-
return () => {
|
|
1061
|
-
clearTimeout(w);
|
|
1062
|
-
};
|
|
1063
|
-
}
|
|
1064
|
-
}, [a]);
|
|
1065
|
-
let m = () => {
|
|
1066
|
-
r(!0);
|
|
1067
|
-
}, d = () => {
|
|
1068
|
-
r(!1), c(!1);
|
|
1069
|
-
};
|
|
1070
|
-
return n ? e !== "intent" ? [i, h, {}] : [
|
|
1071
|
-
i,
|
|
1072
|
-
h,
|
|
1073
|
-
{
|
|
1074
|
-
onFocus: H(u, m),
|
|
1075
|
-
onBlur: H(l, d),
|
|
1076
|
-
onMouseEnter: H(o, m),
|
|
1077
|
-
onMouseLeave: H(f, d),
|
|
1078
|
-
onTouchStart: H(p, m)
|
|
1079
|
-
}
|
|
1080
|
-
] : [!1, h, {}];
|
|
1081
|
-
}
|
|
1082
|
-
function H(e, t) {
|
|
1083
|
-
return (n) => {
|
|
1084
|
-
e && e(n), n.defaultPrevented || t(n);
|
|
1085
|
-
};
|
|
1086
|
-
}
|
|
1087
|
-
function Kt({
|
|
1088
|
-
page: e,
|
|
1089
|
-
...t
|
|
1090
|
-
}) {
|
|
1091
|
-
let { router: n } = Vt(), a = s.useMemo(
|
|
1092
|
-
() => xe(n.routes, e, n.basename),
|
|
1093
|
-
[n.routes, e, n.basename]
|
|
1094
|
-
);
|
|
1095
|
-
return a ? /* @__PURE__ */ s.createElement(Gt, { page: e, matches: a, ...t }) : null;
|
|
1096
|
-
}
|
|
1097
|
-
function qt(e) {
|
|
1098
|
-
let { manifest: t, routeModules: n } = $e(), [a, r] = s.useState([]);
|
|
1099
|
-
return s.useEffect(() => {
|
|
1100
|
-
let i = !1;
|
|
1101
|
-
return Bt(e, t, n).then(
|
|
1102
|
-
(c) => {
|
|
1103
|
-
i || r(c);
|
|
1104
|
-
}
|
|
1105
|
-
), () => {
|
|
1106
|
-
i = !0;
|
|
1107
|
-
};
|
|
1108
|
-
}, [e, t, n]), a;
|
|
1109
|
-
}
|
|
1110
|
-
function Gt({
|
|
1111
|
-
page: e,
|
|
1112
|
-
matches: t,
|
|
1113
|
-
...n
|
|
1114
|
-
}) {
|
|
1115
|
-
let a = A(), { manifest: r, routeModules: i } = $e(), { loaderData: c, matches: u } = Wt(), l = s.useMemo(
|
|
1116
|
-
() => ge(
|
|
1117
|
-
e,
|
|
1118
|
-
t,
|
|
1119
|
-
u,
|
|
1120
|
-
r,
|
|
1121
|
-
a,
|
|
1122
|
-
"data"
|
|
1123
|
-
),
|
|
1124
|
-
[e, t, u, r, a]
|
|
1125
|
-
), o = s.useMemo(
|
|
1126
|
-
() => ge(
|
|
1127
|
-
e,
|
|
1128
|
-
t,
|
|
1129
|
-
u,
|
|
1130
|
-
r,
|
|
1131
|
-
a,
|
|
1132
|
-
"assets"
|
|
1133
|
-
),
|
|
1134
|
-
[e, t, u, r, a]
|
|
1135
|
-
), f = s.useMemo(() => {
|
|
1136
|
-
if (e === a.pathname + a.search + a.hash)
|
|
1137
|
-
return [];
|
|
1138
|
-
let m = /* @__PURE__ */ new Set(), d = !1;
|
|
1139
|
-
if (t.forEach((x) => {
|
|
1140
|
-
var y;
|
|
1141
|
-
let g = r.routes[x.route.id];
|
|
1142
|
-
!g || !g.hasLoader || (!l.some((C) => C.route.id === x.route.id) && x.route.id in c && ((y = i[x.route.id]) != null && y.shouldRevalidate) || g.hasClientLoader ? d = !0 : m.add(x.route.id));
|
|
1143
|
-
}), m.size === 0)
|
|
1144
|
-
return [];
|
|
1145
|
-
let w = Ut(e);
|
|
1146
|
-
return d && m.size > 0 && w.searchParams.set(
|
|
1147
|
-
"_routes",
|
|
1148
|
-
t.filter((x) => m.has(x.route.id)).map((x) => x.route.id).join(",")
|
|
1149
|
-
), [w.pathname + w.search];
|
|
1150
|
-
}, [
|
|
1151
|
-
c,
|
|
1152
|
-
a,
|
|
1153
|
-
r,
|
|
1154
|
-
l,
|
|
1155
|
-
t,
|
|
1156
|
-
e,
|
|
1157
|
-
i
|
|
1158
|
-
]), p = s.useMemo(
|
|
1159
|
-
() => Dt(o, r),
|
|
1160
|
-
[o, r]
|
|
1161
|
-
), h = qt(o);
|
|
1162
|
-
return /* @__PURE__ */ s.createElement(s.Fragment, null, f.map((m) => /* @__PURE__ */ s.createElement("link", { key: m, rel: "prefetch", as: "fetch", href: m, ...n })), p.map((m) => /* @__PURE__ */ s.createElement("link", { key: m, rel: "modulepreload", href: m, ...n })), h.map(({ key: m, link: d }) => (
|
|
1163
|
-
// these don't spread `linkProps` because they are full link descriptors
|
|
1164
|
-
// already with their own props
|
|
1165
|
-
/* @__PURE__ */ s.createElement("link", { key: m, ...d })
|
|
1166
|
-
)));
|
|
1167
|
-
}
|
|
1168
|
-
function Yt(...e) {
|
|
1169
|
-
return (t) => {
|
|
1170
|
-
e.forEach((n) => {
|
|
1171
|
-
typeof n == "function" ? n(t) : n != null && (n.current = t);
|
|
1172
|
-
});
|
|
1173
|
-
};
|
|
1174
|
-
}
|
|
1175
|
-
var Oe = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
1176
|
-
try {
|
|
1177
|
-
Oe && (window.__reactRouterVersion = "7.1.5");
|
|
1178
|
-
} catch {
|
|
1179
|
-
}
|
|
1180
|
-
var Ie = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Me = s.forwardRef(
|
|
1181
|
-
function({
|
|
1182
|
-
onClick: t,
|
|
1183
|
-
discover: n = "render",
|
|
1184
|
-
prefetch: a = "none",
|
|
1185
|
-
relative: r,
|
|
1186
|
-
reloadDocument: i,
|
|
1187
|
-
replace: c,
|
|
1188
|
-
state: u,
|
|
1189
|
-
target: l,
|
|
1190
|
-
to: o,
|
|
1191
|
-
preventScrollReset: f,
|
|
1192
|
-
viewTransition: p,
|
|
1193
|
-
...h
|
|
1194
|
-
}, m) {
|
|
1195
|
-
let { basename: d } = s.useContext($), w = typeof o == "string" && Ie.test(o), x, g = !1;
|
|
1196
|
-
if (typeof o == "string" && w && (x = o, Oe))
|
|
1197
|
-
try {
|
|
1198
|
-
let S = new URL(window.location.href), M = o.startsWith("//") ? new URL(S.protocol + o) : new URL(o), ue = T(M.pathname, d);
|
|
1199
|
-
M.origin === S.origin && ue != null ? o = ue + M.search + M.hash : g = !0;
|
|
1200
|
-
} catch {
|
|
1201
|
-
L(
|
|
1202
|
-
!1,
|
|
1203
|
-
`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
|
|
1204
|
-
);
|
|
1205
|
-
}
|
|
1206
|
-
let y = ft(o, { relative: r }), [C, P, R] = Jt(
|
|
1207
|
-
a,
|
|
1208
|
-
h
|
|
1209
|
-
), B = en(o, {
|
|
1210
|
-
replace: c,
|
|
1211
|
-
state: u,
|
|
1212
|
-
target: l,
|
|
1213
|
-
preventScrollReset: f,
|
|
1214
|
-
relative: r,
|
|
1215
|
-
viewTransition: p
|
|
1216
|
-
});
|
|
1217
|
-
function I(S) {
|
|
1218
|
-
t && t(S), S.defaultPrevented || B(S);
|
|
1219
|
-
}
|
|
1220
|
-
let z = (
|
|
1221
|
-
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
1222
|
-
/* @__PURE__ */ s.createElement(
|
|
1223
|
-
"a",
|
|
1224
|
-
{
|
|
1225
|
-
...h,
|
|
1226
|
-
...R,
|
|
1227
|
-
href: x || y,
|
|
1228
|
-
onClick: g || i ? t : I,
|
|
1229
|
-
ref: Yt(m, P),
|
|
1230
|
-
target: l,
|
|
1231
|
-
"data-discover": !w && n === "render" ? "true" : void 0
|
|
1232
|
-
}
|
|
1233
|
-
)
|
|
1234
|
-
);
|
|
1235
|
-
return C && !w ? /* @__PURE__ */ s.createElement(s.Fragment, null, z, /* @__PURE__ */ s.createElement(Kt, { page: y })) : z;
|
|
1236
|
-
}
|
|
1237
|
-
);
|
|
1238
|
-
Me.displayName = "Link";
|
|
1239
|
-
var Xt = s.forwardRef(
|
|
1240
|
-
function({
|
|
1241
|
-
"aria-current": t = "page",
|
|
1242
|
-
caseSensitive: n = !1,
|
|
1243
|
-
className: a = "",
|
|
1244
|
-
end: r = !1,
|
|
1245
|
-
style: i,
|
|
1246
|
-
to: c,
|
|
1247
|
-
viewTransition: u,
|
|
1248
|
-
children: l,
|
|
1249
|
-
...o
|
|
1250
|
-
}, f) {
|
|
1251
|
-
let p = U(c, { relative: o.relative }), h = A(), m = s.useContext(Y), { navigator: d, basename: w } = s.useContext($), x = m != null && // Conditional usage is OK here because the usage of a data router is static
|
|
1252
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1253
|
-
ln(p) && u === !0, g = d.encodeLocation ? d.encodeLocation(p).pathname : p.pathname, y = h.pathname, C = m && m.navigation && m.navigation.location ? m.navigation.location.pathname : null;
|
|
1254
|
-
n || (y = y.toLowerCase(), C = C ? C.toLowerCase() : null, g = g.toLowerCase()), C && w && (C = T(C, w) || C);
|
|
1255
|
-
const P = g !== "/" && g.endsWith("/") ? g.length - 1 : g.length;
|
|
1256
|
-
let R = y === g || !r && y.startsWith(g) && y.charAt(P) === "/", B = C != null && (C === g || !r && C.startsWith(g) && C.charAt(g.length) === "/"), I = {
|
|
1257
|
-
isActive: R,
|
|
1258
|
-
isPending: B,
|
|
1259
|
-
isTransitioning: x
|
|
1260
|
-
}, z = R ? t : void 0, S;
|
|
1261
|
-
typeof a == "function" ? S = a(I) : S = [
|
|
1262
|
-
a,
|
|
1263
|
-
R ? "active" : null,
|
|
1264
|
-
B ? "pending" : null,
|
|
1265
|
-
x ? "transitioning" : null
|
|
1266
|
-
].filter(Boolean).join(" ");
|
|
1267
|
-
let M = typeof i == "function" ? i(I) : i;
|
|
1268
|
-
return /* @__PURE__ */ s.createElement(
|
|
1269
|
-
Me,
|
|
1270
|
-
{
|
|
1271
|
-
...o,
|
|
1272
|
-
"aria-current": z,
|
|
1273
|
-
className: S,
|
|
1274
|
-
ref: f,
|
|
1275
|
-
style: M,
|
|
1276
|
-
to: c,
|
|
1277
|
-
viewTransition: u
|
|
1278
|
-
},
|
|
1279
|
-
typeof l == "function" ? l(I) : l
|
|
1280
|
-
);
|
|
1281
|
-
}
|
|
1282
|
-
);
|
|
1283
|
-
Xt.displayName = "NavLink";
|
|
1284
|
-
var Qt = s.forwardRef(
|
|
1285
|
-
({
|
|
1286
|
-
discover: e = "render",
|
|
1287
|
-
fetcherKey: t,
|
|
1288
|
-
navigate: n,
|
|
1289
|
-
reloadDocument: a,
|
|
1290
|
-
replace: r,
|
|
1291
|
-
state: i,
|
|
1292
|
-
method: c = W,
|
|
1293
|
-
action: u,
|
|
1294
|
-
onSubmit: l,
|
|
1295
|
-
relative: o,
|
|
1296
|
-
preventScrollReset: f,
|
|
1297
|
-
viewTransition: p,
|
|
1298
|
-
...h
|
|
1299
|
-
}, m) => {
|
|
1300
|
-
let d = rn(), w = an(u, { relative: o }), x = c.toLowerCase() === "get" ? "get" : "post", g = typeof u == "string" && Ie.test(u), y = (C) => {
|
|
1301
|
-
if (l && l(C), C.defaultPrevented) return;
|
|
1302
|
-
C.preventDefault();
|
|
1303
|
-
let P = C.nativeEvent.submitter, R = (P == null ? void 0 : P.getAttribute("formmethod")) || c;
|
|
1304
|
-
d(P || C.currentTarget, {
|
|
1305
|
-
fetcherKey: t,
|
|
1306
|
-
method: R,
|
|
1307
|
-
navigate: n,
|
|
1308
|
-
replace: r,
|
|
1309
|
-
state: i,
|
|
1310
|
-
relative: o,
|
|
1311
|
-
preventScrollReset: f,
|
|
1312
|
-
viewTransition: p
|
|
1313
|
-
});
|
|
1314
|
-
};
|
|
1315
|
-
return /* @__PURE__ */ s.createElement(
|
|
1316
|
-
"form",
|
|
1317
|
-
{
|
|
1318
|
-
ref: m,
|
|
1319
|
-
method: x,
|
|
1320
|
-
action: w,
|
|
1321
|
-
onSubmit: a ? l : y,
|
|
1322
|
-
...h,
|
|
1323
|
-
"data-discover": !g && e === "render" ? "true" : void 0
|
|
1324
|
-
}
|
|
1325
|
-
);
|
|
1326
|
-
}
|
|
1327
|
-
);
|
|
1328
|
-
Qt.displayName = "Form";
|
|
1329
|
-
function Zt(e) {
|
|
1330
|
-
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1331
|
-
}
|
|
1332
|
-
function ze(e) {
|
|
1333
|
-
let t = s.useContext(D);
|
|
1334
|
-
return E(t, Zt(e)), t;
|
|
1335
|
-
}
|
|
1336
|
-
function en(e, {
|
|
1337
|
-
target: t,
|
|
1338
|
-
replace: n,
|
|
1339
|
-
state: a,
|
|
1340
|
-
preventScrollReset: r,
|
|
1341
|
-
relative: i,
|
|
1342
|
-
viewTransition: c
|
|
1343
|
-
} = {}) {
|
|
1344
|
-
let u = Ne(), l = A(), o = U(e, { relative: i });
|
|
1345
|
-
return s.useCallback(
|
|
1346
|
-
(f) => {
|
|
1347
|
-
if (It(f, t)) {
|
|
1348
|
-
f.preventDefault();
|
|
1349
|
-
let p = n !== void 0 ? n : te(l) === te(o);
|
|
1350
|
-
u(e, {
|
|
1351
|
-
replace: p,
|
|
1352
|
-
state: a,
|
|
1353
|
-
preventScrollReset: r,
|
|
1354
|
-
relative: i,
|
|
1355
|
-
viewTransition: c
|
|
1356
|
-
});
|
|
1357
|
-
}
|
|
1358
|
-
},
|
|
1359
|
-
[
|
|
1360
|
-
l,
|
|
1361
|
-
u,
|
|
1362
|
-
o,
|
|
1363
|
-
n,
|
|
1364
|
-
a,
|
|
1365
|
-
t,
|
|
1366
|
-
e,
|
|
1367
|
-
r,
|
|
1368
|
-
i,
|
|
1369
|
-
c
|
|
1370
|
-
]
|
|
1371
|
-
);
|
|
1372
|
-
}
|
|
1373
|
-
var tn = 0, nn = () => `__${String(++tn)}__`;
|
|
1374
|
-
function rn() {
|
|
1375
|
-
let { router: e } = ze(
|
|
1376
|
-
"useSubmit"
|
|
1377
|
-
/* UseSubmit */
|
|
1378
|
-
), { basename: t } = s.useContext($), n = kt();
|
|
1379
|
-
return s.useCallback(
|
|
1380
|
-
async (a, r = {}) => {
|
|
1381
|
-
let { action: i, method: c, encType: u, formData: l, body: o } = _t(
|
|
1382
|
-
a,
|
|
1383
|
-
t
|
|
1384
|
-
);
|
|
1385
|
-
if (r.navigate === !1) {
|
|
1386
|
-
let f = r.fetcherKey || nn();
|
|
1387
|
-
await e.fetch(f, n, r.action || i, {
|
|
1388
|
-
preventScrollReset: r.preventScrollReset,
|
|
1389
|
-
formData: l,
|
|
1390
|
-
body: o,
|
|
1391
|
-
formMethod: r.method || c,
|
|
1392
|
-
formEncType: r.encType || u,
|
|
1393
|
-
flushSync: r.flushSync
|
|
1394
|
-
});
|
|
1395
|
-
} else
|
|
1396
|
-
await e.navigate(r.action || i, {
|
|
1397
|
-
preventScrollReset: r.preventScrollReset,
|
|
1398
|
-
formData: l,
|
|
1399
|
-
body: o,
|
|
1400
|
-
formMethod: r.method || c,
|
|
1401
|
-
formEncType: r.encType || u,
|
|
1402
|
-
replace: r.replace,
|
|
1403
|
-
state: r.state,
|
|
1404
|
-
fromRouteId: n,
|
|
1405
|
-
flushSync: r.flushSync,
|
|
1406
|
-
viewTransition: r.viewTransition
|
|
1407
|
-
});
|
|
1408
|
-
},
|
|
1409
|
-
[e, t, n]
|
|
1410
|
-
);
|
|
1411
|
-
}
|
|
1412
|
-
function an(e, { relative: t } = {}) {
|
|
1413
|
-
let { basename: n } = s.useContext($), a = s.useContext(O);
|
|
1414
|
-
E(a, "useFormAction must be used inside a RouteContext");
|
|
1415
|
-
let [r] = a.matches.slice(-1), i = { ...U(e || ".", { relative: t }) }, c = A();
|
|
1416
|
-
if (e == null) {
|
|
1417
|
-
i.search = c.search;
|
|
1418
|
-
let u = new URLSearchParams(i.search), l = u.getAll("index");
|
|
1419
|
-
if (l.some((f) => f === "")) {
|
|
1420
|
-
u.delete("index"), l.filter((p) => p).forEach((p) => u.append("index", p));
|
|
1421
|
-
let f = u.toString();
|
|
1422
|
-
i.search = f ? `?${f}` : "";
|
|
1423
|
-
}
|
|
1424
|
-
}
|
|
1425
|
-
return (!e || e === ".") && r.route.index && (i.search = i.search ? i.search.replace(/^\?/, "?index&") : "?index"), n !== "/" && (i.pathname = i.pathname === "/" ? n : N([n, i.pathname])), te(i);
|
|
1426
|
-
}
|
|
1427
|
-
function ln(e, t = {}) {
|
|
1428
|
-
let n = s.useContext(Pe);
|
|
1429
|
-
E(
|
|
1430
|
-
n != null,
|
|
1431
|
-
"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
|
|
1432
|
-
);
|
|
1433
|
-
let { basename: a } = ze(
|
|
1434
|
-
"useViewTransitionState"
|
|
1435
|
-
/* useViewTransitionState */
|
|
1436
|
-
), r = U(e, { relative: t.relative });
|
|
1437
|
-
if (!n.isTransitioning)
|
|
1438
|
-
return !1;
|
|
1439
|
-
let i = T(n.currentLocation.pathname, a) || n.currentLocation.pathname, c = T(n.nextLocation.pathname, a) || n.nextLocation.pathname;
|
|
1440
|
-
return K(r.pathname, c) != null || K(r.pathname, i) != null;
|
|
1441
|
-
}
|
|
1442
|
-
new TextEncoder();
|
|
1443
|
-
var _e = {
|
|
53
|
+
var k = {
|
|
1444
54
|
color: void 0,
|
|
1445
55
|
size: void 0,
|
|
1446
56
|
className: void 0,
|
|
1447
57
|
style: void 0,
|
|
1448
58
|
attr: void 0
|
|
1449
|
-
},
|
|
1450
|
-
function
|
|
59
|
+
}, w = d.createContext && /* @__PURE__ */ d.createContext(k), E = ["attr", "size", "title"];
|
|
60
|
+
function A(e, t) {
|
|
1451
61
|
if (e == null) return {};
|
|
1452
|
-
var
|
|
62
|
+
var r = I(e, t), i, c;
|
|
1453
63
|
if (Object.getOwnPropertySymbols) {
|
|
1454
|
-
var
|
|
1455
|
-
for (
|
|
1456
|
-
|
|
64
|
+
var s = Object.getOwnPropertySymbols(e);
|
|
65
|
+
for (c = 0; c < s.length; c++)
|
|
66
|
+
i = s[c], !(t.indexOf(i) >= 0) && Object.prototype.propertyIsEnumerable.call(e, i) && (r[i] = e[i]);
|
|
1457
67
|
}
|
|
1458
|
-
return
|
|
68
|
+
return r;
|
|
1459
69
|
}
|
|
1460
|
-
function
|
|
70
|
+
function I(e, t) {
|
|
1461
71
|
if (e == null) return {};
|
|
1462
|
-
var
|
|
1463
|
-
for (var
|
|
1464
|
-
if (Object.prototype.hasOwnProperty.call(e,
|
|
1465
|
-
if (t.indexOf(
|
|
1466
|
-
|
|
72
|
+
var r = {};
|
|
73
|
+
for (var i in e)
|
|
74
|
+
if (Object.prototype.hasOwnProperty.call(e, i)) {
|
|
75
|
+
if (t.indexOf(i) >= 0) continue;
|
|
76
|
+
r[i] = e[i];
|
|
1467
77
|
}
|
|
1468
|
-
return
|
|
78
|
+
return r;
|
|
1469
79
|
}
|
|
1470
|
-
function
|
|
1471
|
-
return
|
|
80
|
+
function f() {
|
|
81
|
+
return f = Object.assign ? Object.assign.bind() : function(e) {
|
|
1472
82
|
for (var t = 1; t < arguments.length; t++) {
|
|
1473
|
-
var
|
|
1474
|
-
for (var
|
|
1475
|
-
Object.prototype.hasOwnProperty.call(
|
|
83
|
+
var r = arguments[t];
|
|
84
|
+
for (var i in r)
|
|
85
|
+
Object.prototype.hasOwnProperty.call(r, i) && (e[i] = r[i]);
|
|
1476
86
|
}
|
|
1477
87
|
return e;
|
|
1478
|
-
},
|
|
88
|
+
}, f.apply(this, arguments);
|
|
1479
89
|
}
|
|
1480
|
-
function
|
|
1481
|
-
var
|
|
90
|
+
function z(e, t) {
|
|
91
|
+
var r = Object.keys(e);
|
|
1482
92
|
if (Object.getOwnPropertySymbols) {
|
|
1483
|
-
var
|
|
1484
|
-
t && (
|
|
1485
|
-
return Object.getOwnPropertyDescriptor(e,
|
|
1486
|
-
})),
|
|
93
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
94
|
+
t && (i = i.filter(function(c) {
|
|
95
|
+
return Object.getOwnPropertyDescriptor(e, c).enumerable;
|
|
96
|
+
})), r.push.apply(r, i);
|
|
1487
97
|
}
|
|
1488
|
-
return
|
|
98
|
+
return r;
|
|
1489
99
|
}
|
|
1490
|
-
function
|
|
100
|
+
function g(e) {
|
|
1491
101
|
for (var t = 1; t < arguments.length; t++) {
|
|
1492
|
-
var
|
|
1493
|
-
t % 2 ?
|
|
1494
|
-
|
|
1495
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(
|
|
1496
|
-
Object.defineProperty(e,
|
|
102
|
+
var r = arguments[t] != null ? arguments[t] : {};
|
|
103
|
+
t % 2 ? z(Object(r), !0).forEach(function(i) {
|
|
104
|
+
V(e, i, r[i]);
|
|
105
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : z(Object(r)).forEach(function(i) {
|
|
106
|
+
Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(r, i));
|
|
1497
107
|
});
|
|
1498
108
|
}
|
|
1499
109
|
return e;
|
|
1500
110
|
}
|
|
1501
|
-
function
|
|
1502
|
-
return t =
|
|
111
|
+
function V(e, t, r) {
|
|
112
|
+
return t = L(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
1503
113
|
}
|
|
1504
|
-
function
|
|
1505
|
-
var t =
|
|
114
|
+
function L(e) {
|
|
115
|
+
var t = T(e, "string");
|
|
1506
116
|
return typeof t == "symbol" ? t : t + "";
|
|
1507
117
|
}
|
|
1508
|
-
function
|
|
118
|
+
function T(e, t) {
|
|
1509
119
|
if (typeof e != "object" || !e) return e;
|
|
1510
|
-
var
|
|
1511
|
-
if (
|
|
1512
|
-
var
|
|
1513
|
-
if (typeof
|
|
120
|
+
var r = e[Symbol.toPrimitive];
|
|
121
|
+
if (r !== void 0) {
|
|
122
|
+
var i = r.call(e, t || "default");
|
|
123
|
+
if (typeof i != "object") return i;
|
|
1514
124
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1515
125
|
}
|
|
1516
126
|
return (t === "string" ? String : Number)(e);
|
|
1517
127
|
}
|
|
1518
|
-
function
|
|
1519
|
-
return e && e.map((t,
|
|
1520
|
-
key:
|
|
1521
|
-
}, t.attr),
|
|
128
|
+
function y(e) {
|
|
129
|
+
return e && e.map((t, r) => /* @__PURE__ */ d.createElement(t.tag, g({
|
|
130
|
+
key: r
|
|
131
|
+
}, t.attr), y(t.child)));
|
|
1522
132
|
}
|
|
1523
|
-
function
|
|
1524
|
-
return (t) => /* @__PURE__ */
|
|
1525
|
-
attr:
|
|
1526
|
-
}, t),
|
|
133
|
+
function l(e) {
|
|
134
|
+
return (t) => /* @__PURE__ */ d.createElement(D, f({
|
|
135
|
+
attr: g({}, e.attr)
|
|
136
|
+
}, t), y(e.child));
|
|
1527
137
|
}
|
|
1528
|
-
function
|
|
1529
|
-
var t = (
|
|
138
|
+
function D(e) {
|
|
139
|
+
var t = (r) => {
|
|
1530
140
|
var {
|
|
1531
|
-
attr:
|
|
1532
|
-
size:
|
|
1533
|
-
title:
|
|
1534
|
-
} = e,
|
|
1535
|
-
return
|
|
141
|
+
attr: i,
|
|
142
|
+
size: c,
|
|
143
|
+
title: s
|
|
144
|
+
} = e, v = A(e, E), u = c || r.size || "1em", o;
|
|
145
|
+
return r.className && (o = r.className), e.className && (o = (o ? o + " " : "") + e.className), /* @__PURE__ */ d.createElement("svg", f({
|
|
1536
146
|
stroke: "currentColor",
|
|
1537
147
|
fill: "currentColor",
|
|
1538
148
|
strokeWidth: "0"
|
|
1539
|
-
},
|
|
1540
|
-
className:
|
|
1541
|
-
style:
|
|
1542
|
-
color: e.color ||
|
|
1543
|
-
},
|
|
149
|
+
}, r.attr, i, v, {
|
|
150
|
+
className: o,
|
|
151
|
+
style: g(g({
|
|
152
|
+
color: e.color || r.color
|
|
153
|
+
}, r.style), e.style),
|
|
1544
154
|
height: u,
|
|
1545
155
|
width: u,
|
|
1546
156
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1547
|
-
}),
|
|
157
|
+
}), s && /* @__PURE__ */ d.createElement("title", null, s), e.children);
|
|
1548
158
|
};
|
|
1549
|
-
return
|
|
1550
|
-
}
|
|
1551
|
-
function mn(e) {
|
|
1552
|
-
return k({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M2 12h2a7.986 7.986 0 0 1 2.337-5.663 7.91 7.91 0 0 1 2.542-1.71 8.12 8.12 0 0 1 6.13-.041A2.488 2.488 0 0 0 17.5 7C18.886 7 20 5.886 20 4.5S18.886 2 17.5 2c-.689 0-1.312.276-1.763.725-2.431-.973-5.223-.958-7.635.059a9.928 9.928 0 0 0-3.18 2.139 9.92 9.92 0 0 0-2.14 3.179A10.005 10.005 0 0 0 2 12zm17.373 3.122c-.401.952-.977 1.808-1.71 2.541s-1.589 1.309-2.542 1.71a8.12 8.12 0 0 1-6.13.041A2.488 2.488 0 0 0 6.5 17C5.114 17 4 18.114 4 19.5S5.114 22 6.5 22c.689 0 1.312-.276 1.763-.725A9.965 9.965 0 0 0 12 22a9.983 9.983 0 0 0 9.217-6.102A9.992 9.992 0 0 0 22 12h-2a7.993 7.993 0 0 1-.627 3.122z" }, child: [] }, { tag: "path", attr: { d: "M12 7.462c-2.502 0-4.538 2.036-4.538 4.538S9.498 16.538 12 16.538s4.538-2.036 4.538-4.538S14.502 7.462 12 7.462zm0 7.076c-1.399 0-2.538-1.139-2.538-2.538S10.601 9.462 12 9.462s2.538 1.139 2.538 2.538-1.139 2.538-2.538 2.538z" }, child: [] }] })(e);
|
|
159
|
+
return w !== void 0 ? /* @__PURE__ */ d.createElement(w.Consumer, null, (r) => t(r)) : t(k);
|
|
1553
160
|
}
|
|
1554
|
-
function
|
|
1555
|
-
return
|
|
161
|
+
function U(e) {
|
|
162
|
+
return l({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M2 12h2a7.986 7.986 0 0 1 2.337-5.663 7.91 7.91 0 0 1 2.542-1.71 8.12 8.12 0 0 1 6.13-.041A2.488 2.488 0 0 0 17.5 7C18.886 7 20 5.886 20 4.5S18.886 2 17.5 2c-.689 0-1.312.276-1.763.725-2.431-.973-5.223-.958-7.635.059a9.928 9.928 0 0 0-3.18 2.139 9.92 9.92 0 0 0-2.14 3.179A10.005 10.005 0 0 0 2 12zm17.373 3.122c-.401.952-.977 1.808-1.71 2.541s-1.589 1.309-2.542 1.71a8.12 8.12 0 0 1-6.13.041A2.488 2.488 0 0 0 6.5 17C5.114 17 4 18.114 4 19.5S5.114 22 6.5 22c.689 0 1.312-.276 1.763-.725A9.965 9.965 0 0 0 12 22a9.983 9.983 0 0 0 9.217-6.102A9.992 9.992 0 0 0 22 12h-2a7.993 7.993 0 0 1-.627 3.122z" }, child: [] }, { tag: "path", attr: { d: "M12 7.462c-2.502 0-4.538 2.036-4.538 4.538S9.498 16.538 12 16.538s4.538-2.036 4.538-4.538S14.502 7.462 12 7.462zm0 7.076c-1.399 0-2.538-1.139-2.538-2.538S10.601 9.462 12 9.462s2.538 1.139 2.538 2.538-1.139 2.538-2.538 2.538z" }, child: [] }] })(e);
|
|
1556
163
|
}
|
|
1557
|
-
function
|
|
1558
|
-
return
|
|
164
|
+
function R(e) {
|
|
165
|
+
return l({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M19 2H6c-1.206 0-3 .799-3 3v14c0 2.201 1.794 3 3 3h15v-2H6.012C5.55 19.988 5 19.806 5 19s.55-.988 1.012-1H21V4c0-1.103-.897-2-2-2zm0 14H5V5c0-.806.55-.988 1-1h13v12z" }, child: [] }] })(e);
|
|
1559
166
|
}
|
|
1560
|
-
function
|
|
1561
|
-
return
|
|
167
|
+
function $(e) {
|
|
168
|
+
return l({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M20 4H4c-1.103 0-2 .897-2 2v12c0 1.103.897 2 2 2h16c1.103 0 2-.897 2-2V6c0-1.103-.897-2-2-2zm0 2v.511l-8 6.223-8-6.222V6h16zM4 18V9.044l7.386 5.745a.994.994 0 0 0 1.228 0L20 9.044 20.002 18H4z" }, child: [] }] })(e);
|
|
1562
169
|
}
|
|
1563
|
-
function
|
|
1564
|
-
return
|
|
170
|
+
function F(e) {
|
|
171
|
+
return l({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M11.953 2C6.465 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.493 2 11.953 2zM12 20c-4.411 0-8-3.589-8-8s3.567-8 7.953-8C16.391 4 20 7.589 20 12s-3.589 8-8 8z" }, child: [] }, { tag: "path", attr: { d: "M11 7h2v7h-2zm0 8h2v2h-2z" }, child: [] }] })(e);
|
|
1565
172
|
}
|
|
1566
|
-
function
|
|
1567
|
-
return
|
|
173
|
+
function q(e) {
|
|
174
|
+
return l({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M19.903 8.586a.997.997 0 0 0-.196-.293l-6-6a.997.997 0 0 0-.293-.196c-.03-.014-.062-.022-.094-.033a.991.991 0 0 0-.259-.051C13.04 2.011 13.021 2 13 2H6c-1.103 0-2 .897-2 2v16c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2V9c0-.021-.011-.04-.013-.062a.952.952 0 0 0-.051-.259c-.01-.032-.019-.063-.033-.093zM16.586 8H14V5.414L16.586 8zM6 20V4h6v5a1 1 0 0 0 1 1h5l.002 10H6z" }, child: [] }, { tag: "path", attr: { d: "M8 12h8v2H8zm0 4h8v2H8zm0-8h2v2H8z" }, child: [] }] })(e);
|
|
1568
175
|
}
|
|
1569
|
-
function
|
|
1570
|
-
return
|
|
176
|
+
function G(e) {
|
|
177
|
+
return l({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M3 13h1v7c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-7h1a1 1 0 0 0 .707-1.707l-9-9a.999.999 0 0 0-1.414 0l-9 9A1 1 0 0 0 3 13zm7 7v-5h4v5h-4zm2-15.586 6 6V15l.001 5H16v-5c0-1.103-.897-2-2-2h-4c-1.103 0-2 .897-2 2v5H6v-9.586l6-6z" }, child: [] }] })(e);
|
|
1571
178
|
}
|
|
1572
|
-
function
|
|
1573
|
-
return
|
|
179
|
+
function Q(e) {
|
|
180
|
+
return l({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4.222 19.778a4.983 4.983 0 0 0 3.535 1.462 4.986 4.986 0 0 0 3.536-1.462l2.828-2.829-1.414-1.414-2.828 2.829a3.007 3.007 0 0 1-4.243 0 3.005 3.005 0 0 1 0-4.243l2.829-2.828-1.414-1.414-2.829 2.828a5.006 5.006 0 0 0 0 7.071zm15.556-8.485a5.008 5.008 0 0 0 0-7.071 5.006 5.006 0 0 0-7.071 0L9.879 7.051l1.414 1.414 2.828-2.829a3.007 3.007 0 0 1 4.243 0 3.005 3.005 0 0 1 0 4.243l-2.829 2.828 1.414 1.414 2.829-2.828z" }, child: [] }, { tag: "path", attr: { d: "m8.464 16.95-1.415-1.414 8.487-8.486 1.414 1.415z" }, child: [] }] })(e);
|
|
1574
181
|
}
|
|
1575
|
-
function
|
|
1576
|
-
return
|
|
182
|
+
function W(e) {
|
|
183
|
+
return l({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M16 13v-2H7V8l-5 4 5 4v-3z" }, child: [] }, { tag: "path", attr: { d: "M20 3h-9c-1.103 0-2 .897-2 2v4h2V5h9v14h-9v-4H9v4c0 1.103.897 2 2 2h9c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2z" }, child: [] }] })(e);
|
|
1577
184
|
}
|
|
1578
|
-
function
|
|
1579
|
-
return
|
|
185
|
+
function X(e) {
|
|
186
|
+
return l({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "m12 17 1-2V9.858c1.721-.447 3-2 3-3.858 0-2.206-1.794-4-4-4S8 3.794 8 6c0 1.858 1.279 3.411 3 3.858V15l1 2zM10 6c0-1.103.897-2 2-2s2 .897 2 2-.897 2-2 2-2-.897-2-2z" }, child: [] }, { tag: "path", attr: { d: "m16.267 10.563-.533 1.928C18.325 13.207 20 14.584 20 16c0 1.892-3.285 4-8 4s-8-2.108-8-4c0-1.416 1.675-2.793 4.267-3.51l-.533-1.928C4.197 11.54 2 13.623 2 16c0 3.364 4.393 6 10 6s10-2.636 10-6c0-2.377-2.197-4.46-5.733-5.437z" }, child: [] }] })(e);
|
|
1580
187
|
}
|
|
1581
|
-
function
|
|
1582
|
-
return
|
|
188
|
+
function J(e) {
|
|
189
|
+
return l({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 6h16v2H4zm4 5h12v2H8zm5 5h7v2h-7z" }, child: [] }] })(e);
|
|
1583
190
|
}
|
|
1584
|
-
function
|
|
1585
|
-
return
|
|
191
|
+
function K(e) {
|
|
192
|
+
return l({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, child: [] }] })(e);
|
|
1586
193
|
}
|
|
1587
|
-
function
|
|
1588
|
-
return
|
|
194
|
+
function Y(e) {
|
|
195
|
+
return l({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M11.63 21.91A.9.9 0 0 0 12 22a1 1 0 0 0 .41-.09C22 17.67 21 7 21 6.9a1 1 0 0 0-.55-.79l-8-4a1 1 0 0 0-.9 0l-8 4A1 1 0 0 0 3 6.9c0 .1-.92 10.77 8.63 15.01zM5 7.63l7-3.51 7 3.51c.05 2-.27 9-7 12.27C5.26 16.63 4.94 9.64 5 7.63z" }, child: [] }, { tag: "path", attr: { d: "M11.06 16h2v-3h3.01v-2h-3.01V8h-2v3h-3v2h3v3z" }, child: [] }] })(e);
|
|
1589
196
|
}
|
|
1590
|
-
function
|
|
1591
|
-
return
|
|
197
|
+
function Z(e) {
|
|
198
|
+
return l({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M3.414 13.778 2 15.192l4.949 2.121 2.122 4.95 1.414-1.414-.707-3.536L13.091 14l3.61 7.704 1.339-1.339-1.19-10.123 2.828-2.829a2 2 0 1 0-2.828-2.828l-2.903 2.903L3.824 6.297 2.559 7.563l7.644 3.67-3.253 3.253-3.536-.708z" }, child: [] }] })(e);
|
|
1592
199
|
}
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
200
|
+
function ee(e) {
|
|
201
|
+
return l({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M15.661 15.549a1.315 1.315 0 0 0 1.185-1.386 1.363 1.363 0 0 0-1.35-1.302h-.048a1.352 1.352 0 0 0-1.303 1.397c.024.379.179.687.391.911-.827 1.609-2.07 2.794-3.954 3.788-1.266.663-2.604.912-3.905.734-1.089-.153-1.94-.64-2.463-1.421-.78-1.185-.852-2.462-.201-3.74a5.597 5.597 0 0 1 1.658-1.931 7.88 7.88 0 0 1-.331-1.218c-3.506 2.51-3.148 5.942-2.084 7.564.794 1.184 2.415 1.941 4.19 1.941.474 0 .972-.035 1.457-.154 3.077-.592 5.409-2.438 6.747-5.16l.011-.023z" }, child: [] }, { tag: "path", attr: { d: "M19.887 12.589c-1.834-2.154-4.533-3.337-7.611-3.337h-.403c-.2-.438-.661-.711-1.183-.711h-.036c-.744 0-1.325.64-1.301 1.385.023.71.627 1.302 1.35 1.302h.059a1.332 1.332 0 0 0 1.183-.828h.439c1.824 0 3.551.532 5.126 1.574 1.206.792 2.072 1.834 2.557 3.077.425 1.019.402 2.013-.035 2.843-.675 1.302-1.812 1.988-3.314 1.988-.947 0-1.871-.296-2.345-.509-.283.235-.758.626-1.102.863 1.042.473 2.096.746 3.113.746 2.309 0 4.023-1.302 4.676-2.557.709-1.422.651-3.813-1.161-5.859l-.012.023z" }, child: [] }, { tag: "path", attr: { d: "M7.647 15.975c.023.71.626 1.302 1.35 1.302h.048a1.334 1.334 0 0 0 1.302-1.397c0-.71-.616-1.301-1.338-1.301h-.048c-.048 0-.118 0-.178.022-.982-1.657-1.397-3.434-1.242-5.349.094-1.445.567-2.7 1.42-3.742.71-.888 2.048-1.326 2.96-1.35 2.556-.048 3.622 3.138 3.704 4.404l1.184.354C16.536 5.036 14.122 3 11.813 3 9.647 3 7.647 4.574 6.842 6.884c-1.102 3.077-.379 6.036.971 8.404-.118.154-.189.426-.166.687z" }, child: [] }] })(e);
|
|
202
|
+
}
|
|
203
|
+
const ne = ({ onToggle: e, isOpen: t }) => {
|
|
204
|
+
const [r, i] = b(!0), [c, s] = b(null), v = t ? "sidebar-bar-panel open" : "sidebar-bar-panel", u = C(), { FinSesion: o } = B();
|
|
205
|
+
if (N(() => {
|
|
206
|
+
const m = localStorage.getItem("user_token");
|
|
207
|
+
if (m) {
|
|
208
|
+
const p = x(m);
|
|
209
|
+
s(p);
|
|
1600
210
|
}
|
|
1601
|
-
|
|
1602
|
-
}, []),
|
|
1603
|
-
const
|
|
211
|
+
i(!1);
|
|
212
|
+
}, []), N(() => {
|
|
213
|
+
const m = setTimeout(() => {
|
|
1604
214
|
const p = localStorage.getItem("user_token");
|
|
1605
215
|
if (p) {
|
|
1606
|
-
const
|
|
1607
|
-
|
|
216
|
+
const M = x(p);
|
|
217
|
+
s(M);
|
|
1608
218
|
}
|
|
1609
219
|
}, 2e3);
|
|
1610
|
-
return () => clearTimeout(
|
|
1611
|
-
}, []),
|
|
1612
|
-
return /* @__PURE__ */
|
|
1613
|
-
const
|
|
220
|
+
return () => clearTimeout(m);
|
|
221
|
+
}, []), r)
|
|
222
|
+
return /* @__PURE__ */ a(O, {});
|
|
223
|
+
const _ = () => {
|
|
1614
224
|
u("/sistema/usuario");
|
|
1615
225
|
};
|
|
1616
|
-
return /* @__PURE__ */
|
|
1617
|
-
/* @__PURE__ */
|
|
1618
|
-
/* @__PURE__ */
|
|
226
|
+
return /* @__PURE__ */ a("div", { className: `container-fluid ${t ? "menu-open" : ""}`, children: /* @__PURE__ */ n("div", { className: v, children: [
|
|
227
|
+
/* @__PURE__ */ n("div", { className: "logo_details", children: [
|
|
228
|
+
/* @__PURE__ */ a(
|
|
1619
229
|
"img",
|
|
1620
230
|
{
|
|
1621
231
|
src: "/logo-unp-gris.png",
|
|
@@ -1623,121 +233,121 @@ const In = ({ onToggle: e, isOpen: t }) => {
|
|
|
1623
233
|
className: "icon logo-image"
|
|
1624
234
|
}
|
|
1625
235
|
),
|
|
1626
|
-
/* @__PURE__ */
|
|
1627
|
-
t ? /* @__PURE__ */
|
|
1628
|
-
|
|
236
|
+
/* @__PURE__ */ a("div", { className: "logo-name", children: "EI-UNP" }),
|
|
237
|
+
t ? /* @__PURE__ */ a(
|
|
238
|
+
J,
|
|
1629
239
|
{
|
|
1630
240
|
className: "bx bx-menu i",
|
|
1631
241
|
id: "btn",
|
|
1632
242
|
onClick: e
|
|
1633
243
|
}
|
|
1634
|
-
) : /* @__PURE__ */
|
|
244
|
+
) : /* @__PURE__ */ a(K, { className: "bx bx-menu i", id: "btn", onClick: e })
|
|
1635
245
|
] }),
|
|
1636
|
-
/* @__PURE__ */
|
|
1637
|
-
/* @__PURE__ */
|
|
1638
|
-
/* @__PURE__ */
|
|
1639
|
-
/* @__PURE__ */
|
|
1640
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ n("ul", { className: "nav-list-panel", children: [
|
|
247
|
+
/* @__PURE__ */ n("li", { children: [
|
|
248
|
+
/* @__PURE__ */ n("a", { href: "", children: [
|
|
249
|
+
/* @__PURE__ */ a(G, { className: "bx bx-home i2" }),
|
|
250
|
+
/* @__PURE__ */ a("span", { className: "link_name", children: "Inicio" })
|
|
1641
251
|
] }),
|
|
1642
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ a("span", { className: "tooltip", children: "Inicio" })
|
|
1643
253
|
] }),
|
|
1644
|
-
/* @__PURE__ */
|
|
1645
|
-
/* @__PURE__ */
|
|
1646
|
-
/* @__PURE__ */
|
|
1647
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ n("li", { children: [
|
|
255
|
+
/* @__PURE__ */ n("a", { href: "", children: [
|
|
256
|
+
/* @__PURE__ */ a(X, { className: "bx bx-map-pin i2" }),
|
|
257
|
+
/* @__PURE__ */ a("span", { className: "link_name", children: "Mapa del proceso" })
|
|
1648
258
|
] }),
|
|
1649
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ a("span", { className: "tooltip", children: "Mapa del proceso" })
|
|
1650
260
|
] }),
|
|
1651
|
-
/* @__PURE__ */
|
|
1652
|
-
/* @__PURE__ */
|
|
1653
|
-
/* @__PURE__ */
|
|
1654
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ n("li", { children: [
|
|
262
|
+
/* @__PURE__ */ n("a", { href: "", children: [
|
|
263
|
+
/* @__PURE__ */ a(R, { className: "bx bx-book-alt i2" }),
|
|
264
|
+
/* @__PURE__ */ a("span", { className: "link_name", children: "Manuales de usuario" })
|
|
1655
265
|
] }),
|
|
1656
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ a("span", { className: "tooltip", children: "Manual de usuario" })
|
|
1657
267
|
] }),
|
|
1658
|
-
/* @__PURE__ */
|
|
1659
|
-
/* @__PURE__ */
|
|
1660
|
-
/* @__PURE__ */
|
|
1661
|
-
/* @__PURE__ */
|
|
1662
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ a("div", { style: { paddingLeft: "15px", paddingRight: "15px" }, children: /* @__PURE__ */ a("hr", { style: { borderTop: "1px solid white" } }) }),
|
|
269
|
+
/* @__PURE__ */ n("li", { children: [
|
|
270
|
+
/* @__PURE__ */ n("a", { href: "https://www.unp.gov.co/", target: "_blank", children: [
|
|
271
|
+
/* @__PURE__ */ a(Q, { className: "bx bx-link-alt i2" }),
|
|
272
|
+
/* @__PURE__ */ a("span", { className: "link_name", children: "Portal UNP" })
|
|
1663
273
|
] }),
|
|
1664
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ a("span", { className: "tooltip", children: "Portal UNP" })
|
|
1665
275
|
] }),
|
|
1666
|
-
/* @__PURE__ */
|
|
1667
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ n("li", { children: [
|
|
277
|
+
/* @__PURE__ */ n(
|
|
1668
278
|
"a",
|
|
1669
279
|
{
|
|
1670
280
|
href: "https://login.microsoftonline.com/common/oauth2/authorize?client_id=00000002-0000-0ff1-ce00-000000000000&redirect_uri=https%3a%2f%2foutlook.office365.com%2fowa%2f&resource=00000002-0000-0ff1-ce00-000000000000&response_mode=form_post&response_type=code+id_token&scope=openid&msafed=1&msaredir=1&client-request-id=f8488f2f-33b7-d769-3dc8-fe71d263f531&protectedtoken=true&claims=%7b%22id_token%22%3a%7b%22xms_cc%22%3a%7b%22values%22%3a%5b%22CP1%22%5d%7d%7d%7d&nonce=638372347486593361.36439678-d731-49f6-a49f-cc0594f2abb0&state=Dcs7EoAgDEVR0HE5kc8LCVkO4NBaun1T3NPdGEI4vcOL2Qkq6NAKVu7SDJByQxgm2ulRFGLbQsOltXIz3nXMmaO_V3q_kX4",
|
|
1671
281
|
target: "_blank",
|
|
1672
282
|
children: [
|
|
1673
|
-
/* @__PURE__ */
|
|
1674
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ a($, { className: "bx bx-envelope i2" }),
|
|
284
|
+
/* @__PURE__ */ a("span", { className: "link_name", children: "Correo institucional" })
|
|
1675
285
|
]
|
|
1676
286
|
}
|
|
1677
287
|
),
|
|
1678
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ a("span", { className: "tooltip", children: "Correo institucional" })
|
|
1679
289
|
] }),
|
|
1680
|
-
/* @__PURE__ */
|
|
1681
|
-
/* @__PURE__ */
|
|
1682
|
-
/* @__PURE__ */
|
|
1683
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ n("li", { children: [
|
|
291
|
+
/* @__PURE__ */ n("a", { href: "http://intranet.unp.gov.co/", target: "_blank", children: [
|
|
292
|
+
/* @__PURE__ */ a(ee, { className: "bx bxl-redux i2" }),
|
|
293
|
+
/* @__PURE__ */ a("span", { className: "link_name", children: "Acceso directo a Intranet" })
|
|
1684
294
|
] }),
|
|
1685
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ a("span", { className: "tooltip", children: "Acceso directo a Intranet" })
|
|
1686
296
|
] }),
|
|
1687
|
-
/* @__PURE__ */
|
|
1688
|
-
/* @__PURE__ */
|
|
1689
|
-
/* @__PURE__ */
|
|
1690
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ n("li", { children: [
|
|
298
|
+
/* @__PURE__ */ n("a", { href: "https://mesadeservicios.unp.gov.co/HEAT/", target: "_blank", children: [
|
|
299
|
+
/* @__PURE__ */ a(F, { className: "bx bx-error-circle i2" }),
|
|
300
|
+
/* @__PURE__ */ a("span", { className: "link_name", children: "Mesa de servicios" })
|
|
1691
301
|
] }),
|
|
1692
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ a("span", { className: "tooltip", children: "Mesa de servicios" })
|
|
1693
303
|
] }),
|
|
1694
|
-
/* @__PURE__ */
|
|
1695
|
-
/* @__PURE__ */
|
|
1696
|
-
/* @__PURE__ */
|
|
1697
|
-
/* @__PURE__ */
|
|
1698
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ a("div", { style: { paddingLeft: "15px", paddingRight: "15px" }, children: /* @__PURE__ */ a("hr", { style: { borderTop: "1px solid white" } }) }),
|
|
305
|
+
/* @__PURE__ */ n("li", { children: [
|
|
306
|
+
/* @__PURE__ */ n("a", { href: "", children: [
|
|
307
|
+
/* @__PURE__ */ a(Y, { className: "bx i2" }),
|
|
308
|
+
/* @__PURE__ */ a("span", { className: "link_name", children: "Medida de emergencia" })
|
|
1699
309
|
] }),
|
|
1700
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ a("span", { className: "tooltip", children: "Medida de emergencia" })
|
|
1701
311
|
] }),
|
|
1702
|
-
/* @__PURE__ */
|
|
1703
|
-
/* @__PURE__ */
|
|
1704
|
-
/* @__PURE__ */
|
|
1705
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ n("li", { children: [
|
|
313
|
+
/* @__PURE__ */ n("a", { href: "", children: [
|
|
314
|
+
/* @__PURE__ */ a(U, { className: "bx i2" }),
|
|
315
|
+
/* @__PURE__ */ a("span", { className: "link_name", children: "Acta de reunión" })
|
|
1706
316
|
] }),
|
|
1707
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ a("span", { className: "tooltip", children: "Acta de reunión" })
|
|
1708
318
|
] }),
|
|
1709
|
-
/* @__PURE__ */
|
|
1710
|
-
/* @__PURE__ */
|
|
1711
|
-
/* @__PURE__ */
|
|
1712
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ n("li", { children: [
|
|
320
|
+
/* @__PURE__ */ n("a", { href: "", children: [
|
|
321
|
+
/* @__PURE__ */ a(Z, { className: "bx i2" }),
|
|
322
|
+
/* @__PURE__ */ a("span", { className: "link_name", children: "Solicitud de viáticos" })
|
|
1713
323
|
] }),
|
|
1714
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ a("span", { className: "tooltip", children: "Solicitud de viáticos" })
|
|
1715
325
|
] }),
|
|
1716
|
-
/* @__PURE__ */
|
|
1717
|
-
/* @__PURE__ */
|
|
1718
|
-
/* @__PURE__ */
|
|
1719
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ n("li", { children: [
|
|
327
|
+
/* @__PURE__ */ n("a", { href: `${P}${S}`, children: [
|
|
328
|
+
/* @__PURE__ */ a(q, { className: "bx i2" }),
|
|
329
|
+
/* @__PURE__ */ a("span", { className: "link_name", children: "Certificados laborales (OPS)" })
|
|
1720
330
|
] }),
|
|
1721
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ a("span", { className: "tooltip", children: "Certificados laborales (OPS)" })
|
|
1722
332
|
] })
|
|
1723
333
|
] }),
|
|
1724
|
-
/* @__PURE__ */
|
|
1725
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ a("div", { className: "profile-content", children: /* @__PURE__ */ n("div", { className: "profile", children: [
|
|
335
|
+
/* @__PURE__ */ a(
|
|
1726
336
|
"div",
|
|
1727
337
|
{
|
|
1728
338
|
className: "profile-detail",
|
|
1729
|
-
onClick:
|
|
339
|
+
onClick: _,
|
|
1730
340
|
style: { cursor: "pointer" },
|
|
1731
|
-
children:
|
|
1732
|
-
/* @__PURE__ */
|
|
1733
|
-
/* @__PURE__ */
|
|
341
|
+
children: c && /* @__PURE__ */ n("div", { className: "name-job", style: { marginTop: "3px" }, children: [
|
|
342
|
+
/* @__PURE__ */ a("div", { className: "name", children: c.access_nuser }),
|
|
343
|
+
/* @__PURE__ */ a("div", { className: "job", children: c.acces_linker })
|
|
1734
344
|
] })
|
|
1735
345
|
}
|
|
1736
346
|
),
|
|
1737
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ a(W, { className: "icon", onClick: o })
|
|
1738
348
|
] }) })
|
|
1739
349
|
] }) });
|
|
1740
350
|
};
|
|
1741
351
|
export {
|
|
1742
|
-
|
|
352
|
+
ne as MenuLateral
|
|
1743
353
|
};
|