@genai-fi/base 4.2.2 → 4.2.3
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,14 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { ThemeProvider as
|
|
3
|
-
import { StyledEngineProvider as
|
|
4
|
-
import { theme as
|
|
5
|
-
import * as
|
|
6
|
-
import { Suspense as
|
|
7
|
-
import * as
|
|
8
|
-
import
|
|
9
|
-
import { P as
|
|
1
|
+
import { jsx as A } from "react/jsx-runtime";
|
|
2
|
+
import { ThemeProvider as Ae } from "@emotion/react";
|
|
3
|
+
import { StyledEngineProvider as Ue } from "@mui/material";
|
|
4
|
+
import { theme as We } from "../../style/theme.js";
|
|
5
|
+
import * as o from "react";
|
|
6
|
+
import { Suspense as Be } from "react";
|
|
7
|
+
import * as He from "react-dom";
|
|
8
|
+
import je from "../Loading/Loading.js";
|
|
9
|
+
import { P as Ve } from "../../react-D_xU5dL6.js";
|
|
10
10
|
/**
|
|
11
|
-
* react-router v7.
|
|
11
|
+
* react-router v7.13.0
|
|
12
12
|
*
|
|
13
13
|
* Copyright (c) Remix Software Inc.
|
|
14
14
|
*
|
|
@@ -17,11 +17,11 @@ import { P as Me } from "../../react-D_xU5dL6.js";
|
|
|
17
17
|
*
|
|
18
18
|
* @license MIT
|
|
19
19
|
*/
|
|
20
|
-
function
|
|
20
|
+
function C(e, t) {
|
|
21
21
|
if (e === !1 || e === null || typeof e > "u")
|
|
22
22
|
throw new Error(t);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function T(e, t) {
|
|
25
25
|
if (!e) {
|
|
26
26
|
typeof console < "u" && console.warn(t);
|
|
27
27
|
try {
|
|
@@ -30,119 +30,119 @@ function S(e, t) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function te({
|
|
34
34
|
pathname: e = "/",
|
|
35
35
|
search: t = "",
|
|
36
36
|
hash: n = ""
|
|
37
37
|
}) {
|
|
38
38
|
return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), n && n !== "#" && (e += n.charAt(0) === "#" ? n : "#" + n), e;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function G(e) {
|
|
41
41
|
let t = {};
|
|
42
42
|
if (e) {
|
|
43
43
|
let n = e.indexOf("#");
|
|
44
44
|
n >= 0 && (t.hash = e.substring(n), e = e.substring(0, n));
|
|
45
|
-
let
|
|
46
|
-
|
|
45
|
+
let r = e.indexOf("?");
|
|
46
|
+
r >= 0 && (t.search = e.substring(r), e = e.substring(0, r)), e && (t.pathname = e);
|
|
47
47
|
}
|
|
48
48
|
return t;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
return
|
|
50
|
+
function ge(e, t, n = "/") {
|
|
51
|
+
return ze(e, t, n, !1);
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
let
|
|
55
|
-
if (
|
|
53
|
+
function ze(e, t, n, r) {
|
|
54
|
+
let i = typeof t == "string" ? G(t) : t, a = M(i.pathname || "/", n);
|
|
55
|
+
if (a == null)
|
|
56
56
|
return null;
|
|
57
|
-
let l =
|
|
58
|
-
|
|
59
|
-
let
|
|
60
|
-
for (let u = 0;
|
|
61
|
-
let
|
|
62
|
-
|
|
57
|
+
let l = ye(e);
|
|
58
|
+
Je(l);
|
|
59
|
+
let s = null;
|
|
60
|
+
for (let u = 0; s == null && u < l.length; ++u) {
|
|
61
|
+
let f = rt(a);
|
|
62
|
+
s = tt(
|
|
63
63
|
l[u],
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
f,
|
|
65
|
+
r
|
|
66
66
|
);
|
|
67
67
|
}
|
|
68
|
-
return
|
|
68
|
+
return s;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
let
|
|
72
|
-
let
|
|
73
|
-
relativePath:
|
|
70
|
+
function ye(e, t = [], n = [], r = "", i = !1) {
|
|
71
|
+
let a = (l, s, u = i, f) => {
|
|
72
|
+
let d = {
|
|
73
|
+
relativePath: f === void 0 ? l.path || "" : f,
|
|
74
74
|
caseSensitive: l.caseSensitive === !0,
|
|
75
|
-
childrenIndex:
|
|
75
|
+
childrenIndex: s,
|
|
76
76
|
route: l
|
|
77
77
|
};
|
|
78
|
-
if (
|
|
79
|
-
if (!
|
|
78
|
+
if (d.relativePath.startsWith("/")) {
|
|
79
|
+
if (!d.relativePath.startsWith(r) && u)
|
|
80
80
|
return;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
`Absolute route path "${
|
|
84
|
-
),
|
|
81
|
+
C(
|
|
82
|
+
d.relativePath.startsWith(r),
|
|
83
|
+
`Absolute route path "${d.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
|
|
84
|
+
), d.relativePath = d.relativePath.slice(r.length);
|
|
85
85
|
}
|
|
86
|
-
let
|
|
87
|
-
l.children && l.children.length > 0 && (
|
|
86
|
+
let c = D([r, d.relativePath]), h = n.concat(d);
|
|
87
|
+
l.children && l.children.length > 0 && (C(
|
|
88
88
|
// Our types know better, but runtime JS may not!
|
|
89
89
|
// @ts-expect-error
|
|
90
90
|
l.index !== !0,
|
|
91
|
-
`Index routes must not have child routes. Please remove all child routes from route path "${
|
|
92
|
-
),
|
|
91
|
+
`Index routes must not have child routes. Please remove all child routes from route path "${c}".`
|
|
92
|
+
), ye(
|
|
93
93
|
l.children,
|
|
94
94
|
t,
|
|
95
95
|
h,
|
|
96
|
-
|
|
96
|
+
c,
|
|
97
97
|
u
|
|
98
98
|
)), !(l.path == null && !l.index) && t.push({
|
|
99
|
-
path:
|
|
100
|
-
score:
|
|
99
|
+
path: c,
|
|
100
|
+
score: Ze(c, l.index),
|
|
101
101
|
routesMeta: h
|
|
102
102
|
});
|
|
103
103
|
};
|
|
104
|
-
return e.forEach((l,
|
|
104
|
+
return e.forEach((l, s) => {
|
|
105
105
|
var u;
|
|
106
106
|
if (l.path === "" || !((u = l.path) != null && u.includes("?")))
|
|
107
|
-
|
|
107
|
+
a(l, s);
|
|
108
108
|
else
|
|
109
|
-
for (let
|
|
110
|
-
|
|
109
|
+
for (let f of Re(l.path))
|
|
110
|
+
a(l, s, !0, f);
|
|
111
111
|
}), t;
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function Re(e) {
|
|
114
114
|
let t = e.split("/");
|
|
115
115
|
if (t.length === 0) return [];
|
|
116
|
-
let [n, ...
|
|
117
|
-
if (
|
|
118
|
-
return
|
|
119
|
-
let l =
|
|
120
|
-
return
|
|
116
|
+
let [n, ...r] = t, i = n.endsWith("?"), a = n.replace(/\?$/, "");
|
|
117
|
+
if (r.length === 0)
|
|
118
|
+
return i ? [a, ""] : [a];
|
|
119
|
+
let l = Re(r.join("/")), s = [];
|
|
120
|
+
return s.push(
|
|
121
121
|
...l.map(
|
|
122
|
-
(u) => u === "" ?
|
|
122
|
+
(u) => u === "" ? a : [a, u].join("/")
|
|
123
123
|
)
|
|
124
|
-
),
|
|
124
|
+
), i && s.push(...l), s.map(
|
|
125
125
|
(u) => e.startsWith("/") && u === "" ? "/" : u
|
|
126
126
|
);
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function Je(e) {
|
|
129
129
|
e.sort(
|
|
130
|
-
(t, n) => t.score !== n.score ? n.score - t.score :
|
|
131
|
-
t.routesMeta.map((
|
|
132
|
-
n.routesMeta.map((
|
|
130
|
+
(t, n) => t.score !== n.score ? n.score - t.score : et(
|
|
131
|
+
t.routesMeta.map((r) => r.childrenIndex),
|
|
132
|
+
n.routesMeta.map((r) => r.childrenIndex)
|
|
133
133
|
)
|
|
134
134
|
);
|
|
135
135
|
}
|
|
136
|
-
var
|
|
137
|
-
function
|
|
138
|
-
let n = e.split("/"),
|
|
139
|
-
return n.some(
|
|
140
|
-
(
|
|
141
|
-
|
|
136
|
+
var Ye = /^:[\w-]+$/, Ke = 3, Ge = 2, qe = 1, Xe = 10, Qe = -2, ue = (e) => e === "*";
|
|
137
|
+
function Ze(e, t) {
|
|
138
|
+
let n = e.split("/"), r = n.length;
|
|
139
|
+
return n.some(ue) && (r += Qe), t && (r += Ge), n.filter((i) => !ue(i)).reduce(
|
|
140
|
+
(i, a) => i + (Ye.test(a) ? Ke : a === "" ? qe : Xe),
|
|
141
|
+
r
|
|
142
142
|
);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
return e.length === t.length && e.slice(0, -1).every((
|
|
144
|
+
function et(e, t) {
|
|
145
|
+
return e.length === t.length && e.slice(0, -1).every((r, i) => r === t[i]) ? (
|
|
146
146
|
// If two routes are siblings, we should try to match the earlier sibling
|
|
147
147
|
// first. This allows people to have fine-grained control over the matching
|
|
148
148
|
// behavior by simply putting routes with identical paths in the order they
|
|
@@ -154,340 +154,414 @@ function He(e, t) {
|
|
|
154
154
|
0
|
|
155
155
|
);
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
let { routesMeta:
|
|
159
|
-
for (let
|
|
160
|
-
let u =
|
|
161
|
-
{ path: u.relativePath, caseSensitive: u.caseSensitive, end:
|
|
162
|
-
|
|
157
|
+
function tt(e, t, n = !1) {
|
|
158
|
+
let { routesMeta: r } = e, i = {}, a = "/", l = [];
|
|
159
|
+
for (let s = 0; s < r.length; ++s) {
|
|
160
|
+
let u = r[s], f = s === r.length - 1, d = a === "/" ? t : t.slice(a.length) || "/", c = K(
|
|
161
|
+
{ path: u.relativePath, caseSensitive: u.caseSensitive, end: f },
|
|
162
|
+
d
|
|
163
163
|
), h = u.route;
|
|
164
|
-
if (!
|
|
164
|
+
if (!c && f && n && !r[r.length - 1].route.index && (c = K(
|
|
165
165
|
{
|
|
166
166
|
path: u.relativePath,
|
|
167
167
|
caseSensitive: u.caseSensitive,
|
|
168
168
|
end: !1
|
|
169
169
|
},
|
|
170
|
-
|
|
171
|
-
)), !
|
|
170
|
+
d
|
|
171
|
+
)), !c)
|
|
172
172
|
return null;
|
|
173
|
-
Object.assign(
|
|
173
|
+
Object.assign(i, c.params), l.push({
|
|
174
174
|
// TODO: Can this as be avoided?
|
|
175
|
-
params:
|
|
176
|
-
pathname:
|
|
177
|
-
pathnameBase:
|
|
178
|
-
|
|
175
|
+
params: i,
|
|
176
|
+
pathname: D([a, c.pathname]),
|
|
177
|
+
pathnameBase: lt(
|
|
178
|
+
D([a, c.pathnameBase])
|
|
179
179
|
),
|
|
180
180
|
route: h
|
|
181
|
-
}),
|
|
181
|
+
}), c.pathnameBase !== "/" && (a = D([a, c.pathnameBase]));
|
|
182
182
|
}
|
|
183
183
|
return l;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function K(e, t) {
|
|
186
186
|
typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
|
|
187
|
-
let [n,
|
|
187
|
+
let [n, r] = nt(
|
|
188
188
|
e.path,
|
|
189
189
|
e.caseSensitive,
|
|
190
190
|
e.end
|
|
191
|
-
),
|
|
192
|
-
if (!
|
|
193
|
-
let
|
|
191
|
+
), i = t.match(n);
|
|
192
|
+
if (!i) return null;
|
|
193
|
+
let a = i[0], l = a.replace(/(.)\/+$/, "$1"), s = i.slice(1);
|
|
194
194
|
return {
|
|
195
|
-
params:
|
|
196
|
-
(
|
|
197
|
-
if (
|
|
198
|
-
let
|
|
199
|
-
l =
|
|
195
|
+
params: r.reduce(
|
|
196
|
+
(f, { paramName: d, isOptional: c }, h) => {
|
|
197
|
+
if (d === "*") {
|
|
198
|
+
let y = s[h] || "";
|
|
199
|
+
l = a.slice(0, a.length - y.length).replace(/(.)\/+$/, "$1");
|
|
200
200
|
}
|
|
201
|
-
const
|
|
202
|
-
return
|
|
201
|
+
const m = s[h];
|
|
202
|
+
return c && !m ? f[d] = void 0 : f[d] = (m || "").replace(/%2F/g, "/"), f;
|
|
203
203
|
},
|
|
204
204
|
{}
|
|
205
205
|
),
|
|
206
|
-
pathname:
|
|
206
|
+
pathname: a,
|
|
207
207
|
pathnameBase: l,
|
|
208
208
|
pattern: e
|
|
209
209
|
};
|
|
210
210
|
}
|
|
211
|
-
function
|
|
212
|
-
|
|
211
|
+
function nt(e, t = !1, n = !0) {
|
|
212
|
+
T(
|
|
213
213
|
e === "*" || !e.endsWith("*") || e.endsWith("/*"),
|
|
214
214
|
`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(/\*$/, "/*")}".`
|
|
215
215
|
);
|
|
216
|
-
let
|
|
216
|
+
let r = [], i = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
|
|
217
217
|
/\/:([\w-]+)(\?)?/g,
|
|
218
|
-
(l,
|
|
218
|
+
(l, s, u) => (r.push({ paramName: s, isOptional: u != null }), u ? "/?([^\\/]+)?" : "/([^\\/]+)")
|
|
219
219
|
).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
|
|
220
|
-
return e.endsWith("*") ? (
|
|
220
|
+
return e.endsWith("*") ? (r.push({ paramName: "*" }), i += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? i += "\\/*$" : e !== "" && e !== "/" && (i += "(?:(?=\\/|$))"), [new RegExp(i, t ? void 0 : "i"), r];
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function rt(e) {
|
|
223
223
|
try {
|
|
224
224
|
return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
|
|
225
225
|
} catch (t) {
|
|
226
|
-
return
|
|
226
|
+
return T(
|
|
227
227
|
!1,
|
|
228
228
|
`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}).`
|
|
229
229
|
), e;
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function M(e, t) {
|
|
233
233
|
if (t === "/") return e;
|
|
234
234
|
if (!e.toLowerCase().startsWith(t.toLowerCase()))
|
|
235
235
|
return null;
|
|
236
|
-
let n = t.endsWith("/") ? t.length - 1 : t.length,
|
|
237
|
-
return
|
|
236
|
+
let n = t.endsWith("/") ? t.length - 1 : t.length, r = e.charAt(n);
|
|
237
|
+
return r && r !== "/" ? null : e.slice(n) || "/";
|
|
238
238
|
}
|
|
239
|
-
|
|
239
|
+
var at = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
240
|
+
function it(e, t = "/") {
|
|
240
241
|
let {
|
|
241
242
|
pathname: n,
|
|
242
|
-
search:
|
|
243
|
-
hash:
|
|
244
|
-
} = typeof e == "string" ?
|
|
245
|
-
return {
|
|
246
|
-
pathname:
|
|
247
|
-
search:
|
|
248
|
-
hash:
|
|
243
|
+
search: r = "",
|
|
244
|
+
hash: i = ""
|
|
245
|
+
} = typeof e == "string" ? G(e) : e, a;
|
|
246
|
+
return n ? (n = n.replace(/\/\/+/g, "/"), n.startsWith("/") ? a = ce(n.substring(1), "/") : a = ce(n, t)) : a = t, {
|
|
247
|
+
pathname: a,
|
|
248
|
+
search: st(r),
|
|
249
|
+
hash: ut(i)
|
|
249
250
|
};
|
|
250
251
|
}
|
|
251
|
-
function
|
|
252
|
+
function ce(e, t) {
|
|
252
253
|
let n = t.replace(/\/+$/, "").split("/");
|
|
253
|
-
return e.split("/").forEach((
|
|
254
|
-
|
|
254
|
+
return e.split("/").forEach((i) => {
|
|
255
|
+
i === ".." ? n.length > 1 && n.pop() : i !== "." && n.push(i);
|
|
255
256
|
}), n.length > 1 ? n.join("/") : "/";
|
|
256
257
|
}
|
|
257
|
-
function
|
|
258
|
+
function Q(e, t, n, r) {
|
|
258
259
|
return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(
|
|
259
|
-
|
|
260
|
+
r
|
|
260
261
|
)}]. 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.`;
|
|
261
262
|
}
|
|
262
|
-
function
|
|
263
|
+
function ot(e) {
|
|
263
264
|
return e.filter(
|
|
264
265
|
(t, n) => n === 0 || t.route.path && t.route.path.length > 0
|
|
265
266
|
);
|
|
266
267
|
}
|
|
267
|
-
function
|
|
268
|
-
let t =
|
|
268
|
+
function we(e) {
|
|
269
|
+
let t = ot(e);
|
|
269
270
|
return t.map(
|
|
270
|
-
(n,
|
|
271
|
+
(n, r) => r === t.length - 1 ? n.pathname : n.pathnameBase
|
|
271
272
|
);
|
|
272
273
|
}
|
|
273
|
-
function
|
|
274
|
-
let
|
|
275
|
-
typeof e == "string" ?
|
|
276
|
-
!
|
|
277
|
-
|
|
278
|
-
),
|
|
279
|
-
!
|
|
280
|
-
|
|
281
|
-
),
|
|
282
|
-
!
|
|
283
|
-
|
|
274
|
+
function Ee(e, t, n, r = !1) {
|
|
275
|
+
let i;
|
|
276
|
+
typeof e == "string" ? i = G(e) : (i = { ...e }, C(
|
|
277
|
+
!i.pathname || !i.pathname.includes("?"),
|
|
278
|
+
Q("?", "pathname", "search", i)
|
|
279
|
+
), C(
|
|
280
|
+
!i.pathname || !i.pathname.includes("#"),
|
|
281
|
+
Q("#", "pathname", "hash", i)
|
|
282
|
+
), C(
|
|
283
|
+
!i.search || !i.search.includes("#"),
|
|
284
|
+
Q("#", "search", "hash", i)
|
|
284
285
|
));
|
|
285
|
-
let
|
|
286
|
+
let a = e === "" || i.pathname === "", l = a ? "/" : i.pathname, s;
|
|
286
287
|
if (l == null)
|
|
287
|
-
|
|
288
|
+
s = n;
|
|
288
289
|
else {
|
|
289
|
-
let
|
|
290
|
-
if (!
|
|
290
|
+
let c = t.length - 1;
|
|
291
|
+
if (!r && l.startsWith("..")) {
|
|
291
292
|
let h = l.split("/");
|
|
292
293
|
for (; h[0] === ".."; )
|
|
293
|
-
h.shift(),
|
|
294
|
-
|
|
294
|
+
h.shift(), c -= 1;
|
|
295
|
+
i.pathname = h.join("/");
|
|
295
296
|
}
|
|
296
|
-
|
|
297
|
+
s = c >= 0 ? t[c] : "/";
|
|
297
298
|
}
|
|
298
|
-
let u =
|
|
299
|
-
return !u.pathname.endsWith("/") && (
|
|
299
|
+
let u = it(i, s), f = l && l !== "/" && l.endsWith("/"), d = (a || l === ".") && n.endsWith("/");
|
|
300
|
+
return !u.pathname.endsWith("/") && (f || d) && (u.pathname += "/"), u;
|
|
300
301
|
}
|
|
301
|
-
var
|
|
302
|
-
|
|
302
|
+
var D = (e) => e.join("/").replace(/\/\/+/g, "/"), lt = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), st = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, ut = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, ct = class {
|
|
303
|
+
constructor(e, t, n, r = !1) {
|
|
304
|
+
this.status = e, this.statusText = t || "", this.internal = r, n instanceof Error ? (this.data = n.toString(), this.error = n) : this.data = n;
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
function ft(e) {
|
|
303
308
|
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
|
|
304
309
|
}
|
|
305
|
-
|
|
310
|
+
function xe(e) {
|
|
311
|
+
return e.map((t) => t.route.path).filter(Boolean).join("/").replace(/\/\/*/g, "/") || "/";
|
|
312
|
+
}
|
|
313
|
+
var Ce = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
314
|
+
function be(e, t) {
|
|
315
|
+
let n = e;
|
|
316
|
+
if (typeof n != "string" || !at.test(n))
|
|
317
|
+
return {
|
|
318
|
+
absoluteURL: void 0,
|
|
319
|
+
isExternal: !1,
|
|
320
|
+
to: n
|
|
321
|
+
};
|
|
322
|
+
let r = n, i = !1;
|
|
323
|
+
if (Ce)
|
|
324
|
+
try {
|
|
325
|
+
let a = new URL(window.location.href), l = n.startsWith("//") ? new URL(a.protocol + n) : new URL(n), s = M(l.pathname, t);
|
|
326
|
+
l.origin === a.origin && s != null ? n = s + l.search + l.hash : i = !0;
|
|
327
|
+
} catch {
|
|
328
|
+
T(
|
|
329
|
+
!1,
|
|
330
|
+
`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
return {
|
|
334
|
+
absoluteURL: r,
|
|
335
|
+
isExternal: i,
|
|
336
|
+
to: n
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
340
|
+
var Pe = [
|
|
306
341
|
"POST",
|
|
307
342
|
"PUT",
|
|
308
343
|
"PATCH",
|
|
309
344
|
"DELETE"
|
|
310
345
|
];
|
|
311
346
|
new Set(
|
|
312
|
-
|
|
347
|
+
Pe
|
|
313
348
|
);
|
|
314
|
-
var
|
|
349
|
+
var dt = [
|
|
315
350
|
"GET",
|
|
316
|
-
...
|
|
351
|
+
...Pe
|
|
317
352
|
];
|
|
318
|
-
new Set(
|
|
319
|
-
var
|
|
320
|
-
|
|
321
|
-
var B =
|
|
353
|
+
new Set(dt);
|
|
354
|
+
var F = o.createContext(null);
|
|
355
|
+
F.displayName = "DataRouter";
|
|
356
|
+
var B = o.createContext(null);
|
|
322
357
|
B.displayName = "DataRouterState";
|
|
323
|
-
|
|
324
|
-
|
|
358
|
+
var Le = o.createContext(!1);
|
|
359
|
+
function ht() {
|
|
360
|
+
return o.useContext(Le);
|
|
361
|
+
}
|
|
362
|
+
var ne = o.createContext({
|
|
325
363
|
isTransitioning: !1
|
|
326
364
|
});
|
|
327
|
-
|
|
328
|
-
var
|
|
365
|
+
ne.displayName = "ViewTransition";
|
|
366
|
+
var Se = o.createContext(
|
|
329
367
|
/* @__PURE__ */ new Map()
|
|
330
368
|
);
|
|
331
|
-
|
|
332
|
-
var
|
|
333
|
-
|
|
334
|
-
var
|
|
369
|
+
Se.displayName = "Fetchers";
|
|
370
|
+
var mt = o.createContext(null);
|
|
371
|
+
mt.displayName = "Await";
|
|
372
|
+
var S = o.createContext(
|
|
335
373
|
null
|
|
336
374
|
);
|
|
337
|
-
|
|
338
|
-
var
|
|
375
|
+
S.displayName = "Navigation";
|
|
376
|
+
var q = o.createContext(
|
|
339
377
|
null
|
|
340
378
|
);
|
|
341
|
-
|
|
342
|
-
var
|
|
379
|
+
q.displayName = "Location";
|
|
380
|
+
var N = o.createContext({
|
|
343
381
|
outlet: null,
|
|
344
382
|
matches: [],
|
|
345
383
|
isDataRoute: !1
|
|
346
384
|
});
|
|
347
|
-
|
|
348
|
-
var
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
385
|
+
N.displayName = "Route";
|
|
386
|
+
var re = o.createContext(null);
|
|
387
|
+
re.displayName = "RouteError";
|
|
388
|
+
var $e = "REACT_ROUTER_ERROR", pt = "REDIRECT", vt = "ROUTE_ERROR_RESPONSE";
|
|
389
|
+
function gt(e) {
|
|
390
|
+
if (e.startsWith(`${$e}:${pt}:{`))
|
|
391
|
+
try {
|
|
392
|
+
let t = JSON.parse(e.slice(28));
|
|
393
|
+
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string" && typeof t.location == "string" && typeof t.reloadDocument == "boolean" && typeof t.replace == "boolean")
|
|
394
|
+
return t;
|
|
395
|
+
} catch {
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
function yt(e) {
|
|
399
|
+
if (e.startsWith(
|
|
400
|
+
`${$e}:${vt}:{`
|
|
401
|
+
))
|
|
402
|
+
try {
|
|
403
|
+
let t = JSON.parse(e.slice(40));
|
|
404
|
+
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string")
|
|
405
|
+
return new ct(
|
|
406
|
+
t.status,
|
|
407
|
+
t.statusText,
|
|
408
|
+
t.data
|
|
409
|
+
);
|
|
410
|
+
} catch {
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
function Rt(e, { relative: t } = {}) {
|
|
414
|
+
C(
|
|
415
|
+
H(),
|
|
353
416
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
354
417
|
// router loaded. We can help them understand how to avoid that.
|
|
355
418
|
"useHref() may be used only in the context of a <Router> component."
|
|
356
419
|
);
|
|
357
|
-
let { basename: n, navigator:
|
|
358
|
-
return n !== "/" && (
|
|
420
|
+
let { basename: n, navigator: r } = o.useContext(S), { hash: i, pathname: a, search: l } = j(e, { relative: t }), s = a;
|
|
421
|
+
return n !== "/" && (s = a === "/" ? n : D([n, a])), r.createHref({ pathname: s, search: l, hash: i });
|
|
359
422
|
}
|
|
360
|
-
function
|
|
361
|
-
return
|
|
423
|
+
function H() {
|
|
424
|
+
return o.useContext(q) != null;
|
|
362
425
|
}
|
|
363
|
-
function
|
|
364
|
-
return
|
|
365
|
-
|
|
426
|
+
function _() {
|
|
427
|
+
return C(
|
|
428
|
+
H(),
|
|
366
429
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
367
430
|
// router loaded. We can help them understand how to avoid that.
|
|
368
431
|
"useLocation() may be used only in the context of a <Router> component."
|
|
369
|
-
),
|
|
432
|
+
), o.useContext(q).location;
|
|
370
433
|
}
|
|
371
|
-
var
|
|
372
|
-
function
|
|
373
|
-
|
|
434
|
+
var ke = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
435
|
+
function Te(e) {
|
|
436
|
+
o.useContext(S).static || o.useLayoutEffect(e);
|
|
374
437
|
}
|
|
375
|
-
function
|
|
376
|
-
let { isDataRoute: e } =
|
|
377
|
-
return e ?
|
|
438
|
+
function wt() {
|
|
439
|
+
let { isDataRoute: e } = o.useContext(N);
|
|
440
|
+
return e ? Mt() : Et();
|
|
378
441
|
}
|
|
379
|
-
function
|
|
380
|
-
|
|
381
|
-
|
|
442
|
+
function Et() {
|
|
443
|
+
C(
|
|
444
|
+
H(),
|
|
382
445
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
383
446
|
// router loaded. We can help them understand how to avoid that.
|
|
384
447
|
"useNavigate() may be used only in the context of a <Router> component."
|
|
385
448
|
);
|
|
386
|
-
let e =
|
|
387
|
-
return
|
|
449
|
+
let e = o.useContext(F), { basename: t, navigator: n } = o.useContext(S), { matches: r } = o.useContext(N), { pathname: i } = _(), a = JSON.stringify(we(r)), l = o.useRef(!1);
|
|
450
|
+
return Te(() => {
|
|
388
451
|
l.current = !0;
|
|
389
|
-
}),
|
|
390
|
-
(u,
|
|
391
|
-
if (
|
|
452
|
+
}), o.useCallback(
|
|
453
|
+
(u, f = {}) => {
|
|
454
|
+
if (T(l.current, ke), !l.current) return;
|
|
392
455
|
if (typeof u == "number") {
|
|
393
456
|
n.go(u);
|
|
394
457
|
return;
|
|
395
458
|
}
|
|
396
|
-
let
|
|
459
|
+
let d = Ee(
|
|
397
460
|
u,
|
|
398
|
-
JSON.parse(
|
|
399
|
-
|
|
400
|
-
|
|
461
|
+
JSON.parse(a),
|
|
462
|
+
i,
|
|
463
|
+
f.relative === "path"
|
|
401
464
|
);
|
|
402
|
-
e == null && t !== "/" && (
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
465
|
+
e == null && t !== "/" && (d.pathname = d.pathname === "/" ? t : D([t, d.pathname])), (f.replace ? n.replace : n.push)(
|
|
466
|
+
d,
|
|
467
|
+
f.state,
|
|
468
|
+
f
|
|
406
469
|
);
|
|
407
470
|
},
|
|
408
471
|
[
|
|
409
472
|
t,
|
|
410
473
|
n,
|
|
411
|
-
|
|
412
|
-
|
|
474
|
+
a,
|
|
475
|
+
i,
|
|
413
476
|
e
|
|
414
477
|
]
|
|
415
478
|
);
|
|
416
479
|
}
|
|
417
|
-
|
|
418
|
-
function
|
|
419
|
-
let { matches: n } =
|
|
420
|
-
return
|
|
421
|
-
() =>
|
|
480
|
+
o.createContext(null);
|
|
481
|
+
function j(e, { relative: t } = {}) {
|
|
482
|
+
let { matches: n } = o.useContext(N), { pathname: r } = _(), i = JSON.stringify(we(n));
|
|
483
|
+
return o.useMemo(
|
|
484
|
+
() => Ee(
|
|
422
485
|
e,
|
|
423
|
-
JSON.parse(
|
|
424
|
-
|
|
486
|
+
JSON.parse(i),
|
|
487
|
+
r,
|
|
425
488
|
t === "path"
|
|
426
489
|
),
|
|
427
|
-
[e,
|
|
490
|
+
[e, i, r, t]
|
|
428
491
|
);
|
|
429
492
|
}
|
|
430
|
-
function
|
|
431
|
-
|
|
432
|
-
|
|
493
|
+
function xt(e, t, n, r, i) {
|
|
494
|
+
C(
|
|
495
|
+
H(),
|
|
433
496
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
434
497
|
// router loaded. We can help them understand how to avoid that.
|
|
435
498
|
"useRoutes() may be used only in the context of a <Router> component."
|
|
436
499
|
);
|
|
437
|
-
let { navigator:
|
|
500
|
+
let { navigator: a } = o.useContext(S), { matches: l } = o.useContext(N), s = l[l.length - 1], u = s ? s.params : {}, f = s ? s.pathname : "/", d = s ? s.pathnameBase : "/", c = s && s.route;
|
|
438
501
|
{
|
|
439
|
-
let
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
!
|
|
443
|
-
`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${
|
|
502
|
+
let p = c && c.path || "";
|
|
503
|
+
De(
|
|
504
|
+
f,
|
|
505
|
+
!c || p.endsWith("*") || p.endsWith("*?"),
|
|
506
|
+
`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${p}">) 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.
|
|
444
507
|
|
|
445
|
-
Please change the parent <Route path="${
|
|
508
|
+
Please change the parent <Route path="${p}"> to <Route path="${p === "/" ? "*" : `${p}/*`}">.`
|
|
446
509
|
);
|
|
447
510
|
}
|
|
448
|
-
let
|
|
449
|
-
|
|
450
|
-
let y =
|
|
451
|
-
if (
|
|
452
|
-
let
|
|
453
|
-
|
|
511
|
+
let h = _(), m;
|
|
512
|
+
m = h;
|
|
513
|
+
let y = m.pathname || "/", v = y;
|
|
514
|
+
if (d !== "/") {
|
|
515
|
+
let p = d.replace(/^\//, "").split("/");
|
|
516
|
+
v = "/" + y.replace(/^\//, "").split("/").slice(p.length).join("/");
|
|
454
517
|
}
|
|
455
|
-
let g =
|
|
456
|
-
return
|
|
457
|
-
|
|
458
|
-
`No routes matched location "${
|
|
459
|
-
),
|
|
518
|
+
let g = ge(e, { pathname: v });
|
|
519
|
+
return T(
|
|
520
|
+
c || g != null,
|
|
521
|
+
`No routes matched location "${m.pathname}${m.search}${m.hash}" `
|
|
522
|
+
), T(
|
|
460
523
|
g == null || g[g.length - 1].route.element !== void 0 || g[g.length - 1].route.Component !== void 0 || g[g.length - 1].route.lazy !== void 0,
|
|
461
|
-
`Matched leaf route at location "${
|
|
462
|
-
),
|
|
524
|
+
`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.`
|
|
525
|
+
), St(
|
|
463
526
|
g && g.map(
|
|
464
|
-
(
|
|
465
|
-
params: Object.assign({},
|
|
466
|
-
pathname:
|
|
467
|
-
|
|
468
|
-
// Re-encode pathnames that were decoded inside matchRoutes
|
|
469
|
-
|
|
527
|
+
(p) => Object.assign({}, p, {
|
|
528
|
+
params: Object.assign({}, u, p.params),
|
|
529
|
+
pathname: D([
|
|
530
|
+
d,
|
|
531
|
+
// Re-encode pathnames that were decoded inside matchRoutes.
|
|
532
|
+
// Pre-encode `?` and `#` ahead of `encodeLocation` because it uses
|
|
533
|
+
// `new URL()` internally and we need to prevent it from treating
|
|
534
|
+
// them as separators
|
|
535
|
+
a.encodeLocation ? a.encodeLocation(
|
|
536
|
+
p.pathname.replace(/\?/g, "%3F").replace(/#/g, "%23")
|
|
537
|
+
).pathname : p.pathname
|
|
470
538
|
]),
|
|
471
|
-
pathnameBase:
|
|
472
|
-
|
|
539
|
+
pathnameBase: p.pathnameBase === "/" ? d : D([
|
|
540
|
+
d,
|
|
473
541
|
// Re-encode pathnames that were decoded inside matchRoutes
|
|
474
|
-
|
|
542
|
+
// Pre-encode `?` and `#` ahead of `encodeLocation` because it uses
|
|
543
|
+
// `new URL()` internally and we need to prevent it from treating
|
|
544
|
+
// them as separators
|
|
545
|
+
a.encodeLocation ? a.encodeLocation(
|
|
546
|
+
p.pathnameBase.replace(/\?/g, "%3F").replace(/#/g, "%23")
|
|
547
|
+
).pathname : p.pathnameBase
|
|
475
548
|
])
|
|
476
549
|
})
|
|
477
550
|
),
|
|
478
|
-
|
|
551
|
+
l,
|
|
479
552
|
n,
|
|
480
|
-
|
|
553
|
+
r,
|
|
554
|
+
i
|
|
481
555
|
);
|
|
482
556
|
}
|
|
483
|
-
function
|
|
484
|
-
let e =
|
|
557
|
+
function Ct() {
|
|
558
|
+
let e = Dt(), t = ft(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null, r = "rgba(200,200,200, 0.5)", i = { padding: "0.5rem", backgroundColor: r }, a = { padding: "2px 4px", backgroundColor: r }, l = null;
|
|
485
559
|
return console.error(
|
|
486
560
|
"Error handled by React Router default ErrorBoundary:",
|
|
487
561
|
e
|
|
488
|
-
), l = /* @__PURE__ */
|
|
562
|
+
), l = /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ o.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ o.createElement("code", { style: a }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ o.createElement("code", { style: a }, "errorElement"), " prop on your route.")), /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ o.createElement("h3", { style: { fontStyle: "italic" } }, t), n ? /* @__PURE__ */ o.createElement("pre", { style: i }, n) : null, l);
|
|
489
563
|
}
|
|
490
|
-
var
|
|
564
|
+
var bt = /* @__PURE__ */ o.createElement(Ct, null), Oe = class extends o.Component {
|
|
491
565
|
constructor(e) {
|
|
492
566
|
super(e), this.state = {
|
|
493
567
|
location: e.location,
|
|
@@ -510,27 +584,67 @@ var ot = /* @__PURE__ */ i.createElement(at, null), it = class extends i.Compone
|
|
|
510
584
|
};
|
|
511
585
|
}
|
|
512
586
|
componentDidCatch(e, t) {
|
|
513
|
-
console.error(
|
|
587
|
+
this.props.onError ? this.props.onError(e, t) : console.error(
|
|
514
588
|
"React Router caught the following error during render",
|
|
515
|
-
e
|
|
516
|
-
t
|
|
589
|
+
e
|
|
517
590
|
);
|
|
518
591
|
}
|
|
519
592
|
render() {
|
|
520
|
-
|
|
521
|
-
|
|
593
|
+
let e = this.state.error;
|
|
594
|
+
if (this.context && typeof e == "object" && e && "digest" in e && typeof e.digest == "string") {
|
|
595
|
+
const n = yt(e.digest);
|
|
596
|
+
n && (e = n);
|
|
597
|
+
}
|
|
598
|
+
let t = e !== void 0 ? /* @__PURE__ */ o.createElement(N.Provider, { value: this.props.routeContext }, /* @__PURE__ */ o.createElement(
|
|
599
|
+
re.Provider,
|
|
522
600
|
{
|
|
523
|
-
value:
|
|
601
|
+
value: e,
|
|
524
602
|
children: this.props.component
|
|
525
603
|
}
|
|
526
604
|
)) : this.props.children;
|
|
605
|
+
return this.context ? /* @__PURE__ */ o.createElement(Pt, { error: e }, t) : t;
|
|
527
606
|
}
|
|
528
607
|
};
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
608
|
+
Oe.contextType = Le;
|
|
609
|
+
var Z = /* @__PURE__ */ new WeakMap();
|
|
610
|
+
function Pt({
|
|
611
|
+
children: e,
|
|
612
|
+
error: t
|
|
613
|
+
}) {
|
|
614
|
+
let { basename: n } = o.useContext(S);
|
|
615
|
+
if (typeof t == "object" && t && "digest" in t && typeof t.digest == "string") {
|
|
616
|
+
let r = gt(t.digest);
|
|
617
|
+
if (r) {
|
|
618
|
+
let i = Z.get(t);
|
|
619
|
+
if (i) throw i;
|
|
620
|
+
let a = be(r.location, n);
|
|
621
|
+
if (Ce && !Z.get(t))
|
|
622
|
+
if (a.isExternal || r.reloadDocument)
|
|
623
|
+
window.location.href = a.absoluteURL || a.to;
|
|
624
|
+
else {
|
|
625
|
+
const l = Promise.resolve().then(
|
|
626
|
+
() => window.__reactRouterDataRouter.navigate(a.to, {
|
|
627
|
+
replace: r.replace
|
|
628
|
+
})
|
|
629
|
+
);
|
|
630
|
+
throw Z.set(t, l), l;
|
|
631
|
+
}
|
|
632
|
+
return /* @__PURE__ */ o.createElement(
|
|
633
|
+
"meta",
|
|
634
|
+
{
|
|
635
|
+
httpEquiv: "refresh",
|
|
636
|
+
content: `0;url=${a.absoluteURL || a.to}`
|
|
637
|
+
}
|
|
638
|
+
);
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
return e;
|
|
642
|
+
}
|
|
643
|
+
function Lt({ routeContext: e, match: t, children: n }) {
|
|
644
|
+
let r = o.useContext(F);
|
|
645
|
+
return r && r.static && r.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (r.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ o.createElement(N.Provider, { value: e }, n);
|
|
532
646
|
}
|
|
533
|
-
function
|
|
647
|
+
function St(e, t = [], n = null, r = null, i = null) {
|
|
534
648
|
if (e == null) {
|
|
535
649
|
if (!n)
|
|
536
650
|
return null;
|
|
@@ -541,136 +655,151 @@ function ut(e, t = [], n = null, a = null) {
|
|
|
541
655
|
else
|
|
542
656
|
return null;
|
|
543
657
|
}
|
|
544
|
-
let
|
|
545
|
-
if (
|
|
546
|
-
let
|
|
547
|
-
(
|
|
658
|
+
let a = e, l = n == null ? void 0 : n.errors;
|
|
659
|
+
if (l != null) {
|
|
660
|
+
let d = a.findIndex(
|
|
661
|
+
(c) => c.route.id && (l == null ? void 0 : l[c.route.id]) !== void 0
|
|
548
662
|
);
|
|
549
|
-
|
|
550
|
-
|
|
663
|
+
C(
|
|
664
|
+
d >= 0,
|
|
551
665
|
`Could not find a matching route for errors on route IDs: ${Object.keys(
|
|
552
|
-
|
|
666
|
+
l
|
|
553
667
|
).join(",")}`
|
|
554
|
-
),
|
|
668
|
+
), a = a.slice(
|
|
555
669
|
0,
|
|
556
|
-
Math.min(
|
|
670
|
+
Math.min(a.length, d + 1)
|
|
557
671
|
);
|
|
558
672
|
}
|
|
559
|
-
let
|
|
673
|
+
let s = !1, u = -1;
|
|
560
674
|
if (n)
|
|
561
|
-
for (let
|
|
562
|
-
let
|
|
563
|
-
if ((
|
|
564
|
-
let { loaderData:
|
|
565
|
-
if (
|
|
566
|
-
|
|
675
|
+
for (let d = 0; d < a.length; d++) {
|
|
676
|
+
let c = a[d];
|
|
677
|
+
if ((c.route.HydrateFallback || c.route.hydrateFallbackElement) && (u = d), c.route.id) {
|
|
678
|
+
let { loaderData: h, errors: m } = n, y = c.route.loader && !h.hasOwnProperty(c.route.id) && (!m || m[c.route.id] === void 0);
|
|
679
|
+
if (c.route.lazy || y) {
|
|
680
|
+
s = !0, u >= 0 ? a = a.slice(0, u + 1) : a = [a[0]];
|
|
567
681
|
break;
|
|
568
682
|
}
|
|
569
683
|
}
|
|
570
684
|
}
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
685
|
+
let f = n && r ? (d, c) => {
|
|
686
|
+
var h, m;
|
|
687
|
+
r(d, {
|
|
688
|
+
location: n.location,
|
|
689
|
+
params: ((m = (h = n.matches) == null ? void 0 : h[0]) == null ? void 0 : m.params) ?? {},
|
|
690
|
+
unstable_pattern: xe(n.matches),
|
|
691
|
+
errorInfo: c
|
|
692
|
+
});
|
|
693
|
+
} : void 0;
|
|
694
|
+
return a.reduceRight(
|
|
695
|
+
(d, c, h) => {
|
|
696
|
+
let m, y = !1, v = null, g = null;
|
|
697
|
+
n && (m = l && c.route.id ? l[c.route.id] : void 0, v = c.route.errorElement || bt, s && (u < 0 && h === 0 ? (De(
|
|
575
698
|
"route-fallback",
|
|
576
699
|
!1,
|
|
577
700
|
"No `HydrateFallback` element provided to render during initial hydration"
|
|
578
|
-
),
|
|
579
|
-
let
|
|
580
|
-
let
|
|
581
|
-
return
|
|
582
|
-
|
|
701
|
+
), y = !0, g = null) : u === h && (y = !0, g = c.route.hydrateFallbackElement || null)));
|
|
702
|
+
let R = t.concat(a.slice(0, h + 1)), p = () => {
|
|
703
|
+
let w;
|
|
704
|
+
return m ? w = v : y ? w = g : c.route.Component ? w = /* @__PURE__ */ o.createElement(c.route.Component, null) : c.route.element ? w = c.route.element : w = d, /* @__PURE__ */ o.createElement(
|
|
705
|
+
Lt,
|
|
583
706
|
{
|
|
584
|
-
match:
|
|
707
|
+
match: c,
|
|
585
708
|
routeContext: {
|
|
586
|
-
outlet:
|
|
587
|
-
matches:
|
|
709
|
+
outlet: d,
|
|
710
|
+
matches: R,
|
|
588
711
|
isDataRoute: n != null
|
|
589
712
|
},
|
|
590
|
-
children:
|
|
713
|
+
children: w
|
|
591
714
|
}
|
|
592
715
|
);
|
|
593
716
|
};
|
|
594
|
-
return n && (
|
|
595
|
-
|
|
717
|
+
return n && (c.route.ErrorBoundary || c.route.errorElement || h === 0) ? /* @__PURE__ */ o.createElement(
|
|
718
|
+
Oe,
|
|
596
719
|
{
|
|
597
720
|
location: n.location,
|
|
598
721
|
revalidation: n.revalidation,
|
|
599
|
-
component:
|
|
600
|
-
error:
|
|
601
|
-
children:
|
|
602
|
-
routeContext: { outlet: null, matches:
|
|
722
|
+
component: v,
|
|
723
|
+
error: m,
|
|
724
|
+
children: p(),
|
|
725
|
+
routeContext: { outlet: null, matches: R, isDataRoute: !0 },
|
|
726
|
+
onError: f
|
|
603
727
|
}
|
|
604
|
-
) :
|
|
728
|
+
) : p();
|
|
605
729
|
},
|
|
606
730
|
null
|
|
607
731
|
);
|
|
608
732
|
}
|
|
609
|
-
function
|
|
733
|
+
function ae(e) {
|
|
610
734
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
611
735
|
}
|
|
612
|
-
function
|
|
613
|
-
let t =
|
|
614
|
-
return
|
|
736
|
+
function $t(e) {
|
|
737
|
+
let t = o.useContext(F);
|
|
738
|
+
return C(t, ae(e)), t;
|
|
615
739
|
}
|
|
616
|
-
function
|
|
617
|
-
let t =
|
|
618
|
-
return
|
|
740
|
+
function kt(e) {
|
|
741
|
+
let t = o.useContext(B);
|
|
742
|
+
return C(t, ae(e)), t;
|
|
619
743
|
}
|
|
620
|
-
function
|
|
621
|
-
let t =
|
|
622
|
-
return
|
|
744
|
+
function Tt(e) {
|
|
745
|
+
let t = o.useContext(N);
|
|
746
|
+
return C(t, ae(e)), t;
|
|
623
747
|
}
|
|
624
|
-
function
|
|
625
|
-
let t =
|
|
626
|
-
return
|
|
748
|
+
function ie(e) {
|
|
749
|
+
let t = Tt(e), n = t.matches[t.matches.length - 1];
|
|
750
|
+
return C(
|
|
627
751
|
n.route.id,
|
|
628
752
|
`${e} can only be used on routes that contain a unique "id"`
|
|
629
753
|
), n.route.id;
|
|
630
754
|
}
|
|
631
|
-
function
|
|
632
|
-
return
|
|
755
|
+
function Ot() {
|
|
756
|
+
return ie(
|
|
633
757
|
"useRouteId"
|
|
634
758
|
/* UseRouteId */
|
|
635
759
|
);
|
|
636
760
|
}
|
|
637
|
-
function
|
|
638
|
-
var
|
|
639
|
-
let e =
|
|
761
|
+
function Dt() {
|
|
762
|
+
var r;
|
|
763
|
+
let e = o.useContext(re), t = kt(
|
|
640
764
|
"useRouteError"
|
|
641
765
|
/* UseRouteError */
|
|
642
|
-
), n =
|
|
766
|
+
), n = ie(
|
|
643
767
|
"useRouteError"
|
|
644
768
|
/* UseRouteError */
|
|
645
769
|
);
|
|
646
|
-
return e !== void 0 ? e : (
|
|
770
|
+
return e !== void 0 ? e : (r = t.errors) == null ? void 0 : r[n];
|
|
647
771
|
}
|
|
648
|
-
function
|
|
649
|
-
let { router: e } =
|
|
772
|
+
function Mt() {
|
|
773
|
+
let { router: e } = $t(
|
|
650
774
|
"useNavigate"
|
|
651
775
|
/* UseNavigateStable */
|
|
652
|
-
), t =
|
|
776
|
+
), t = ie(
|
|
653
777
|
"useNavigate"
|
|
654
778
|
/* UseNavigateStable */
|
|
655
|
-
), n =
|
|
656
|
-
return
|
|
779
|
+
), n = o.useRef(!1);
|
|
780
|
+
return Te(() => {
|
|
657
781
|
n.current = !0;
|
|
658
|
-
}),
|
|
659
|
-
async (
|
|
660
|
-
|
|
782
|
+
}), o.useCallback(
|
|
783
|
+
async (i, a = {}) => {
|
|
784
|
+
T(n.current, ke), n.current && (typeof i == "number" ? await e.navigate(i) : await e.navigate(i, { fromRouteId: t, ...a }));
|
|
661
785
|
},
|
|
662
786
|
[e, t]
|
|
663
787
|
);
|
|
664
788
|
}
|
|
665
|
-
var
|
|
666
|
-
function
|
|
667
|
-
!t && !
|
|
789
|
+
var fe = {};
|
|
790
|
+
function De(e, t, n) {
|
|
791
|
+
!t && !fe[e] && (fe[e] = !0, T(!1, n));
|
|
668
792
|
}
|
|
669
|
-
var
|
|
670
|
-
function
|
|
671
|
-
!e && !
|
|
793
|
+
var de = {};
|
|
794
|
+
function he(e, t) {
|
|
795
|
+
!e && !de[t] && (de[t] = !0, console.warn(t));
|
|
796
|
+
}
|
|
797
|
+
var Nt = "useOptimistic", me = o[Nt], It = () => {
|
|
798
|
+
};
|
|
799
|
+
function Ft(e) {
|
|
800
|
+
return me ? me(e) : [e, It];
|
|
672
801
|
}
|
|
673
|
-
var
|
|
802
|
+
var _t = class {
|
|
674
803
|
constructor() {
|
|
675
804
|
this.status = "pending", this.promise = new Promise((e, t) => {
|
|
676
805
|
this.resolve = (n) => {
|
|
@@ -681,264 +810,314 @@ var pt = class {
|
|
|
681
810
|
});
|
|
682
811
|
}
|
|
683
812
|
};
|
|
684
|
-
function
|
|
813
|
+
function At({
|
|
685
814
|
router: e,
|
|
686
|
-
flushSync: t
|
|
815
|
+
flushSync: t,
|
|
816
|
+
onError: n,
|
|
817
|
+
unstable_useTransitions: r
|
|
687
818
|
}) {
|
|
688
|
-
|
|
819
|
+
r = ht() || r;
|
|
820
|
+
let [a, l] = o.useState(e.state), [s, u] = Ft(a), [f, d] = o.useState(), [c, h] = o.useState({
|
|
689
821
|
isTransitioning: !1
|
|
690
|
-
}), [
|
|
691
|
-
(
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
822
|
+
}), [m, y] = o.useState(), [v, g] = o.useState(), [R, p] = o.useState(), w = o.useRef(/* @__PURE__ */ new Map()), $ = o.useCallback(
|
|
823
|
+
(E, { deletedFetchers: P, newErrors: x, flushSync: U, viewTransitionOpts: I }) => {
|
|
824
|
+
x && n && Object.values(x).forEach(
|
|
825
|
+
(k) => {
|
|
826
|
+
var V;
|
|
827
|
+
return n(k, {
|
|
828
|
+
location: E.location,
|
|
829
|
+
params: ((V = E.matches[0]) == null ? void 0 : V.params) ?? {},
|
|
830
|
+
unstable_pattern: xe(E.matches)
|
|
831
|
+
});
|
|
832
|
+
}
|
|
833
|
+
), E.fetchers.forEach((k, V) => {
|
|
834
|
+
k.data !== void 0 && w.current.set(V, k.data);
|
|
835
|
+
}), P.forEach((k) => w.current.delete(k)), he(
|
|
836
|
+
U === !1 || t != null,
|
|
696
837
|
'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.'
|
|
697
838
|
);
|
|
698
|
-
let
|
|
699
|
-
if (
|
|
700
|
-
|
|
839
|
+
let se = e.window != null && e.window.document != null && typeof e.window.document.startViewTransition == "function";
|
|
840
|
+
if (he(
|
|
841
|
+
I == null || se,
|
|
701
842
|
"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."
|
|
702
|
-
), !
|
|
703
|
-
t &&
|
|
843
|
+
), !I || !se) {
|
|
844
|
+
t && U ? t(() => l(E)) : r === !1 ? l(E) : o.startTransition(() => {
|
|
845
|
+
r === !0 && u((k) => pe(k, E)), l(E);
|
|
846
|
+
});
|
|
704
847
|
return;
|
|
705
848
|
}
|
|
706
|
-
if (t &&
|
|
849
|
+
if (t && U) {
|
|
707
850
|
t(() => {
|
|
708
|
-
|
|
851
|
+
v && (m == null || m.resolve(), v.skipTransition()), h({
|
|
709
852
|
isTransitioning: !0,
|
|
710
853
|
flushSync: !0,
|
|
711
|
-
currentLocation:
|
|
712
|
-
nextLocation:
|
|
854
|
+
currentLocation: I.currentLocation,
|
|
855
|
+
nextLocation: I.nextLocation
|
|
713
856
|
});
|
|
714
857
|
});
|
|
715
|
-
let
|
|
716
|
-
t(() =>
|
|
858
|
+
let k = e.window.document.startViewTransition(() => {
|
|
859
|
+
t(() => l(E));
|
|
717
860
|
});
|
|
718
|
-
|
|
861
|
+
k.finished.finally(() => {
|
|
719
862
|
t(() => {
|
|
720
|
-
|
|
863
|
+
y(void 0), g(void 0), d(void 0), h({ isTransitioning: !1 });
|
|
721
864
|
});
|
|
722
|
-
}), t(() =>
|
|
865
|
+
}), t(() => g(k));
|
|
723
866
|
return;
|
|
724
867
|
}
|
|
725
|
-
|
|
726
|
-
state:
|
|
727
|
-
currentLocation:
|
|
728
|
-
nextLocation:
|
|
729
|
-
})) : (
|
|
868
|
+
v ? (m == null || m.resolve(), v.skipTransition(), p({
|
|
869
|
+
state: E,
|
|
870
|
+
currentLocation: I.currentLocation,
|
|
871
|
+
nextLocation: I.nextLocation
|
|
872
|
+
})) : (d(E), h({
|
|
730
873
|
isTransitioning: !0,
|
|
731
874
|
flushSync: !1,
|
|
732
|
-
currentLocation:
|
|
733
|
-
nextLocation:
|
|
875
|
+
currentLocation: I.currentLocation,
|
|
876
|
+
nextLocation: I.nextLocation
|
|
734
877
|
}));
|
|
735
878
|
},
|
|
736
|
-
[
|
|
879
|
+
[
|
|
880
|
+
e.window,
|
|
881
|
+
t,
|
|
882
|
+
v,
|
|
883
|
+
m,
|
|
884
|
+
r,
|
|
885
|
+
u,
|
|
886
|
+
n
|
|
887
|
+
]
|
|
737
888
|
);
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
}, [
|
|
741
|
-
if (
|
|
742
|
-
let
|
|
743
|
-
|
|
889
|
+
o.useLayoutEffect(() => e.subscribe($), [e, $]), o.useEffect(() => {
|
|
890
|
+
c.isTransitioning && !c.flushSync && y(new _t());
|
|
891
|
+
}, [c]), o.useEffect(() => {
|
|
892
|
+
if (m && f && e.window) {
|
|
893
|
+
let E = f, P = m.promise, x = e.window.document.startViewTransition(async () => {
|
|
894
|
+
r === !1 ? l(E) : o.startTransition(() => {
|
|
895
|
+
r === !0 && u((U) => pe(U, E)), l(E);
|
|
896
|
+
}), await P;
|
|
744
897
|
});
|
|
745
898
|
x.finished.finally(() => {
|
|
746
|
-
|
|
747
|
-
}),
|
|
899
|
+
y(void 0), g(void 0), d(void 0), h({ isTransitioning: !1 });
|
|
900
|
+
}), g(x);
|
|
748
901
|
}
|
|
749
|
-
}, [
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
902
|
+
}, [
|
|
903
|
+
f,
|
|
904
|
+
m,
|
|
905
|
+
e.window,
|
|
906
|
+
r,
|
|
907
|
+
u
|
|
908
|
+
]), o.useEffect(() => {
|
|
909
|
+
m && f && s.location.key === f.location.key && m.resolve();
|
|
910
|
+
}, [m, v, s.location, f]), o.useEffect(() => {
|
|
911
|
+
!c.isTransitioning && R && (d(R.state), h({
|
|
753
912
|
isTransitioning: !0,
|
|
754
913
|
flushSync: !1,
|
|
755
|
-
currentLocation:
|
|
756
|
-
nextLocation:
|
|
757
|
-
}),
|
|
758
|
-
}, [
|
|
759
|
-
let
|
|
914
|
+
currentLocation: R.currentLocation,
|
|
915
|
+
nextLocation: R.nextLocation
|
|
916
|
+
}), p(void 0));
|
|
917
|
+
}, [c.isTransitioning, R]);
|
|
918
|
+
let b = o.useMemo(() => ({
|
|
760
919
|
createHref: e.createHref,
|
|
761
920
|
encodeLocation: e.encodeLocation,
|
|
762
|
-
go: (
|
|
763
|
-
push: (
|
|
764
|
-
state:
|
|
921
|
+
go: (E) => e.navigate(E),
|
|
922
|
+
push: (E, P, x) => e.navigate(E, {
|
|
923
|
+
state: P,
|
|
765
924
|
preventScrollReset: x == null ? void 0 : x.preventScrollReset
|
|
766
925
|
}),
|
|
767
|
-
replace: (
|
|
926
|
+
replace: (E, P, x) => e.navigate(E, {
|
|
768
927
|
replace: !0,
|
|
769
|
-
state:
|
|
928
|
+
state: P,
|
|
770
929
|
preventScrollReset: x == null ? void 0 : x.preventScrollReset
|
|
771
930
|
})
|
|
772
|
-
}), [e]),
|
|
931
|
+
}), [e]), L = e.basename || "/", O = o.useMemo(
|
|
773
932
|
() => ({
|
|
774
933
|
router: e,
|
|
775
|
-
navigator:
|
|
934
|
+
navigator: b,
|
|
776
935
|
static: !1,
|
|
777
|
-
basename:
|
|
936
|
+
basename: L,
|
|
937
|
+
onError: n
|
|
778
938
|
}),
|
|
779
|
-
[e,
|
|
939
|
+
[e, b, L, n]
|
|
780
940
|
);
|
|
781
|
-
return /* @__PURE__ */
|
|
782
|
-
|
|
941
|
+
return /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(F.Provider, { value: O }, /* @__PURE__ */ o.createElement(B.Provider, { value: s }, /* @__PURE__ */ o.createElement(Se.Provider, { value: w.current }, /* @__PURE__ */ o.createElement(ne.Provider, { value: c }, /* @__PURE__ */ o.createElement(
|
|
942
|
+
Bt,
|
|
783
943
|
{
|
|
784
|
-
basename:
|
|
785
|
-
location:
|
|
786
|
-
navigationType:
|
|
787
|
-
navigator:
|
|
944
|
+
basename: L,
|
|
945
|
+
location: s.location,
|
|
946
|
+
navigationType: s.historyAction,
|
|
947
|
+
navigator: b,
|
|
948
|
+
unstable_useTransitions: r
|
|
788
949
|
},
|
|
789
|
-
/* @__PURE__ */
|
|
790
|
-
|
|
950
|
+
/* @__PURE__ */ o.createElement(
|
|
951
|
+
Ut,
|
|
791
952
|
{
|
|
792
953
|
routes: e.routes,
|
|
793
954
|
future: e.future,
|
|
794
|
-
state:
|
|
955
|
+
state: s,
|
|
956
|
+
onError: n
|
|
795
957
|
}
|
|
796
958
|
)
|
|
797
959
|
))))), null);
|
|
798
960
|
}
|
|
799
|
-
|
|
800
|
-
|
|
961
|
+
function pe(e, t) {
|
|
962
|
+
return {
|
|
963
|
+
// Don't surface "current location specific" stuff mid-navigation
|
|
964
|
+
// (historyAction, location, matches, loaderData, errors, initialized,
|
|
965
|
+
// restoreScroll, preventScrollReset, blockers, etc.)
|
|
966
|
+
...e,
|
|
967
|
+
// Only surface "pending/in-flight stuff"
|
|
968
|
+
// (navigation, revalidation, actionData, fetchers, )
|
|
969
|
+
navigation: t.navigation.state !== "idle" ? t.navigation : e.navigation,
|
|
970
|
+
revalidation: t.revalidation !== "idle" ? t.revalidation : e.revalidation,
|
|
971
|
+
actionData: t.navigation.state !== "submitting" ? t.actionData : e.actionData,
|
|
972
|
+
fetchers: t.fetchers
|
|
973
|
+
};
|
|
974
|
+
}
|
|
975
|
+
var Ut = o.memo(Wt);
|
|
976
|
+
function Wt({
|
|
801
977
|
routes: e,
|
|
802
978
|
future: t,
|
|
803
|
-
state: n
|
|
979
|
+
state: n,
|
|
980
|
+
onError: r
|
|
804
981
|
}) {
|
|
805
|
-
return
|
|
982
|
+
return xt(e, void 0, n, r, t);
|
|
806
983
|
}
|
|
807
|
-
function
|
|
984
|
+
function Bt({
|
|
808
985
|
basename: e = "/",
|
|
809
986
|
children: t = null,
|
|
810
987
|
location: n,
|
|
811
|
-
navigationType:
|
|
812
|
-
navigator:
|
|
813
|
-
static:
|
|
988
|
+
navigationType: r = "POP",
|
|
989
|
+
navigator: i,
|
|
990
|
+
static: a = !1,
|
|
991
|
+
unstable_useTransitions: l
|
|
814
992
|
}) {
|
|
815
|
-
|
|
816
|
-
!
|
|
993
|
+
C(
|
|
994
|
+
!H(),
|
|
817
995
|
"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."
|
|
818
996
|
);
|
|
819
|
-
let
|
|
997
|
+
let s = e.replace(/^\/*/, "/"), u = o.useMemo(
|
|
820
998
|
() => ({
|
|
821
|
-
basename:
|
|
822
|
-
navigator:
|
|
823
|
-
static:
|
|
999
|
+
basename: s,
|
|
1000
|
+
navigator: i,
|
|
1001
|
+
static: a,
|
|
1002
|
+
unstable_useTransitions: l,
|
|
824
1003
|
future: {}
|
|
825
1004
|
}),
|
|
826
|
-
[
|
|
1005
|
+
[s, i, a, l]
|
|
827
1006
|
);
|
|
828
|
-
typeof n == "string" && (n =
|
|
1007
|
+
typeof n == "string" && (n = G(n));
|
|
829
1008
|
let {
|
|
830
|
-
pathname:
|
|
831
|
-
search:
|
|
832
|
-
hash:
|
|
833
|
-
state:
|
|
834
|
-
key:
|
|
835
|
-
} = n, y =
|
|
836
|
-
let
|
|
837
|
-
return
|
|
1009
|
+
pathname: f = "/",
|
|
1010
|
+
search: d = "",
|
|
1011
|
+
hash: c = "",
|
|
1012
|
+
state: h = null,
|
|
1013
|
+
key: m = "default"
|
|
1014
|
+
} = n, y = o.useMemo(() => {
|
|
1015
|
+
let v = M(f, s);
|
|
1016
|
+
return v == null ? null : {
|
|
838
1017
|
location: {
|
|
839
|
-
pathname:
|
|
840
|
-
search:
|
|
841
|
-
hash:
|
|
842
|
-
state:
|
|
843
|
-
key:
|
|
1018
|
+
pathname: v,
|
|
1019
|
+
search: d,
|
|
1020
|
+
hash: c,
|
|
1021
|
+
state: h,
|
|
1022
|
+
key: m
|
|
844
1023
|
},
|
|
845
|
-
navigationType:
|
|
1024
|
+
navigationType: r
|
|
846
1025
|
};
|
|
847
|
-
}, [
|
|
848
|
-
return
|
|
1026
|
+
}, [s, f, d, c, h, m, r]);
|
|
1027
|
+
return T(
|
|
849
1028
|
y != null,
|
|
850
|
-
`<Router basename="${
|
|
851
|
-
), y == null ? null : /* @__PURE__ */
|
|
1029
|
+
`<Router basename="${s}"> is not able to match the URL "${f}${d}${c}" because it does not start with the basename, so the <Router> won't render anything.`
|
|
1030
|
+
), y == null ? null : /* @__PURE__ */ o.createElement(S.Provider, { value: u }, /* @__PURE__ */ o.createElement(q.Provider, { children: t, value: y }));
|
|
852
1031
|
}
|
|
853
|
-
var
|
|
854
|
-
function
|
|
855
|
-
return
|
|
1032
|
+
var J = "get", Y = "application/x-www-form-urlencoded";
|
|
1033
|
+
function X(e) {
|
|
1034
|
+
return typeof HTMLElement < "u" && e instanceof HTMLElement;
|
|
856
1035
|
}
|
|
857
|
-
function
|
|
858
|
-
return
|
|
1036
|
+
function Ht(e) {
|
|
1037
|
+
return X(e) && e.tagName.toLowerCase() === "button";
|
|
859
1038
|
}
|
|
860
|
-
function
|
|
861
|
-
return
|
|
1039
|
+
function jt(e) {
|
|
1040
|
+
return X(e) && e.tagName.toLowerCase() === "form";
|
|
862
1041
|
}
|
|
863
|
-
function
|
|
864
|
-
return
|
|
1042
|
+
function Vt(e) {
|
|
1043
|
+
return X(e) && e.tagName.toLowerCase() === "input";
|
|
865
1044
|
}
|
|
866
|
-
function
|
|
1045
|
+
function zt(e) {
|
|
867
1046
|
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
868
1047
|
}
|
|
869
|
-
function
|
|
1048
|
+
function Jt(e, t) {
|
|
870
1049
|
return e.button === 0 && // Ignore everything but left clicks
|
|
871
1050
|
(!t || t === "_self") && // Let browser handle "target=_blank" etc.
|
|
872
|
-
!
|
|
1051
|
+
!zt(e);
|
|
873
1052
|
}
|
|
874
|
-
var
|
|
875
|
-
function
|
|
876
|
-
if (
|
|
1053
|
+
var z = null;
|
|
1054
|
+
function Yt() {
|
|
1055
|
+
if (z === null)
|
|
877
1056
|
try {
|
|
878
1057
|
new FormData(
|
|
879
1058
|
document.createElement("form"),
|
|
880
1059
|
// @ts-expect-error if FormData supports the submitter parameter, this will throw
|
|
881
1060
|
0
|
|
882
|
-
),
|
|
1061
|
+
), z = !1;
|
|
883
1062
|
} catch {
|
|
884
|
-
|
|
1063
|
+
z = !0;
|
|
885
1064
|
}
|
|
886
|
-
return
|
|
1065
|
+
return z;
|
|
887
1066
|
}
|
|
888
|
-
var
|
|
1067
|
+
var Kt = /* @__PURE__ */ new Set([
|
|
889
1068
|
"application/x-www-form-urlencoded",
|
|
890
1069
|
"multipart/form-data",
|
|
891
1070
|
"text/plain"
|
|
892
1071
|
]);
|
|
893
|
-
function
|
|
894
|
-
return e != null && !
|
|
1072
|
+
function ee(e) {
|
|
1073
|
+
return e != null && !Kt.has(e) ? (T(
|
|
895
1074
|
!1,
|
|
896
|
-
`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${
|
|
1075
|
+
`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Y}"`
|
|
897
1076
|
), null) : e;
|
|
898
1077
|
}
|
|
899
|
-
function
|
|
900
|
-
let n,
|
|
901
|
-
if (
|
|
902
|
-
let
|
|
903
|
-
|
|
904
|
-
} else if (
|
|
905
|
-
let
|
|
906
|
-
if (
|
|
1078
|
+
function Gt(e, t) {
|
|
1079
|
+
let n, r, i, a, l;
|
|
1080
|
+
if (jt(e)) {
|
|
1081
|
+
let s = e.getAttribute("action");
|
|
1082
|
+
r = s ? M(s, t) : null, n = e.getAttribute("method") || J, i = ee(e.getAttribute("enctype")) || Y, a = new FormData(e);
|
|
1083
|
+
} else if (Ht(e) || Vt(e) && (e.type === "submit" || e.type === "image")) {
|
|
1084
|
+
let s = e.form;
|
|
1085
|
+
if (s == null)
|
|
907
1086
|
throw new Error(
|
|
908
1087
|
'Cannot submit a <button> or <input type="submit"> without a <form>'
|
|
909
1088
|
);
|
|
910
|
-
let u = e.getAttribute("formaction") ||
|
|
911
|
-
if (
|
|
912
|
-
let { name:
|
|
913
|
-
if (
|
|
914
|
-
let h =
|
|
915
|
-
|
|
916
|
-
} else
|
|
1089
|
+
let u = e.getAttribute("formaction") || s.getAttribute("action");
|
|
1090
|
+
if (r = u ? M(u, t) : null, n = e.getAttribute("formmethod") || s.getAttribute("method") || J, i = ee(e.getAttribute("formenctype")) || ee(s.getAttribute("enctype")) || Y, a = new FormData(s, e), !Yt()) {
|
|
1091
|
+
let { name: f, type: d, value: c } = e;
|
|
1092
|
+
if (d === "image") {
|
|
1093
|
+
let h = f ? `${f}.` : "";
|
|
1094
|
+
a.append(`${h}x`, "0"), a.append(`${h}y`, "0");
|
|
1095
|
+
} else f && a.append(f, c);
|
|
917
1096
|
}
|
|
918
1097
|
} else {
|
|
919
|
-
if (
|
|
1098
|
+
if (X(e))
|
|
920
1099
|
throw new Error(
|
|
921
1100
|
'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
|
|
922
1101
|
);
|
|
923
|
-
n =
|
|
1102
|
+
n = J, r = null, i = Y, l = e;
|
|
924
1103
|
}
|
|
925
|
-
return
|
|
1104
|
+
return a && i === "text/plain" && (l = a, a = void 0), { action: r, method: n.toLowerCase(), encType: i, formData: a, body: l };
|
|
926
1105
|
}
|
|
927
1106
|
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
928
|
-
function
|
|
1107
|
+
function oe(e, t) {
|
|
929
1108
|
if (e === !1 || e === null || typeof e > "u")
|
|
930
1109
|
throw new Error(t);
|
|
931
1110
|
}
|
|
932
|
-
function
|
|
933
|
-
let
|
|
1111
|
+
function qt(e, t, n, r) {
|
|
1112
|
+
let i = typeof e == "string" ? new URL(
|
|
934
1113
|
e,
|
|
935
1114
|
// This can be called during the SSR flow via PrefetchPageLinksImpl so
|
|
936
1115
|
// don't assume window is available
|
|
937
1116
|
typeof window > "u" ? "server://singlefetch/" : window.location.origin
|
|
938
1117
|
) : e;
|
|
939
|
-
return
|
|
1118
|
+
return n ? i.pathname.endsWith("/") ? i.pathname = `${i.pathname}_.${r}` : i.pathname = `${i.pathname}.${r}` : i.pathname === "/" ? i.pathname = `_root.${r}` : t && M(i.pathname, t) === "/" ? i.pathname = `${t.replace(/\/$/, "")}/_root.${r}` : i.pathname = `${i.pathname.replace(/\/$/, "")}.${r}`, i;
|
|
940
1119
|
}
|
|
941
|
-
async function
|
|
1120
|
+
async function Xt(e, t) {
|
|
942
1121
|
if (e.id in t)
|
|
943
1122
|
return t[e.id];
|
|
944
1123
|
try {
|
|
@@ -955,52 +1134,52 @@ async function $t(e, t) {
|
|
|
955
1134
|
});
|
|
956
1135
|
}
|
|
957
1136
|
}
|
|
958
|
-
function
|
|
1137
|
+
function Qt(e) {
|
|
959
1138
|
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";
|
|
960
1139
|
}
|
|
961
|
-
async function
|
|
962
|
-
let
|
|
963
|
-
e.map(async (
|
|
964
|
-
let
|
|
965
|
-
if (
|
|
966
|
-
let l = await
|
|
1140
|
+
async function Zt(e, t, n) {
|
|
1141
|
+
let r = await Promise.all(
|
|
1142
|
+
e.map(async (i) => {
|
|
1143
|
+
let a = t.routes[i.route.id];
|
|
1144
|
+
if (a) {
|
|
1145
|
+
let l = await Xt(a, n);
|
|
967
1146
|
return l.links ? l.links() : [];
|
|
968
1147
|
}
|
|
969
1148
|
return [];
|
|
970
1149
|
})
|
|
971
1150
|
);
|
|
972
|
-
return
|
|
973
|
-
|
|
974
|
-
(
|
|
1151
|
+
return rn(
|
|
1152
|
+
r.flat(1).filter(Qt).filter((i) => i.rel === "stylesheet" || i.rel === "preload").map(
|
|
1153
|
+
(i) => i.rel === "stylesheet" ? { ...i, rel: "prefetch", as: "style" } : { ...i, rel: "prefetch" }
|
|
975
1154
|
)
|
|
976
1155
|
);
|
|
977
1156
|
}
|
|
978
|
-
function
|
|
979
|
-
let l = (u,
|
|
980
|
-
var
|
|
1157
|
+
function ve(e, t, n, r, i, a) {
|
|
1158
|
+
let l = (u, f) => n[f] ? u.route.id !== n[f].route.id : !0, s = (u, f) => {
|
|
1159
|
+
var d;
|
|
981
1160
|
return (
|
|
982
1161
|
// param change, /users/123 -> /users/456
|
|
983
|
-
n[
|
|
1162
|
+
n[f].pathname !== u.pathname || // splat param changed, which is not present in match.path
|
|
984
1163
|
// e.g. /files/images/avatar.jpg -> files/finances.xls
|
|
985
|
-
((
|
|
1164
|
+
((d = n[f].route.path) == null ? void 0 : d.endsWith("*")) && n[f].params["*"] !== u.params["*"]
|
|
986
1165
|
);
|
|
987
1166
|
};
|
|
988
|
-
return
|
|
989
|
-
(u,
|
|
990
|
-
) :
|
|
991
|
-
var
|
|
992
|
-
let
|
|
993
|
-
if (!
|
|
1167
|
+
return a === "assets" ? t.filter(
|
|
1168
|
+
(u, f) => l(u, f) || s(u, f)
|
|
1169
|
+
) : a === "data" ? t.filter((u, f) => {
|
|
1170
|
+
var c;
|
|
1171
|
+
let d = r.routes[u.route.id];
|
|
1172
|
+
if (!d || !d.hasLoader)
|
|
994
1173
|
return !1;
|
|
995
|
-
if (l(u,
|
|
1174
|
+
if (l(u, f) || s(u, f))
|
|
996
1175
|
return !0;
|
|
997
1176
|
if (u.route.shouldRevalidate) {
|
|
998
1177
|
let h = u.route.shouldRevalidate({
|
|
999
1178
|
currentUrl: new URL(
|
|
1000
|
-
|
|
1179
|
+
i.pathname + i.search + i.hash,
|
|
1001
1180
|
window.origin
|
|
1002
1181
|
),
|
|
1003
|
-
currentParams: ((
|
|
1182
|
+
currentParams: ((c = n[0]) == null ? void 0 : c.params) || {},
|
|
1004
1183
|
nextUrl: new URL(e, window.origin),
|
|
1005
1184
|
nextParams: u.params,
|
|
1006
1185
|
defaultShouldRevalidate: !0
|
|
@@ -1011,92 +1190,92 @@ function ue(e, t, n, a, r, o) {
|
|
|
1011
1190
|
return !0;
|
|
1012
1191
|
}) : [];
|
|
1013
1192
|
}
|
|
1014
|
-
function
|
|
1015
|
-
return
|
|
1016
|
-
e.map((
|
|
1017
|
-
let
|
|
1018
|
-
if (!
|
|
1019
|
-
let
|
|
1020
|
-
return
|
|
1193
|
+
function en(e, t, { includeHydrateFallback: n } = {}) {
|
|
1194
|
+
return tn(
|
|
1195
|
+
e.map((r) => {
|
|
1196
|
+
let i = t.routes[r.route.id];
|
|
1197
|
+
if (!i) return [];
|
|
1198
|
+
let a = [i.module];
|
|
1199
|
+
return i.clientActionModule && (a = a.concat(i.clientActionModule)), i.clientLoaderModule && (a = a.concat(i.clientLoaderModule)), n && i.hydrateFallbackModule && (a = a.concat(i.hydrateFallbackModule)), i.imports && (a = a.concat(i.imports)), a;
|
|
1021
1200
|
}).flat(1)
|
|
1022
1201
|
);
|
|
1023
1202
|
}
|
|
1024
|
-
function
|
|
1203
|
+
function tn(e) {
|
|
1025
1204
|
return [...new Set(e)];
|
|
1026
1205
|
}
|
|
1027
|
-
function
|
|
1206
|
+
function nn(e) {
|
|
1028
1207
|
let t = {}, n = Object.keys(e).sort();
|
|
1029
|
-
for (let
|
|
1030
|
-
t[
|
|
1208
|
+
for (let r of n)
|
|
1209
|
+
t[r] = e[r];
|
|
1031
1210
|
return t;
|
|
1032
1211
|
}
|
|
1033
|
-
function
|
|
1212
|
+
function rn(e, t) {
|
|
1034
1213
|
let n = /* @__PURE__ */ new Set();
|
|
1035
|
-
return new Set(t), e.reduce((
|
|
1036
|
-
let
|
|
1037
|
-
return n.has(
|
|
1214
|
+
return new Set(t), e.reduce((r, i) => {
|
|
1215
|
+
let a = JSON.stringify(nn(i));
|
|
1216
|
+
return n.has(a) || (n.add(a), r.push({ key: a, link: i })), r;
|
|
1038
1217
|
}, []);
|
|
1039
1218
|
}
|
|
1040
|
-
function
|
|
1041
|
-
let e =
|
|
1042
|
-
return
|
|
1219
|
+
function Me() {
|
|
1220
|
+
let e = o.useContext(F);
|
|
1221
|
+
return oe(
|
|
1043
1222
|
e,
|
|
1044
1223
|
"You must render this element inside a <DataRouterContext.Provider> element"
|
|
1045
1224
|
), e;
|
|
1046
1225
|
}
|
|
1047
|
-
function
|
|
1048
|
-
let e =
|
|
1049
|
-
return
|
|
1226
|
+
function an() {
|
|
1227
|
+
let e = o.useContext(B);
|
|
1228
|
+
return oe(
|
|
1050
1229
|
e,
|
|
1051
1230
|
"You must render this element inside a <DataRouterStateContext.Provider> element"
|
|
1052
1231
|
), e;
|
|
1053
1232
|
}
|
|
1054
|
-
var
|
|
1055
|
-
|
|
1056
|
-
function
|
|
1057
|
-
let e =
|
|
1058
|
-
return
|
|
1233
|
+
var le = o.createContext(void 0);
|
|
1234
|
+
le.displayName = "FrameworkContext";
|
|
1235
|
+
function Ne() {
|
|
1236
|
+
let e = o.useContext(le);
|
|
1237
|
+
return oe(
|
|
1059
1238
|
e,
|
|
1060
1239
|
"You must render this element inside a <HydratedRouter> element"
|
|
1061
1240
|
), e;
|
|
1062
1241
|
}
|
|
1063
|
-
function
|
|
1064
|
-
let n =
|
|
1065
|
-
|
|
1242
|
+
function on(e, t) {
|
|
1243
|
+
let n = o.useContext(le), [r, i] = o.useState(!1), [a, l] = o.useState(!1), { onFocus: s, onBlur: u, onMouseEnter: f, onMouseLeave: d, onTouchStart: c } = t, h = o.useRef(null);
|
|
1244
|
+
o.useEffect(() => {
|
|
1066
1245
|
if (e === "render" && l(!0), e === "viewport") {
|
|
1067
|
-
let
|
|
1068
|
-
|
|
1069
|
-
l(
|
|
1246
|
+
let v = (R) => {
|
|
1247
|
+
R.forEach((p) => {
|
|
1248
|
+
l(p.isIntersecting);
|
|
1070
1249
|
});
|
|
1071
|
-
},
|
|
1072
|
-
return h.current &&
|
|
1073
|
-
|
|
1250
|
+
}, g = new IntersectionObserver(v, { threshold: 0.5 });
|
|
1251
|
+
return h.current && g.observe(h.current), () => {
|
|
1252
|
+
g.disconnect();
|
|
1074
1253
|
};
|
|
1075
1254
|
}
|
|
1076
|
-
}, [e]),
|
|
1077
|
-
if (
|
|
1078
|
-
let
|
|
1255
|
+
}, [e]), o.useEffect(() => {
|
|
1256
|
+
if (r) {
|
|
1257
|
+
let v = setTimeout(() => {
|
|
1079
1258
|
l(!0);
|
|
1080
1259
|
}, 100);
|
|
1081
1260
|
return () => {
|
|
1082
|
-
clearTimeout(
|
|
1261
|
+
clearTimeout(v);
|
|
1083
1262
|
};
|
|
1084
1263
|
}
|
|
1085
|
-
}, [
|
|
1086
|
-
let
|
|
1087
|
-
|
|
1088
|
-
},
|
|
1089
|
-
|
|
1264
|
+
}, [r]);
|
|
1265
|
+
let m = () => {
|
|
1266
|
+
i(!0);
|
|
1267
|
+
}, y = () => {
|
|
1268
|
+
i(!1), l(!1);
|
|
1090
1269
|
};
|
|
1091
|
-
return n ? e !== "intent" ? [
|
|
1092
|
-
|
|
1270
|
+
return n ? e !== "intent" ? [a, h, {}] : [
|
|
1271
|
+
a,
|
|
1093
1272
|
h,
|
|
1094
1273
|
{
|
|
1095
|
-
onFocus: W(
|
|
1096
|
-
onBlur: W(u,
|
|
1097
|
-
onMouseEnter: W(
|
|
1098
|
-
onMouseLeave: W(
|
|
1099
|
-
onTouchStart: W(
|
|
1274
|
+
onFocus: W(s, m),
|
|
1275
|
+
onBlur: W(u, y),
|
|
1276
|
+
onMouseEnter: W(f, m),
|
|
1277
|
+
onMouseLeave: W(d, y),
|
|
1278
|
+
onTouchStart: W(c, m)
|
|
1100
1279
|
}
|
|
1101
1280
|
] : [!1, h, {}];
|
|
1102
1281
|
}
|
|
@@ -1105,362 +1284,379 @@ function W(e, t) {
|
|
|
1105
1284
|
e && e(n), n.defaultPrevented || t(n);
|
|
1106
1285
|
};
|
|
1107
1286
|
}
|
|
1108
|
-
function
|
|
1109
|
-
let { router: n } =
|
|
1110
|
-
() =>
|
|
1287
|
+
function ln({ page: e, ...t }) {
|
|
1288
|
+
let { router: n } = Me(), r = o.useMemo(
|
|
1289
|
+
() => ge(n.routes, e, n.basename),
|
|
1111
1290
|
[n.routes, e, n.basename]
|
|
1112
1291
|
);
|
|
1113
|
-
return
|
|
1292
|
+
return r ? /* @__PURE__ */ o.createElement(un, { page: e, matches: r, ...t }) : null;
|
|
1114
1293
|
}
|
|
1115
|
-
function
|
|
1116
|
-
let { manifest: t, routeModules: n } =
|
|
1117
|
-
return
|
|
1118
|
-
let
|
|
1119
|
-
return
|
|
1294
|
+
function sn(e) {
|
|
1295
|
+
let { manifest: t, routeModules: n } = Ne(), [r, i] = o.useState([]);
|
|
1296
|
+
return o.useEffect(() => {
|
|
1297
|
+
let a = !1;
|
|
1298
|
+
return Zt(e, t, n).then(
|
|
1120
1299
|
(l) => {
|
|
1121
|
-
|
|
1300
|
+
a || i(l);
|
|
1122
1301
|
}
|
|
1123
1302
|
), () => {
|
|
1124
|
-
|
|
1303
|
+
a = !0;
|
|
1125
1304
|
};
|
|
1126
|
-
}, [e, t, n]),
|
|
1305
|
+
}, [e, t, n]), r;
|
|
1127
1306
|
}
|
|
1128
|
-
function
|
|
1307
|
+
function un({
|
|
1129
1308
|
page: e,
|
|
1130
1309
|
matches: t,
|
|
1131
1310
|
...n
|
|
1132
1311
|
}) {
|
|
1133
|
-
let
|
|
1134
|
-
() =>
|
|
1312
|
+
let r = _(), { future: i, manifest: a, routeModules: l } = Ne(), { basename: s } = Me(), { loaderData: u, matches: f } = an(), d = o.useMemo(
|
|
1313
|
+
() => ve(
|
|
1135
1314
|
e,
|
|
1136
1315
|
t,
|
|
1137
|
-
|
|
1138
|
-
r,
|
|
1316
|
+
f,
|
|
1139
1317
|
a,
|
|
1318
|
+
r,
|
|
1140
1319
|
"data"
|
|
1141
1320
|
),
|
|
1142
|
-
[e, t,
|
|
1143
|
-
),
|
|
1144
|
-
() =>
|
|
1321
|
+
[e, t, f, a, r]
|
|
1322
|
+
), c = o.useMemo(
|
|
1323
|
+
() => ve(
|
|
1145
1324
|
e,
|
|
1146
1325
|
t,
|
|
1147
|
-
|
|
1148
|
-
r,
|
|
1326
|
+
f,
|
|
1149
1327
|
a,
|
|
1328
|
+
r,
|
|
1150
1329
|
"assets"
|
|
1151
1330
|
),
|
|
1152
|
-
[e, t,
|
|
1153
|
-
),
|
|
1154
|
-
if (e ===
|
|
1331
|
+
[e, t, f, a, r]
|
|
1332
|
+
), h = o.useMemo(() => {
|
|
1333
|
+
if (e === r.pathname + r.search + r.hash)
|
|
1155
1334
|
return [];
|
|
1156
|
-
let
|
|
1157
|
-
if (t.forEach((
|
|
1158
|
-
var
|
|
1159
|
-
let
|
|
1160
|
-
!
|
|
1161
|
-
}),
|
|
1335
|
+
let v = /* @__PURE__ */ new Set(), g = !1;
|
|
1336
|
+
if (t.forEach((p) => {
|
|
1337
|
+
var $;
|
|
1338
|
+
let w = a.routes[p.route.id];
|
|
1339
|
+
!w || !w.hasLoader || (!d.some((b) => b.route.id === p.route.id) && p.route.id in u && (($ = l[p.route.id]) != null && $.shouldRevalidate) || w.hasClientLoader ? g = !0 : v.add(p.route.id));
|
|
1340
|
+
}), v.size === 0)
|
|
1162
1341
|
return [];
|
|
1163
|
-
let
|
|
1164
|
-
|
|
1342
|
+
let R = qt(
|
|
1343
|
+
e,
|
|
1344
|
+
s,
|
|
1345
|
+
i.unstable_trailingSlashAwareDataRequests,
|
|
1346
|
+
"data"
|
|
1347
|
+
);
|
|
1348
|
+
return g && v.size > 0 && R.searchParams.set(
|
|
1165
1349
|
"_routes",
|
|
1166
|
-
t.filter((
|
|
1167
|
-
), [
|
|
1350
|
+
t.filter((p) => v.has(p.route.id)).map((p) => p.route.id).join(",")
|
|
1351
|
+
), [R.pathname + R.search];
|
|
1168
1352
|
}, [
|
|
1169
|
-
l,
|
|
1170
|
-
c,
|
|
1171
|
-
a,
|
|
1172
|
-
r,
|
|
1173
1353
|
s,
|
|
1354
|
+
i.unstable_trailingSlashAwareDataRequests,
|
|
1355
|
+
u,
|
|
1356
|
+
r,
|
|
1357
|
+
a,
|
|
1358
|
+
d,
|
|
1174
1359
|
t,
|
|
1175
1360
|
e,
|
|
1176
|
-
|
|
1177
|
-
]),
|
|
1178
|
-
() =>
|
|
1179
|
-
[
|
|
1180
|
-
), y =
|
|
1181
|
-
return /* @__PURE__ */
|
|
1361
|
+
l
|
|
1362
|
+
]), m = o.useMemo(
|
|
1363
|
+
() => en(c, a),
|
|
1364
|
+
[c, a]
|
|
1365
|
+
), y = sn(c);
|
|
1366
|
+
return /* @__PURE__ */ o.createElement(o.Fragment, null, h.map((v) => /* @__PURE__ */ o.createElement("link", { key: v, rel: "prefetch", as: "fetch", href: v, ...n })), m.map((v) => /* @__PURE__ */ o.createElement("link", { key: v, rel: "modulepreload", href: v, ...n })), y.map(({ key: v, link: g }) => (
|
|
1182
1367
|
// these don't spread `linkProps` because they are full link descriptors
|
|
1183
1368
|
// already with their own props
|
|
1184
|
-
/* @__PURE__ */
|
|
1369
|
+
/* @__PURE__ */ o.createElement(
|
|
1370
|
+
"link",
|
|
1371
|
+
{
|
|
1372
|
+
key: v,
|
|
1373
|
+
nonce: n.nonce,
|
|
1374
|
+
...g,
|
|
1375
|
+
crossOrigin: g.crossOrigin ?? n.crossOrigin
|
|
1376
|
+
}
|
|
1377
|
+
)
|
|
1185
1378
|
)));
|
|
1186
1379
|
}
|
|
1187
|
-
function
|
|
1380
|
+
function cn(...e) {
|
|
1188
1381
|
return (t) => {
|
|
1189
1382
|
e.forEach((n) => {
|
|
1190
1383
|
typeof n == "function" ? n(t) : n != null && (n.current = t);
|
|
1191
1384
|
});
|
|
1192
1385
|
};
|
|
1193
1386
|
}
|
|
1194
|
-
var
|
|
1387
|
+
var fn = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
1195
1388
|
try {
|
|
1196
|
-
|
|
1197
|
-
"7.
|
|
1389
|
+
fn && (window.__reactRouterVersion = // @ts-expect-error
|
|
1390
|
+
"7.13.0");
|
|
1198
1391
|
} catch {
|
|
1199
1392
|
}
|
|
1200
|
-
var
|
|
1393
|
+
var Ie = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Fe = o.forwardRef(
|
|
1201
1394
|
function({
|
|
1202
1395
|
onClick: t,
|
|
1203
1396
|
discover: n = "render",
|
|
1204
|
-
prefetch:
|
|
1205
|
-
relative:
|
|
1206
|
-
reloadDocument:
|
|
1397
|
+
prefetch: r = "none",
|
|
1398
|
+
relative: i,
|
|
1399
|
+
reloadDocument: a,
|
|
1207
1400
|
replace: l,
|
|
1208
|
-
state:
|
|
1401
|
+
state: s,
|
|
1209
1402
|
target: u,
|
|
1210
|
-
to:
|
|
1211
|
-
preventScrollReset:
|
|
1212
|
-
viewTransition:
|
|
1213
|
-
|
|
1403
|
+
to: f,
|
|
1404
|
+
preventScrollReset: d,
|
|
1405
|
+
viewTransition: c,
|
|
1406
|
+
unstable_defaultShouldRevalidate: h,
|
|
1407
|
+
...m
|
|
1214
1408
|
}, y) {
|
|
1215
|
-
let { basename:
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
S(
|
|
1222
|
-
!1,
|
|
1223
|
-
`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
|
|
1224
|
-
);
|
|
1225
|
-
}
|
|
1226
|
-
let R = et(s, { relative: r }), [v, C, x] = Wt(
|
|
1227
|
-
a,
|
|
1228
|
-
h
|
|
1229
|
-
), b = zt(s, {
|
|
1409
|
+
let { basename: v, unstable_useTransitions: g } = o.useContext(S), R = typeof f == "string" && Ie.test(f), p = be(f, v);
|
|
1410
|
+
f = p.to;
|
|
1411
|
+
let w = Rt(f, { relative: i }), [$, b, L] = on(
|
|
1412
|
+
r,
|
|
1413
|
+
m
|
|
1414
|
+
), O = pn(f, {
|
|
1230
1415
|
replace: l,
|
|
1231
|
-
state:
|
|
1416
|
+
state: s,
|
|
1232
1417
|
target: u,
|
|
1233
|
-
preventScrollReset:
|
|
1234
|
-
relative:
|
|
1235
|
-
viewTransition:
|
|
1418
|
+
preventScrollReset: d,
|
|
1419
|
+
relative: i,
|
|
1420
|
+
viewTransition: c,
|
|
1421
|
+
unstable_defaultShouldRevalidate: h,
|
|
1422
|
+
unstable_useTransitions: g
|
|
1236
1423
|
});
|
|
1237
|
-
function
|
|
1238
|
-
t && t(
|
|
1424
|
+
function E(x) {
|
|
1425
|
+
t && t(x), x.defaultPrevented || O(x);
|
|
1239
1426
|
}
|
|
1240
|
-
let
|
|
1427
|
+
let P = (
|
|
1241
1428
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
1242
|
-
/* @__PURE__ */
|
|
1429
|
+
/* @__PURE__ */ o.createElement(
|
|
1243
1430
|
"a",
|
|
1244
1431
|
{
|
|
1245
|
-
...
|
|
1246
|
-
...
|
|
1247
|
-
href:
|
|
1248
|
-
onClick:
|
|
1249
|
-
ref:
|
|
1432
|
+
...m,
|
|
1433
|
+
...L,
|
|
1434
|
+
href: p.absoluteURL || w,
|
|
1435
|
+
onClick: p.isExternal || a ? t : E,
|
|
1436
|
+
ref: cn(y, b),
|
|
1250
1437
|
target: u,
|
|
1251
|
-
"data-discover": !
|
|
1438
|
+
"data-discover": !R && n === "render" ? "true" : void 0
|
|
1252
1439
|
}
|
|
1253
1440
|
)
|
|
1254
1441
|
);
|
|
1255
|
-
return
|
|
1442
|
+
return $ && !R ? /* @__PURE__ */ o.createElement(o.Fragment, null, P, /* @__PURE__ */ o.createElement(ln, { page: w })) : P;
|
|
1256
1443
|
}
|
|
1257
1444
|
);
|
|
1258
|
-
|
|
1259
|
-
var
|
|
1445
|
+
Fe.displayName = "Link";
|
|
1446
|
+
var dn = o.forwardRef(
|
|
1260
1447
|
function({
|
|
1261
1448
|
"aria-current": t = "page",
|
|
1262
1449
|
caseSensitive: n = !1,
|
|
1263
|
-
className:
|
|
1264
|
-
end:
|
|
1265
|
-
style:
|
|
1450
|
+
className: r = "",
|
|
1451
|
+
end: i = !1,
|
|
1452
|
+
style: a,
|
|
1266
1453
|
to: l,
|
|
1267
|
-
viewTransition:
|
|
1454
|
+
viewTransition: s,
|
|
1268
1455
|
children: u,
|
|
1269
|
-
...
|
|
1270
|
-
},
|
|
1271
|
-
let
|
|
1456
|
+
...f
|
|
1457
|
+
}, d) {
|
|
1458
|
+
let c = j(l, { relative: f.relative }), h = _(), m = o.useContext(B), { navigator: y, basename: v } = o.useContext(S), g = m != null && // Conditional usage is OK here because the usage of a data router is static
|
|
1272
1459
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1273
|
-
|
|
1274
|
-
n || (
|
|
1275
|
-
const
|
|
1276
|
-
let
|
|
1277
|
-
isActive:
|
|
1278
|
-
isPending:
|
|
1279
|
-
isTransitioning:
|
|
1280
|
-
},
|
|
1281
|
-
typeof
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1460
|
+
wn(c) && s === !0, R = y.encodeLocation ? y.encodeLocation(c).pathname : c.pathname, p = h.pathname, w = m && m.navigation && m.navigation.location ? m.navigation.location.pathname : null;
|
|
1461
|
+
n || (p = p.toLowerCase(), w = w ? w.toLowerCase() : null, R = R.toLowerCase()), w && v && (w = M(w, v) || w);
|
|
1462
|
+
const $ = R !== "/" && R.endsWith("/") ? R.length - 1 : R.length;
|
|
1463
|
+
let b = p === R || !i && p.startsWith(R) && p.charAt($) === "/", L = w != null && (w === R || !i && w.startsWith(R) && w.charAt(R.length) === "/"), O = {
|
|
1464
|
+
isActive: b,
|
|
1465
|
+
isPending: L,
|
|
1466
|
+
isTransitioning: g
|
|
1467
|
+
}, E = b ? t : void 0, P;
|
|
1468
|
+
typeof r == "function" ? P = r(O) : P = [
|
|
1469
|
+
r,
|
|
1470
|
+
b ? "active" : null,
|
|
1471
|
+
L ? "pending" : null,
|
|
1472
|
+
g ? "transitioning" : null
|
|
1286
1473
|
].filter(Boolean).join(" ");
|
|
1287
|
-
let
|
|
1288
|
-
return /* @__PURE__ */
|
|
1289
|
-
|
|
1474
|
+
let x = typeof a == "function" ? a(O) : a;
|
|
1475
|
+
return /* @__PURE__ */ o.createElement(
|
|
1476
|
+
Fe,
|
|
1290
1477
|
{
|
|
1291
|
-
...
|
|
1292
|
-
"aria-current":
|
|
1478
|
+
...f,
|
|
1479
|
+
"aria-current": E,
|
|
1293
1480
|
className: P,
|
|
1294
|
-
ref:
|
|
1295
|
-
style:
|
|
1481
|
+
ref: d,
|
|
1482
|
+
style: x,
|
|
1296
1483
|
to: l,
|
|
1297
|
-
viewTransition:
|
|
1484
|
+
viewTransition: s
|
|
1298
1485
|
},
|
|
1299
|
-
typeof u == "function" ? u(
|
|
1486
|
+
typeof u == "function" ? u(O) : u
|
|
1300
1487
|
);
|
|
1301
1488
|
}
|
|
1302
1489
|
);
|
|
1303
|
-
|
|
1304
|
-
var
|
|
1490
|
+
dn.displayName = "NavLink";
|
|
1491
|
+
var hn = o.forwardRef(
|
|
1305
1492
|
({
|
|
1306
1493
|
discover: e = "render",
|
|
1307
1494
|
fetcherKey: t,
|
|
1308
1495
|
navigate: n,
|
|
1309
|
-
reloadDocument:
|
|
1310
|
-
replace:
|
|
1311
|
-
state:
|
|
1312
|
-
method: l =
|
|
1313
|
-
action:
|
|
1496
|
+
reloadDocument: r,
|
|
1497
|
+
replace: i,
|
|
1498
|
+
state: a,
|
|
1499
|
+
method: l = J,
|
|
1500
|
+
action: s,
|
|
1314
1501
|
onSubmit: u,
|
|
1315
|
-
relative:
|
|
1316
|
-
preventScrollReset:
|
|
1317
|
-
viewTransition:
|
|
1318
|
-
|
|
1502
|
+
relative: f,
|
|
1503
|
+
preventScrollReset: d,
|
|
1504
|
+
viewTransition: c,
|
|
1505
|
+
unstable_defaultShouldRevalidate: h,
|
|
1506
|
+
...m
|
|
1319
1507
|
}, y) => {
|
|
1320
|
-
let
|
|
1321
|
-
if (u && u(
|
|
1322
|
-
|
|
1323
|
-
let
|
|
1324
|
-
p(C || v.currentTarget, {
|
|
1508
|
+
let { unstable_useTransitions: v } = o.useContext(S), g = yn(), R = Rn(s, { relative: f }), p = l.toLowerCase() === "get" ? "get" : "post", w = typeof s == "string" && Ie.test(s), $ = (b) => {
|
|
1509
|
+
if (u && u(b), b.defaultPrevented) return;
|
|
1510
|
+
b.preventDefault();
|
|
1511
|
+
let L = b.nativeEvent.submitter, O = (L == null ? void 0 : L.getAttribute("formmethod")) || l, E = () => g(L || b.currentTarget, {
|
|
1325
1512
|
fetcherKey: t,
|
|
1326
|
-
method:
|
|
1513
|
+
method: O,
|
|
1327
1514
|
navigate: n,
|
|
1328
|
-
replace:
|
|
1329
|
-
state:
|
|
1330
|
-
relative:
|
|
1331
|
-
preventScrollReset:
|
|
1332
|
-
viewTransition:
|
|
1515
|
+
replace: i,
|
|
1516
|
+
state: a,
|
|
1517
|
+
relative: f,
|
|
1518
|
+
preventScrollReset: d,
|
|
1519
|
+
viewTransition: c,
|
|
1520
|
+
unstable_defaultShouldRevalidate: h
|
|
1333
1521
|
});
|
|
1522
|
+
v && n !== !1 ? o.startTransition(() => E()) : E();
|
|
1334
1523
|
};
|
|
1335
|
-
return /* @__PURE__ */
|
|
1524
|
+
return /* @__PURE__ */ o.createElement(
|
|
1336
1525
|
"form",
|
|
1337
1526
|
{
|
|
1338
1527
|
ref: y,
|
|
1339
|
-
method:
|
|
1340
|
-
action:
|
|
1341
|
-
onSubmit:
|
|
1342
|
-
...
|
|
1343
|
-
"data-discover": !
|
|
1528
|
+
method: p,
|
|
1529
|
+
action: R,
|
|
1530
|
+
onSubmit: r ? u : $,
|
|
1531
|
+
...m,
|
|
1532
|
+
"data-discover": !w && e === "render" ? "true" : void 0
|
|
1344
1533
|
}
|
|
1345
1534
|
);
|
|
1346
1535
|
}
|
|
1347
1536
|
);
|
|
1348
|
-
|
|
1349
|
-
function
|
|
1537
|
+
hn.displayName = "Form";
|
|
1538
|
+
function mn(e) {
|
|
1350
1539
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1351
1540
|
}
|
|
1352
|
-
function
|
|
1353
|
-
let t =
|
|
1354
|
-
return
|
|
1541
|
+
function _e(e) {
|
|
1542
|
+
let t = o.useContext(F);
|
|
1543
|
+
return C(t, mn(e)), t;
|
|
1355
1544
|
}
|
|
1356
|
-
function
|
|
1545
|
+
function pn(e, {
|
|
1357
1546
|
target: t,
|
|
1358
1547
|
replace: n,
|
|
1359
|
-
state:
|
|
1360
|
-
preventScrollReset:
|
|
1361
|
-
relative:
|
|
1362
|
-
viewTransition: l
|
|
1548
|
+
state: r,
|
|
1549
|
+
preventScrollReset: i,
|
|
1550
|
+
relative: a,
|
|
1551
|
+
viewTransition: l,
|
|
1552
|
+
unstable_defaultShouldRevalidate: s,
|
|
1553
|
+
unstable_useTransitions: u
|
|
1363
1554
|
} = {}) {
|
|
1364
|
-
let
|
|
1365
|
-
return
|
|
1366
|
-
(
|
|
1367
|
-
if (
|
|
1368
|
-
|
|
1369
|
-
let
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1555
|
+
let f = wt(), d = _(), c = j(e, { relative: a });
|
|
1556
|
+
return o.useCallback(
|
|
1557
|
+
(h) => {
|
|
1558
|
+
if (Jt(h, t)) {
|
|
1559
|
+
h.preventDefault();
|
|
1560
|
+
let m = n !== void 0 ? n : te(d) === te(c), y = () => f(e, {
|
|
1561
|
+
replace: m,
|
|
1562
|
+
state: r,
|
|
1563
|
+
preventScrollReset: i,
|
|
1564
|
+
relative: a,
|
|
1565
|
+
viewTransition: l,
|
|
1566
|
+
unstable_defaultShouldRevalidate: s
|
|
1376
1567
|
});
|
|
1568
|
+
u ? o.startTransition(() => y()) : y();
|
|
1377
1569
|
}
|
|
1378
1570
|
},
|
|
1379
1571
|
[
|
|
1380
|
-
|
|
1572
|
+
d,
|
|
1573
|
+
f,
|
|
1381
1574
|
c,
|
|
1382
|
-
s,
|
|
1383
1575
|
n,
|
|
1384
|
-
|
|
1576
|
+
r,
|
|
1385
1577
|
t,
|
|
1386
1578
|
e,
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
l
|
|
1579
|
+
i,
|
|
1580
|
+
a,
|
|
1581
|
+
l,
|
|
1582
|
+
s,
|
|
1583
|
+
u
|
|
1390
1584
|
]
|
|
1391
1585
|
);
|
|
1392
1586
|
}
|
|
1393
|
-
var
|
|
1394
|
-
function
|
|
1395
|
-
let { router: e } =
|
|
1587
|
+
var vn = 0, gn = () => `__${String(++vn)}__`;
|
|
1588
|
+
function yn() {
|
|
1589
|
+
let { router: e } = _e(
|
|
1396
1590
|
"useSubmit"
|
|
1397
1591
|
/* UseSubmit */
|
|
1398
|
-
), { basename: t } =
|
|
1399
|
-
return
|
|
1400
|
-
async (a,
|
|
1401
|
-
let { action:
|
|
1592
|
+
), { basename: t } = o.useContext(S), n = Ot(), r = e.fetch, i = e.navigate;
|
|
1593
|
+
return o.useCallback(
|
|
1594
|
+
async (a, l = {}) => {
|
|
1595
|
+
let { action: s, method: u, encType: f, formData: d, body: c } = Gt(
|
|
1402
1596
|
a,
|
|
1403
1597
|
t
|
|
1404
1598
|
);
|
|
1405
|
-
if (
|
|
1406
|
-
let
|
|
1407
|
-
await
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1599
|
+
if (l.navigate === !1) {
|
|
1600
|
+
let h = l.fetcherKey || gn();
|
|
1601
|
+
await r(h, n, l.action || s, {
|
|
1602
|
+
unstable_defaultShouldRevalidate: l.unstable_defaultShouldRevalidate,
|
|
1603
|
+
preventScrollReset: l.preventScrollReset,
|
|
1604
|
+
formData: d,
|
|
1605
|
+
body: c,
|
|
1606
|
+
formMethod: l.method || u,
|
|
1607
|
+
formEncType: l.encType || f,
|
|
1608
|
+
flushSync: l.flushSync
|
|
1414
1609
|
});
|
|
1415
1610
|
} else
|
|
1416
|
-
await
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1611
|
+
await i(l.action || s, {
|
|
1612
|
+
unstable_defaultShouldRevalidate: l.unstable_defaultShouldRevalidate,
|
|
1613
|
+
preventScrollReset: l.preventScrollReset,
|
|
1614
|
+
formData: d,
|
|
1615
|
+
body: c,
|
|
1616
|
+
formMethod: l.method || u,
|
|
1617
|
+
formEncType: l.encType || f,
|
|
1618
|
+
replace: l.replace,
|
|
1619
|
+
state: l.state,
|
|
1424
1620
|
fromRouteId: n,
|
|
1425
|
-
flushSync:
|
|
1426
|
-
viewTransition:
|
|
1621
|
+
flushSync: l.flushSync,
|
|
1622
|
+
viewTransition: l.viewTransition
|
|
1427
1623
|
});
|
|
1428
1624
|
},
|
|
1429
|
-
[
|
|
1625
|
+
[r, i, t, n]
|
|
1430
1626
|
);
|
|
1431
1627
|
}
|
|
1432
|
-
function
|
|
1433
|
-
let { basename: n } =
|
|
1434
|
-
|
|
1435
|
-
let [
|
|
1628
|
+
function Rn(e, { relative: t } = {}) {
|
|
1629
|
+
let { basename: n } = o.useContext(S), r = o.useContext(N);
|
|
1630
|
+
C(r, "useFormAction must be used inside a RouteContext");
|
|
1631
|
+
let [i] = r.matches.slice(-1), a = { ...j(e || ".", { relative: t }) }, l = _();
|
|
1436
1632
|
if (e == null) {
|
|
1437
|
-
|
|
1438
|
-
let
|
|
1439
|
-
if (u.some((
|
|
1440
|
-
|
|
1441
|
-
let
|
|
1442
|
-
|
|
1633
|
+
a.search = l.search;
|
|
1634
|
+
let s = new URLSearchParams(a.search), u = s.getAll("index");
|
|
1635
|
+
if (u.some((d) => d === "")) {
|
|
1636
|
+
s.delete("index"), u.filter((c) => c).forEach((c) => s.append("index", c));
|
|
1637
|
+
let d = s.toString();
|
|
1638
|
+
a.search = d ? `?${d}` : "";
|
|
1443
1639
|
}
|
|
1444
1640
|
}
|
|
1445
|
-
return (!e || e === ".") &&
|
|
1641
|
+
return (!e || e === ".") && i.route.index && (a.search = a.search ? a.search.replace(/^\?/, "?index&") : "?index"), n !== "/" && (a.pathname = a.pathname === "/" ? n : D([n, a.pathname])), te(a);
|
|
1446
1642
|
}
|
|
1447
|
-
function
|
|
1448
|
-
let n =
|
|
1449
|
-
|
|
1643
|
+
function wn(e, { relative: t } = {}) {
|
|
1644
|
+
let n = o.useContext(ne);
|
|
1645
|
+
C(
|
|
1450
1646
|
n != null,
|
|
1451
1647
|
"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
|
|
1452
1648
|
);
|
|
1453
|
-
let { basename:
|
|
1649
|
+
let { basename: r } = _e(
|
|
1454
1650
|
"useViewTransitionState"
|
|
1455
1651
|
/* useViewTransitionState */
|
|
1456
|
-
),
|
|
1652
|
+
), i = j(e, { relative: t });
|
|
1457
1653
|
if (!n.isTransitioning)
|
|
1458
1654
|
return !1;
|
|
1459
|
-
let
|
|
1460
|
-
return
|
|
1655
|
+
let a = M(n.currentLocation.pathname, r) || n.currentLocation.pathname, l = M(n.nextLocation.pathname, r) || n.nextLocation.pathname;
|
|
1656
|
+
return K(i.pathname, l) != null || K(i.pathname, a) != null;
|
|
1461
1657
|
}
|
|
1462
1658
|
/**
|
|
1463
|
-
* react-router v7.
|
|
1659
|
+
* react-router v7.13.0
|
|
1464
1660
|
*
|
|
1465
1661
|
* Copyright (c) Remix Software Inc.
|
|
1466
1662
|
*
|
|
@@ -1469,24 +1665,24 @@ function Gt(e, { relative: t } = {}) {
|
|
|
1469
1665
|
*
|
|
1470
1666
|
* @license MIT
|
|
1471
1667
|
*/
|
|
1472
|
-
function
|
|
1473
|
-
return /* @__PURE__ */
|
|
1668
|
+
function En(e) {
|
|
1669
|
+
return /* @__PURE__ */ o.createElement(At, { flushSync: He.flushSync, ...e });
|
|
1474
1670
|
}
|
|
1475
|
-
function
|
|
1476
|
-
return /* @__PURE__ */
|
|
1477
|
-
|
|
1671
|
+
function kn({ theme: e = We, store: t, router: n }) {
|
|
1672
|
+
return /* @__PURE__ */ A(Ue, { injectFirst: !0, children: /* @__PURE__ */ A(Ae, { theme: e, children: /* @__PURE__ */ A(Ve, { store: t, children: /* @__PURE__ */ A(
|
|
1673
|
+
Be,
|
|
1478
1674
|
{
|
|
1479
|
-
fallback: /* @__PURE__ */
|
|
1480
|
-
|
|
1675
|
+
fallback: /* @__PURE__ */ A(
|
|
1676
|
+
je,
|
|
1481
1677
|
{
|
|
1482
1678
|
loading: !0,
|
|
1483
1679
|
message: "..."
|
|
1484
1680
|
}
|
|
1485
1681
|
),
|
|
1486
|
-
children: /* @__PURE__ */
|
|
1682
|
+
children: /* @__PURE__ */ A(En, { router: n })
|
|
1487
1683
|
}
|
|
1488
1684
|
) }) }) });
|
|
1489
1685
|
}
|
|
1490
1686
|
export {
|
|
1491
|
-
|
|
1687
|
+
kn as default
|
|
1492
1688
|
};
|