zudoku 0.3.0-dev.20 → 0.3.0-dev.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/config.d.ts +1 -1
- package/dist/lib/authentication/authentication.d.ts +1 -1
- package/dist/lib/plugins/api-keys/index.js +1 -0
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/markdown/generateRoutes.js +1 -1
- package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +1 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/Route.d.ts +6 -0
- package/dist/lib/plugins/openapi/Route.js +8 -0
- package/dist/lib/plugins/openapi/Route.js.map +1 -0
- package/dist/lib/plugins/openapi/context.d.ts +5 -0
- package/dist/lib/plugins/openapi/context.js +11 -0
- package/dist/lib/plugins/openapi/context.js.map +1 -0
- package/dist/lib/plugins/openapi/index.d.ts +1 -19
- package/dist/lib/plugins/openapi/index.js +17 -18
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +15 -0
- package/dist/lib/plugins/openapi/interfaces.js +2 -0
- package/dist/lib/plugins/openapi/interfaces.js.map +1 -0
- package/dist/vite/build.js +4 -1
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +7 -7
- package/dist/vite/config.js +33 -38
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +6 -3
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/dev-server.js +3 -3
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-api-keys.js +2 -2
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.js +2 -2
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.js +2 -2
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +1 -1
- package/dist/vite/plugin-config.js +7 -6
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-redirect.js +2 -2
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/lib/{util-voKLTRDG.js → AnchorLink-DIUlXlf0.js} +149 -184
- package/lib/DevPortalProvider-gzyAGqHT.js +1080 -0
- package/lib/{Markdown-5LmPZyLV.js → Markdown-BjA7peYW.js} +3 -3
- package/lib/{MdxComponents-DYD_QPVF.js → MdxComponents-W-fE1ISO.js} +130 -129
- package/lib/MdxPage-DQ7lZBzE.js +216 -0
- package/lib/OperationList-DuIBqFNA.js +5545 -0
- package/lib/Route-B98Y2MdH.js +13 -0
- package/lib/{Select-DR3PiqjV.js → Select-DczD5e29.js} +24 -22
- package/lib/{Spinner-DjQ2eBxC.js → Spinner-CSoij67T.js} +3 -3
- package/lib/cn-DpqTslo9.js +2341 -0
- package/lib/context-_fYfJFgk.js +13 -0
- package/lib/{hook-FCY9-FHO.js → hook-CBXxHulF.js} +1 -1
- package/lib/{index-By9bEW57.js → index-C7O9D7f6.js} +15 -15
- package/lib/index-CKvOcM7w.js +712 -0
- package/lib/index-Cg6lXS1z.js +709 -0
- package/lib/index-ClDDiRmC.js +463 -0
- package/lib/router-DibNxKUP.js +3008 -0
- package/lib/util-CaVongBq.js +40 -0
- package/lib/zudoku.auth-openid.js +7 -6
- package/lib/zudoku.components.js +73 -69
- package/lib/zudoku.plugin-api-keys.js +26 -23
- package/lib/zudoku.plugin-markdown.js +33 -237
- package/lib/zudoku.plugin-openapi.js +5 -6238
- package/lib/zudoku.plugin-redirect.js +7 -6
- package/package.json +1 -2
- package/src/lib/authentication/authentication.ts +1 -1
- package/src/lib/plugins/api-keys/index.tsx +1 -0
- package/src/lib/plugins/markdown/generateRoutes.tsx +2 -2
- package/src/lib/plugins/openapi/OperationList.tsx +1 -1
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +1 -1
- package/src/lib/plugins/openapi/Route.tsx +21 -0
- package/src/lib/plugins/openapi/context.tsx +16 -0
- package/src/lib/plugins/openapi/index.tsx +19 -46
- package/src/lib/plugins/openapi/interfaces.ts +9 -0
- package/lib/DevPortalProvider-CRKuwoXc.js +0 -4123
- package/lib/index-PyGcnQFX.js +0 -3462
package/lib/index-PyGcnQFX.js
DELETED
|
@@ -1,3462 +0,0 @@
|
|
|
1
|
-
import * as P from "react";
|
|
2
|
-
import Pr from "react";
|
|
3
|
-
var Qt = { exports: {} }, ut = {};
|
|
4
|
-
/**
|
|
5
|
-
* @license React
|
|
6
|
-
* react-jsx-runtime.production.min.js
|
|
7
|
-
*
|
|
8
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
|
-
*
|
|
10
|
-
* This source code is licensed under the MIT license found in the
|
|
11
|
-
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/
|
|
13
|
-
var lr;
|
|
14
|
-
function Yr() {
|
|
15
|
-
if (lr) return ut;
|
|
16
|
-
lr = 1;
|
|
17
|
-
var e = Pr, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, f = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
-
function l(h, c, E) {
|
|
19
|
-
var y, p = {}, R = null, U = null;
|
|
20
|
-
E !== void 0 && (R = "" + E), c.key !== void 0 && (R = "" + c.key), c.ref !== void 0 && (U = c.ref);
|
|
21
|
-
for (y in c) a.call(c, y) && !f.hasOwnProperty(y) && (p[y] = c[y]);
|
|
22
|
-
if (h && h.defaultProps) for (y in c = h.defaultProps, c) p[y] === void 0 && (p[y] = c[y]);
|
|
23
|
-
return { $$typeof: t, type: h, key: R, ref: U, props: p, _owner: o.current };
|
|
24
|
-
}
|
|
25
|
-
return ut.Fragment = r, ut.jsx = l, ut.jsxs = l, ut;
|
|
26
|
-
}
|
|
27
|
-
var ct = {};
|
|
28
|
-
/**
|
|
29
|
-
* @license React
|
|
30
|
-
* react-jsx-runtime.development.js
|
|
31
|
-
*
|
|
32
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the MIT license found in the
|
|
35
|
-
* LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/
|
|
37
|
-
var sr;
|
|
38
|
-
function Hr() {
|
|
39
|
-
return sr || (sr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
40
|
-
var e = Pr, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), h = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), U = Symbol.for("react.offscreen"), N = Symbol.iterator, S = "@@iterator";
|
|
41
|
-
function j(n) {
|
|
42
|
-
if (n === null || typeof n != "object")
|
|
43
|
-
return null;
|
|
44
|
-
var u = N && n[N] || n[S];
|
|
45
|
-
return typeof u == "function" ? u : null;
|
|
46
|
-
}
|
|
47
|
-
var L = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
48
|
-
function T(n) {
|
|
49
|
-
{
|
|
50
|
-
for (var u = arguments.length, g = new Array(u > 1 ? u - 1 : 0), b = 1; b < u; b++)
|
|
51
|
-
g[b - 1] = arguments[b];
|
|
52
|
-
q("error", n, g);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function q(n, u, g) {
|
|
56
|
-
{
|
|
57
|
-
var b = L.ReactDebugCurrentFrame, w = b.getStackAddendum();
|
|
58
|
-
w !== "" && (u += "%s", g = g.concat([w]));
|
|
59
|
-
var O = g.map(function(D) {
|
|
60
|
-
return String(D);
|
|
61
|
-
});
|
|
62
|
-
O.unshift("Warning: " + u), Function.prototype.apply.call(console[n], console, O);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
var ee = !1, oe = !1, m = !1, ie = !1, fe = !1, B;
|
|
66
|
-
B = Symbol.for("react.module.reference");
|
|
67
|
-
function re(n) {
|
|
68
|
-
return !!(typeof n == "string" || typeof n == "function" || n === a || n === f || fe || n === o || n === E || n === y || ie || n === U || ee || oe || m || typeof n == "object" && n !== null && (n.$$typeof === R || n.$$typeof === p || n.$$typeof === l || n.$$typeof === h || n.$$typeof === c || // This needs to include all possible module reference object
|
|
69
|
-
// types supported by any Flight configuration anywhere since
|
|
70
|
-
// we don't know which Flight build this will end up being used
|
|
71
|
-
// with.
|
|
72
|
-
n.$$typeof === B || n.getModuleId !== void 0));
|
|
73
|
-
}
|
|
74
|
-
function X(n, u, g) {
|
|
75
|
-
var b = n.displayName;
|
|
76
|
-
if (b)
|
|
77
|
-
return b;
|
|
78
|
-
var w = u.displayName || u.name || "";
|
|
79
|
-
return w !== "" ? g + "(" + w + ")" : g;
|
|
80
|
-
}
|
|
81
|
-
function se(n) {
|
|
82
|
-
return n.displayName || "Context";
|
|
83
|
-
}
|
|
84
|
-
function J(n) {
|
|
85
|
-
if (n == null)
|
|
86
|
-
return null;
|
|
87
|
-
if (typeof n.tag == "number" && T("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof n == "function")
|
|
88
|
-
return n.displayName || n.name || null;
|
|
89
|
-
if (typeof n == "string")
|
|
90
|
-
return n;
|
|
91
|
-
switch (n) {
|
|
92
|
-
case a:
|
|
93
|
-
return "Fragment";
|
|
94
|
-
case r:
|
|
95
|
-
return "Portal";
|
|
96
|
-
case f:
|
|
97
|
-
return "Profiler";
|
|
98
|
-
case o:
|
|
99
|
-
return "StrictMode";
|
|
100
|
-
case E:
|
|
101
|
-
return "Suspense";
|
|
102
|
-
case y:
|
|
103
|
-
return "SuspenseList";
|
|
104
|
-
}
|
|
105
|
-
if (typeof n == "object")
|
|
106
|
-
switch (n.$$typeof) {
|
|
107
|
-
case h:
|
|
108
|
-
var u = n;
|
|
109
|
-
return se(u) + ".Consumer";
|
|
110
|
-
case l:
|
|
111
|
-
var g = n;
|
|
112
|
-
return se(g._context) + ".Provider";
|
|
113
|
-
case c:
|
|
114
|
-
return X(n, n.render, "ForwardRef");
|
|
115
|
-
case p:
|
|
116
|
-
var b = n.displayName || null;
|
|
117
|
-
return b !== null ? b : J(n.type) || "Memo";
|
|
118
|
-
case R: {
|
|
119
|
-
var w = n, O = w._payload, D = w._init;
|
|
120
|
-
try {
|
|
121
|
-
return J(D(O));
|
|
122
|
-
} catch {
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
var z = Object.assign, he = 0, We, $, ze, Te, Se, pe, _e;
|
|
130
|
-
function Me() {
|
|
131
|
-
}
|
|
132
|
-
Me.__reactDisabledLog = !0;
|
|
133
|
-
function ge() {
|
|
134
|
-
{
|
|
135
|
-
if (he === 0) {
|
|
136
|
-
We = console.log, $ = console.info, ze = console.warn, Te = console.error, Se = console.group, pe = console.groupCollapsed, _e = console.groupEnd;
|
|
137
|
-
var n = {
|
|
138
|
-
configurable: !0,
|
|
139
|
-
enumerable: !0,
|
|
140
|
-
value: Me,
|
|
141
|
-
writable: !0
|
|
142
|
-
};
|
|
143
|
-
Object.defineProperties(console, {
|
|
144
|
-
info: n,
|
|
145
|
-
log: n,
|
|
146
|
-
warn: n,
|
|
147
|
-
error: n,
|
|
148
|
-
group: n,
|
|
149
|
-
groupCollapsed: n,
|
|
150
|
-
groupEnd: n
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
he++;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
function Pe() {
|
|
157
|
-
{
|
|
158
|
-
if (he--, he === 0) {
|
|
159
|
-
var n = {
|
|
160
|
-
configurable: !0,
|
|
161
|
-
enumerable: !0,
|
|
162
|
-
writable: !0
|
|
163
|
-
};
|
|
164
|
-
Object.defineProperties(console, {
|
|
165
|
-
log: z({}, n, {
|
|
166
|
-
value: We
|
|
167
|
-
}),
|
|
168
|
-
info: z({}, n, {
|
|
169
|
-
value: $
|
|
170
|
-
}),
|
|
171
|
-
warn: z({}, n, {
|
|
172
|
-
value: ze
|
|
173
|
-
}),
|
|
174
|
-
error: z({}, n, {
|
|
175
|
-
value: Te
|
|
176
|
-
}),
|
|
177
|
-
group: z({}, n, {
|
|
178
|
-
value: Se
|
|
179
|
-
}),
|
|
180
|
-
groupCollapsed: z({}, n, {
|
|
181
|
-
value: pe
|
|
182
|
-
}),
|
|
183
|
-
groupEnd: z({}, n, {
|
|
184
|
-
value: _e
|
|
185
|
-
})
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
he < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
var ye = L.ReactCurrentDispatcher, nt;
|
|
192
|
-
function Le(n, u, g) {
|
|
193
|
-
{
|
|
194
|
-
if (nt === void 0)
|
|
195
|
-
try {
|
|
196
|
-
throw Error();
|
|
197
|
-
} catch (w) {
|
|
198
|
-
var b = w.stack.trim().match(/\n( *(at )?)/);
|
|
199
|
-
nt = b && b[1] || "";
|
|
200
|
-
}
|
|
201
|
-
return `
|
|
202
|
-
` + nt + n;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
var at = !1, qe;
|
|
206
|
-
{
|
|
207
|
-
var Vt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
208
|
-
qe = new Vt();
|
|
209
|
-
}
|
|
210
|
-
function Q(n, u) {
|
|
211
|
-
if (!n || at)
|
|
212
|
-
return "";
|
|
213
|
-
{
|
|
214
|
-
var g = qe.get(n);
|
|
215
|
-
if (g !== void 0)
|
|
216
|
-
return g;
|
|
217
|
-
}
|
|
218
|
-
var b;
|
|
219
|
-
at = !0;
|
|
220
|
-
var w = Error.prepareStackTrace;
|
|
221
|
-
Error.prepareStackTrace = void 0;
|
|
222
|
-
var O;
|
|
223
|
-
O = ye.current, ye.current = null, ge();
|
|
224
|
-
try {
|
|
225
|
-
if (u) {
|
|
226
|
-
var D = function() {
|
|
227
|
-
throw Error();
|
|
228
|
-
};
|
|
229
|
-
if (Object.defineProperty(D.prototype, "props", {
|
|
230
|
-
set: function() {
|
|
231
|
-
throw Error();
|
|
232
|
-
}
|
|
233
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
234
|
-
try {
|
|
235
|
-
Reflect.construct(D, []);
|
|
236
|
-
} catch (K) {
|
|
237
|
-
b = K;
|
|
238
|
-
}
|
|
239
|
-
Reflect.construct(n, [], D);
|
|
240
|
-
} else {
|
|
241
|
-
try {
|
|
242
|
-
D.call();
|
|
243
|
-
} catch (K) {
|
|
244
|
-
b = K;
|
|
245
|
-
}
|
|
246
|
-
n.call(D.prototype);
|
|
247
|
-
}
|
|
248
|
-
} else {
|
|
249
|
-
try {
|
|
250
|
-
throw Error();
|
|
251
|
-
} catch (K) {
|
|
252
|
-
b = K;
|
|
253
|
-
}
|
|
254
|
-
n();
|
|
255
|
-
}
|
|
256
|
-
} catch (K) {
|
|
257
|
-
if (K && b && typeof K.stack == "string") {
|
|
258
|
-
for (var _ = K.stack.split(`
|
|
259
|
-
`), F = b.stack.split(`
|
|
260
|
-
`), I = _.length - 1, A = F.length - 1; I >= 1 && A >= 0 && _[I] !== F[A]; )
|
|
261
|
-
A--;
|
|
262
|
-
for (; I >= 1 && A >= 0; I--, A--)
|
|
263
|
-
if (_[I] !== F[A]) {
|
|
264
|
-
if (I !== 1 || A !== 1)
|
|
265
|
-
do
|
|
266
|
-
if (I--, A--, A < 0 || _[I] !== F[A]) {
|
|
267
|
-
var Z = `
|
|
268
|
-
` + _[I].replace(" at new ", " at ");
|
|
269
|
-
return n.displayName && Z.includes("<anonymous>") && (Z = Z.replace("<anonymous>", n.displayName)), typeof n == "function" && qe.set(n, Z), Z;
|
|
270
|
-
}
|
|
271
|
-
while (I >= 1 && A >= 0);
|
|
272
|
-
break;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
} finally {
|
|
276
|
-
at = !1, ye.current = O, Pe(), Error.prepareStackTrace = w;
|
|
277
|
-
}
|
|
278
|
-
var ne = n ? n.displayName || n.name : "", le = ne ? Le(ne) : "";
|
|
279
|
-
return typeof n == "function" && qe.set(n, le), le;
|
|
280
|
-
}
|
|
281
|
-
function Fe(n, u, g) {
|
|
282
|
-
return Q(n, !1);
|
|
283
|
-
}
|
|
284
|
-
function bt(n) {
|
|
285
|
-
var u = n.prototype;
|
|
286
|
-
return !!(u && u.isReactComponent);
|
|
287
|
-
}
|
|
288
|
-
function Qe(n, u, g) {
|
|
289
|
-
if (n == null)
|
|
290
|
-
return "";
|
|
291
|
-
if (typeof n == "function")
|
|
292
|
-
return Q(n, bt(n));
|
|
293
|
-
if (typeof n == "string")
|
|
294
|
-
return Le(n);
|
|
295
|
-
switch (n) {
|
|
296
|
-
case E:
|
|
297
|
-
return Le("Suspense");
|
|
298
|
-
case y:
|
|
299
|
-
return Le("SuspenseList");
|
|
300
|
-
}
|
|
301
|
-
if (typeof n == "object")
|
|
302
|
-
switch (n.$$typeof) {
|
|
303
|
-
case c:
|
|
304
|
-
return Fe(n.render);
|
|
305
|
-
case p:
|
|
306
|
-
return Qe(n.type, u, g);
|
|
307
|
-
case R: {
|
|
308
|
-
var b = n, w = b._payload, O = b._init;
|
|
309
|
-
try {
|
|
310
|
-
return Qe(O(w), u, g);
|
|
311
|
-
} catch {
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
return "";
|
|
316
|
-
}
|
|
317
|
-
var ue = Object.prototype.hasOwnProperty, Rt = {}, wt = L.ReactDebugCurrentFrame;
|
|
318
|
-
function $e(n) {
|
|
319
|
-
if (n) {
|
|
320
|
-
var u = n._owner, g = Qe(n.type, n._source, u ? u.type : null);
|
|
321
|
-
wt.setExtraStackFrame(g);
|
|
322
|
-
} else
|
|
323
|
-
wt.setExtraStackFrame(null);
|
|
324
|
-
}
|
|
325
|
-
function Wt(n, u, g, b, w) {
|
|
326
|
-
{
|
|
327
|
-
var O = Function.call.bind(ue);
|
|
328
|
-
for (var D in n)
|
|
329
|
-
if (O(n, D)) {
|
|
330
|
-
var _ = void 0;
|
|
331
|
-
try {
|
|
332
|
-
if (typeof n[D] != "function") {
|
|
333
|
-
var F = Error((b || "React class") + ": " + g + " type `" + D + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[D] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
334
|
-
throw F.name = "Invariant Violation", F;
|
|
335
|
-
}
|
|
336
|
-
_ = n[D](u, D, b, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
337
|
-
} catch (I) {
|
|
338
|
-
_ = I;
|
|
339
|
-
}
|
|
340
|
-
_ && !(_ instanceof Error) && ($e(w), T("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", b || "React class", g, D, typeof _), $e(null)), _ instanceof Error && !(_.message in Rt) && (Rt[_.message] = !0, $e(w), T("Failed %s type: %s", g, _.message), $e(null));
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
var zt = Array.isArray;
|
|
345
|
-
function ot(n) {
|
|
346
|
-
return zt(n);
|
|
347
|
-
}
|
|
348
|
-
function $t(n) {
|
|
349
|
-
{
|
|
350
|
-
var u = typeof Symbol == "function" && Symbol.toStringTag, g = u && n[Symbol.toStringTag] || n.constructor.name || "Object";
|
|
351
|
-
return g;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
function Ye(n) {
|
|
355
|
-
try {
|
|
356
|
-
return je(n), !1;
|
|
357
|
-
} catch {
|
|
358
|
-
return !0;
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
function je(n) {
|
|
362
|
-
return "" + n;
|
|
363
|
-
}
|
|
364
|
-
function it(n) {
|
|
365
|
-
if (Ye(n))
|
|
366
|
-
return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", $t(n)), je(n);
|
|
367
|
-
}
|
|
368
|
-
var Ce = L.ReactCurrentOwner, be = {
|
|
369
|
-
key: !0,
|
|
370
|
-
ref: !0,
|
|
371
|
-
__self: !0,
|
|
372
|
-
__source: !0
|
|
373
|
-
}, ve, lt, Ue;
|
|
374
|
-
Ue = {};
|
|
375
|
-
function Yt(n) {
|
|
376
|
-
if (ue.call(n, "ref")) {
|
|
377
|
-
var u = Object.getOwnPropertyDescriptor(n, "ref").get;
|
|
378
|
-
if (u && u.isReactWarning)
|
|
379
|
-
return !1;
|
|
380
|
-
}
|
|
381
|
-
return n.ref !== void 0;
|
|
382
|
-
}
|
|
383
|
-
function Re(n) {
|
|
384
|
-
if (ue.call(n, "key")) {
|
|
385
|
-
var u = Object.getOwnPropertyDescriptor(n, "key").get;
|
|
386
|
-
if (u && u.isReactWarning)
|
|
387
|
-
return !1;
|
|
388
|
-
}
|
|
389
|
-
return n.key !== void 0;
|
|
390
|
-
}
|
|
391
|
-
function xt(n, u) {
|
|
392
|
-
if (typeof n.ref == "string" && Ce.current && u && Ce.current.stateNode !== u) {
|
|
393
|
-
var g = J(Ce.current.type);
|
|
394
|
-
Ue[g] || (T('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', J(Ce.current.type), n.ref), Ue[g] = !0);
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
function Dt(n, u) {
|
|
398
|
-
{
|
|
399
|
-
var g = function() {
|
|
400
|
-
ve || (ve = !0, T("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", u));
|
|
401
|
-
};
|
|
402
|
-
g.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
403
|
-
get: g,
|
|
404
|
-
configurable: !0
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
function St(n, u) {
|
|
409
|
-
{
|
|
410
|
-
var g = function() {
|
|
411
|
-
lt || (lt = !0, T("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", u));
|
|
412
|
-
};
|
|
413
|
-
g.isReactWarning = !0, Object.defineProperty(n, "ref", {
|
|
414
|
-
get: g,
|
|
415
|
-
configurable: !0
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
var Ht = function(n, u, g, b, w, O, D) {
|
|
420
|
-
var _ = {
|
|
421
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
422
|
-
$$typeof: t,
|
|
423
|
-
// Built-in properties that belong on the element
|
|
424
|
-
type: n,
|
|
425
|
-
key: u,
|
|
426
|
-
ref: g,
|
|
427
|
-
props: D,
|
|
428
|
-
// Record the component responsible for creating this element.
|
|
429
|
-
_owner: O
|
|
430
|
-
};
|
|
431
|
-
return _._store = {}, Object.defineProperty(_._store, "validated", {
|
|
432
|
-
configurable: !1,
|
|
433
|
-
enumerable: !1,
|
|
434
|
-
writable: !0,
|
|
435
|
-
value: !1
|
|
436
|
-
}), Object.defineProperty(_, "_self", {
|
|
437
|
-
configurable: !1,
|
|
438
|
-
enumerable: !1,
|
|
439
|
-
writable: !1,
|
|
440
|
-
value: b
|
|
441
|
-
}), Object.defineProperty(_, "_source", {
|
|
442
|
-
configurable: !1,
|
|
443
|
-
enumerable: !1,
|
|
444
|
-
writable: !1,
|
|
445
|
-
value: w
|
|
446
|
-
}), Object.freeze && (Object.freeze(_.props), Object.freeze(_)), _;
|
|
447
|
-
};
|
|
448
|
-
function _t(n, u, g, b, w) {
|
|
449
|
-
{
|
|
450
|
-
var O, D = {}, _ = null, F = null;
|
|
451
|
-
g !== void 0 && (it(g), _ = "" + g), Re(u) && (it(u.key), _ = "" + u.key), Yt(u) && (F = u.ref, xt(u, w));
|
|
452
|
-
for (O in u)
|
|
453
|
-
ue.call(u, O) && !be.hasOwnProperty(O) && (D[O] = u[O]);
|
|
454
|
-
if (n && n.defaultProps) {
|
|
455
|
-
var I = n.defaultProps;
|
|
456
|
-
for (O in I)
|
|
457
|
-
D[O] === void 0 && (D[O] = I[O]);
|
|
458
|
-
}
|
|
459
|
-
if (_ || F) {
|
|
460
|
-
var A = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
|
|
461
|
-
_ && Dt(D, A), F && St(D, A);
|
|
462
|
-
}
|
|
463
|
-
return Ht(n, _, F, w, b, Ce.current, D);
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
var Ae = L.ReactCurrentOwner, st = L.ReactDebugCurrentFrame;
|
|
467
|
-
function we(n) {
|
|
468
|
-
if (n) {
|
|
469
|
-
var u = n._owner, g = Qe(n.type, n._source, u ? u.type : null);
|
|
470
|
-
st.setExtraStackFrame(g);
|
|
471
|
-
} else
|
|
472
|
-
st.setExtraStackFrame(null);
|
|
473
|
-
}
|
|
474
|
-
var Ie;
|
|
475
|
-
Ie = !1;
|
|
476
|
-
function He(n) {
|
|
477
|
-
return typeof n == "object" && n !== null && n.$$typeof === t;
|
|
478
|
-
}
|
|
479
|
-
function Pt() {
|
|
480
|
-
{
|
|
481
|
-
if (Ae.current) {
|
|
482
|
-
var n = J(Ae.current.type);
|
|
483
|
-
if (n)
|
|
484
|
-
return `
|
|
485
|
-
|
|
486
|
-
Check the render method of \`` + n + "`.";
|
|
487
|
-
}
|
|
488
|
-
return "";
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
function Ct(n) {
|
|
492
|
-
return "";
|
|
493
|
-
}
|
|
494
|
-
var Ot = {};
|
|
495
|
-
function Nt(n) {
|
|
496
|
-
{
|
|
497
|
-
var u = Pt();
|
|
498
|
-
if (!u) {
|
|
499
|
-
var g = typeof n == "string" ? n : n.displayName || n.name;
|
|
500
|
-
g && (u = `
|
|
501
|
-
|
|
502
|
-
Check the top-level render call using <` + g + ">.");
|
|
503
|
-
}
|
|
504
|
-
return u;
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
function Ze(n, u) {
|
|
508
|
-
{
|
|
509
|
-
if (!n._store || n._store.validated || n.key != null)
|
|
510
|
-
return;
|
|
511
|
-
n._store.validated = !0;
|
|
512
|
-
var g = Nt(u);
|
|
513
|
-
if (Ot[g])
|
|
514
|
-
return;
|
|
515
|
-
Ot[g] = !0;
|
|
516
|
-
var b = "";
|
|
517
|
-
n && n._owner && n._owner !== Ae.current && (b = " It was passed a child from " + J(n._owner.type) + "."), we(n), T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, b), we(null);
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
function Je(n, u) {
|
|
521
|
-
{
|
|
522
|
-
if (typeof n != "object")
|
|
523
|
-
return;
|
|
524
|
-
if (ot(n))
|
|
525
|
-
for (var g = 0; g < n.length; g++) {
|
|
526
|
-
var b = n[g];
|
|
527
|
-
He(b) && Ze(b, u);
|
|
528
|
-
}
|
|
529
|
-
else if (He(n))
|
|
530
|
-
n._store && (n._store.validated = !0);
|
|
531
|
-
else if (n) {
|
|
532
|
-
var w = j(n);
|
|
533
|
-
if (typeof w == "function" && w !== n.entries)
|
|
534
|
-
for (var O = w.call(n), D; !(D = O.next()).done; )
|
|
535
|
-
He(D.value) && Ze(D.value, u);
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
function Jt(n) {
|
|
540
|
-
{
|
|
541
|
-
var u = n.type;
|
|
542
|
-
if (u == null || typeof u == "string")
|
|
543
|
-
return;
|
|
544
|
-
var g;
|
|
545
|
-
if (typeof u == "function")
|
|
546
|
-
g = u.propTypes;
|
|
547
|
-
else if (typeof u == "object" && (u.$$typeof === c || // Note: Memo only checks outer props here.
|
|
548
|
-
// Inner props are checked in the reconciler.
|
|
549
|
-
u.$$typeof === p))
|
|
550
|
-
g = u.propTypes;
|
|
551
|
-
else
|
|
552
|
-
return;
|
|
553
|
-
if (g) {
|
|
554
|
-
var b = J(u);
|
|
555
|
-
Wt(g, n.props, "prop", b, n);
|
|
556
|
-
} else if (u.PropTypes !== void 0 && !Ie) {
|
|
557
|
-
Ie = !0;
|
|
558
|
-
var w = J(u);
|
|
559
|
-
T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", w || "Unknown");
|
|
560
|
-
}
|
|
561
|
-
typeof u.getDefaultProps == "function" && !u.getDefaultProps.isReactClassApproved && T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
function Kt(n) {
|
|
565
|
-
{
|
|
566
|
-
for (var u = Object.keys(n.props), g = 0; g < u.length; g++) {
|
|
567
|
-
var b = u[g];
|
|
568
|
-
if (b !== "children" && b !== "key") {
|
|
569
|
-
we(n), T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", b), we(null);
|
|
570
|
-
break;
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
n.ref !== null && (we(n), T("Invalid attribute `ref` supplied to `React.Fragment`."), we(null));
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
var i = {};
|
|
577
|
-
function s(n, u, g, b, w, O) {
|
|
578
|
-
{
|
|
579
|
-
var D = re(n);
|
|
580
|
-
if (!D) {
|
|
581
|
-
var _ = "";
|
|
582
|
-
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (_ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
583
|
-
var F = Ct();
|
|
584
|
-
F ? _ += F : _ += Pt();
|
|
585
|
-
var I;
|
|
586
|
-
n === null ? I = "null" : ot(n) ? I = "array" : n !== void 0 && n.$$typeof === t ? (I = "<" + (J(n.type) || "Unknown") + " />", _ = " Did you accidentally export a JSX literal instead of a component?") : I = typeof n, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", I, _);
|
|
587
|
-
}
|
|
588
|
-
var A = _t(n, u, g, w, O);
|
|
589
|
-
if (A == null)
|
|
590
|
-
return A;
|
|
591
|
-
if (D) {
|
|
592
|
-
var Z = u.children;
|
|
593
|
-
if (Z !== void 0)
|
|
594
|
-
if (b)
|
|
595
|
-
if (ot(Z)) {
|
|
596
|
-
for (var ne = 0; ne < Z.length; ne++)
|
|
597
|
-
Je(Z[ne], n);
|
|
598
|
-
Object.freeze && Object.freeze(Z);
|
|
599
|
-
} else
|
|
600
|
-
T("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
601
|
-
else
|
|
602
|
-
Je(Z, n);
|
|
603
|
-
}
|
|
604
|
-
if (ue.call(u, "key")) {
|
|
605
|
-
var le = J(n), K = Object.keys(u).filter(function(et) {
|
|
606
|
-
return et !== "key";
|
|
607
|
-
}), xe = K.length > 0 ? "{key: someKey, " + K.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
608
|
-
if (!i[le + xe]) {
|
|
609
|
-
var me = K.length > 0 ? "{" + K.join(": ..., ") + ": ...}" : "{}";
|
|
610
|
-
T(`A props object containing a "key" prop is being spread into JSX:
|
|
611
|
-
let props = %s;
|
|
612
|
-
<%s {...props} />
|
|
613
|
-
React keys must be passed directly to JSX without using spread:
|
|
614
|
-
let props = %s;
|
|
615
|
-
<%s key={someKey} {...props} />`, xe, le, me, le), i[le + xe] = !0;
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
return n === a ? Kt(A) : Jt(A), A;
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
function d(n, u, g) {
|
|
622
|
-
return s(n, u, g, !0);
|
|
623
|
-
}
|
|
624
|
-
function v(n, u, g) {
|
|
625
|
-
return s(n, u, g, !1);
|
|
626
|
-
}
|
|
627
|
-
var x = v, C = d;
|
|
628
|
-
ct.Fragment = a, ct.jsx = x, ct.jsxs = C;
|
|
629
|
-
}()), ct;
|
|
630
|
-
}
|
|
631
|
-
process.env.NODE_ENV === "production" ? Qt.exports = Yr() : Qt.exports = Hr();
|
|
632
|
-
var oa = Qt.exports;
|
|
633
|
-
/**
|
|
634
|
-
* @remix-run/router v1.17.1
|
|
635
|
-
*
|
|
636
|
-
* Copyright (c) Remix Software Inc.
|
|
637
|
-
*
|
|
638
|
-
* This source code is licensed under the MIT license found in the
|
|
639
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
640
|
-
*
|
|
641
|
-
* @license MIT
|
|
642
|
-
*/
|
|
643
|
-
function Y() {
|
|
644
|
-
return Y = Object.assign ? Object.assign.bind() : function(e) {
|
|
645
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
646
|
-
var r = arguments[t];
|
|
647
|
-
for (var a in r)
|
|
648
|
-
Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]);
|
|
649
|
-
}
|
|
650
|
-
return e;
|
|
651
|
-
}, Y.apply(this, arguments);
|
|
652
|
-
}
|
|
653
|
-
var G;
|
|
654
|
-
(function(e) {
|
|
655
|
-
e.Pop = "POP", e.Push = "PUSH", e.Replace = "REPLACE";
|
|
656
|
-
})(G || (G = {}));
|
|
657
|
-
const ur = "popstate";
|
|
658
|
-
function ia(e) {
|
|
659
|
-
e === void 0 && (e = {});
|
|
660
|
-
function t(a, o) {
|
|
661
|
-
let {
|
|
662
|
-
pathname: f,
|
|
663
|
-
search: l,
|
|
664
|
-
hash: h
|
|
665
|
-
} = a.location;
|
|
666
|
-
return vt(
|
|
667
|
-
"",
|
|
668
|
-
{
|
|
669
|
-
pathname: f,
|
|
670
|
-
search: l,
|
|
671
|
-
hash: h
|
|
672
|
-
},
|
|
673
|
-
// state defaults to `null` because `window.history.state` does
|
|
674
|
-
o.state && o.state.usr || null,
|
|
675
|
-
o.state && o.state.key || "default"
|
|
676
|
-
);
|
|
677
|
-
}
|
|
678
|
-
function r(a, o) {
|
|
679
|
-
return typeof o == "string" ? o : yt(o);
|
|
680
|
-
}
|
|
681
|
-
return Kr(t, r, null, e);
|
|
682
|
-
}
|
|
683
|
-
function M(e, t) {
|
|
684
|
-
if (e === !1 || e === null || typeof e > "u")
|
|
685
|
-
throw new Error(t);
|
|
686
|
-
}
|
|
687
|
-
function te(e, t) {
|
|
688
|
-
if (!e) {
|
|
689
|
-
typeof console < "u" && console.warn(t);
|
|
690
|
-
try {
|
|
691
|
-
throw new Error(t);
|
|
692
|
-
} catch {
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
function Jr() {
|
|
697
|
-
return Math.random().toString(36).substr(2, 8);
|
|
698
|
-
}
|
|
699
|
-
function cr(e, t) {
|
|
700
|
-
return {
|
|
701
|
-
usr: e.state,
|
|
702
|
-
key: e.key,
|
|
703
|
-
idx: t
|
|
704
|
-
};
|
|
705
|
-
}
|
|
706
|
-
function vt(e, t, r, a) {
|
|
707
|
-
return r === void 0 && (r = null), Y({
|
|
708
|
-
pathname: typeof e == "string" ? e : e.pathname,
|
|
709
|
-
search: "",
|
|
710
|
-
hash: ""
|
|
711
|
-
}, typeof t == "string" ? Be(t) : t, {
|
|
712
|
-
state: r,
|
|
713
|
-
// TODO: This could be cleaned up. push/replace should probably just take
|
|
714
|
-
// full Locations now and avoid the need to run through this flow at all
|
|
715
|
-
// But that's a pretty big refactor to the current test suite so going to
|
|
716
|
-
// keep as is for the time being and just let any incoming keys take precedence
|
|
717
|
-
key: t && t.key || a || Jr()
|
|
718
|
-
});
|
|
719
|
-
}
|
|
720
|
-
function yt(e) {
|
|
721
|
-
let {
|
|
722
|
-
pathname: t = "/",
|
|
723
|
-
search: r = "",
|
|
724
|
-
hash: a = ""
|
|
725
|
-
} = e;
|
|
726
|
-
return r && r !== "?" && (t += r.charAt(0) === "?" ? r : "?" + r), a && a !== "#" && (t += a.charAt(0) === "#" ? a : "#" + a), t;
|
|
727
|
-
}
|
|
728
|
-
function Be(e) {
|
|
729
|
-
let t = {};
|
|
730
|
-
if (e) {
|
|
731
|
-
let r = e.indexOf("#");
|
|
732
|
-
r >= 0 && (t.hash = e.substr(r), e = e.substr(0, r));
|
|
733
|
-
let a = e.indexOf("?");
|
|
734
|
-
a >= 0 && (t.search = e.substr(a), e = e.substr(0, a)), e && (t.pathname = e);
|
|
735
|
-
}
|
|
736
|
-
return t;
|
|
737
|
-
}
|
|
738
|
-
function Kr(e, t, r, a) {
|
|
739
|
-
a === void 0 && (a = {});
|
|
740
|
-
let {
|
|
741
|
-
window: o = document.defaultView,
|
|
742
|
-
v5Compat: f = !1
|
|
743
|
-
} = a, l = o.history, h = G.Pop, c = null, E = y();
|
|
744
|
-
E == null && (E = 0, l.replaceState(Y({}, l.state, {
|
|
745
|
-
idx: E
|
|
746
|
-
}), ""));
|
|
747
|
-
function y() {
|
|
748
|
-
return (l.state || {
|
|
749
|
-
idx: null
|
|
750
|
-
}).idx;
|
|
751
|
-
}
|
|
752
|
-
function p() {
|
|
753
|
-
h = G.Pop;
|
|
754
|
-
let j = y(), L = j == null ? null : j - E;
|
|
755
|
-
E = j, c && c({
|
|
756
|
-
action: h,
|
|
757
|
-
location: S.location,
|
|
758
|
-
delta: L
|
|
759
|
-
});
|
|
760
|
-
}
|
|
761
|
-
function R(j, L) {
|
|
762
|
-
h = G.Push;
|
|
763
|
-
let T = vt(S.location, j, L);
|
|
764
|
-
E = y() + 1;
|
|
765
|
-
let q = cr(T, E), ee = S.createHref(T);
|
|
766
|
-
try {
|
|
767
|
-
l.pushState(q, "", ee);
|
|
768
|
-
} catch (oe) {
|
|
769
|
-
if (oe instanceof DOMException && oe.name === "DataCloneError")
|
|
770
|
-
throw oe;
|
|
771
|
-
o.location.assign(ee);
|
|
772
|
-
}
|
|
773
|
-
f && c && c({
|
|
774
|
-
action: h,
|
|
775
|
-
location: S.location,
|
|
776
|
-
delta: 1
|
|
777
|
-
});
|
|
778
|
-
}
|
|
779
|
-
function U(j, L) {
|
|
780
|
-
h = G.Replace;
|
|
781
|
-
let T = vt(S.location, j, L);
|
|
782
|
-
E = y();
|
|
783
|
-
let q = cr(T, E), ee = S.createHref(T);
|
|
784
|
-
l.replaceState(q, "", ee), f && c && c({
|
|
785
|
-
action: h,
|
|
786
|
-
location: S.location,
|
|
787
|
-
delta: 0
|
|
788
|
-
});
|
|
789
|
-
}
|
|
790
|
-
function N(j) {
|
|
791
|
-
let L = o.location.origin !== "null" ? o.location.origin : o.location.href, T = typeof j == "string" ? j : yt(j);
|
|
792
|
-
return T = T.replace(/ $/, "%20"), M(L, "No window.location.(origin|href) available to create URL for href: " + T), new URL(T, L);
|
|
793
|
-
}
|
|
794
|
-
let S = {
|
|
795
|
-
get action() {
|
|
796
|
-
return h;
|
|
797
|
-
},
|
|
798
|
-
get location() {
|
|
799
|
-
return e(o, l);
|
|
800
|
-
},
|
|
801
|
-
listen(j) {
|
|
802
|
-
if (c)
|
|
803
|
-
throw new Error("A history only accepts one active listener");
|
|
804
|
-
return o.addEventListener(ur, p), c = j, () => {
|
|
805
|
-
o.removeEventListener(ur, p), c = null;
|
|
806
|
-
};
|
|
807
|
-
},
|
|
808
|
-
createHref(j) {
|
|
809
|
-
return t(o, j);
|
|
810
|
-
},
|
|
811
|
-
createURL: N,
|
|
812
|
-
encodeLocation(j) {
|
|
813
|
-
let L = N(j);
|
|
814
|
-
return {
|
|
815
|
-
pathname: L.pathname,
|
|
816
|
-
search: L.search,
|
|
817
|
-
hash: L.hash
|
|
818
|
-
};
|
|
819
|
-
},
|
|
820
|
-
push: R,
|
|
821
|
-
replace: U,
|
|
822
|
-
go(j) {
|
|
823
|
-
return l.go(j);
|
|
824
|
-
}
|
|
825
|
-
};
|
|
826
|
-
return S;
|
|
827
|
-
}
|
|
828
|
-
var W;
|
|
829
|
-
(function(e) {
|
|
830
|
-
e.data = "data", e.deferred = "deferred", e.redirect = "redirect", e.error = "error";
|
|
831
|
-
})(W || (W = {}));
|
|
832
|
-
const Gr = /* @__PURE__ */ new Set(["lazy", "caseSensitive", "path", "id", "index", "children"]);
|
|
833
|
-
function Xr(e) {
|
|
834
|
-
return e.index === !0;
|
|
835
|
-
}
|
|
836
|
-
function mt(e, t, r, a) {
|
|
837
|
-
return r === void 0 && (r = []), a === void 0 && (a = {}), e.map((o, f) => {
|
|
838
|
-
let l = [...r, String(f)], h = typeof o.id == "string" ? o.id : l.join("-");
|
|
839
|
-
if (M(o.index !== !0 || !o.children, "Cannot specify children on an index route"), M(!a[h], 'Found a route id collision on id "' + h + `". Route id's must be globally unique within Data Router usages`), Xr(o)) {
|
|
840
|
-
let c = Y({}, o, t(o), {
|
|
841
|
-
id: h
|
|
842
|
-
});
|
|
843
|
-
return a[h] = c, c;
|
|
844
|
-
} else {
|
|
845
|
-
let c = Y({}, o, t(o), {
|
|
846
|
-
id: h,
|
|
847
|
-
children: void 0
|
|
848
|
-
});
|
|
849
|
-
return a[h] = c, o.children && (c.children = mt(o.children, t, l, a)), c;
|
|
850
|
-
}
|
|
851
|
-
});
|
|
852
|
-
}
|
|
853
|
-
function Ke(e, t, r) {
|
|
854
|
-
return r === void 0 && (r = "/"), Lt(e, t, r, !1);
|
|
855
|
-
}
|
|
856
|
-
function Lt(e, t, r, a) {
|
|
857
|
-
let o = typeof t == "string" ? Be(t) : t, f = Et(o.pathname || "/", r);
|
|
858
|
-
if (f == null)
|
|
859
|
-
return null;
|
|
860
|
-
let l = Cr(e);
|
|
861
|
-
Qr(l);
|
|
862
|
-
let h = null;
|
|
863
|
-
for (let c = 0; h == null && c < l.length; ++c) {
|
|
864
|
-
let E = cn(f);
|
|
865
|
-
h = sn(l[c], E, a);
|
|
866
|
-
}
|
|
867
|
-
return h;
|
|
868
|
-
}
|
|
869
|
-
function qr(e, t) {
|
|
870
|
-
let {
|
|
871
|
-
route: r,
|
|
872
|
-
pathname: a,
|
|
873
|
-
params: o
|
|
874
|
-
} = e;
|
|
875
|
-
return {
|
|
876
|
-
id: r.id,
|
|
877
|
-
pathname: a,
|
|
878
|
-
params: o,
|
|
879
|
-
data: t[r.id],
|
|
880
|
-
handle: r.handle
|
|
881
|
-
};
|
|
882
|
-
}
|
|
883
|
-
function Cr(e, t, r, a) {
|
|
884
|
-
t === void 0 && (t = []), r === void 0 && (r = []), a === void 0 && (a = "");
|
|
885
|
-
let o = (f, l, h) => {
|
|
886
|
-
let c = {
|
|
887
|
-
relativePath: h === void 0 ? f.path || "" : h,
|
|
888
|
-
caseSensitive: f.caseSensitive === !0,
|
|
889
|
-
childrenIndex: l,
|
|
890
|
-
route: f
|
|
891
|
-
};
|
|
892
|
-
c.relativePath.startsWith("/") && (M(c.relativePath.startsWith(a), 'Absolute route path "' + c.relativePath + '" nested under path ' + ('"' + a + '" is not valid. An absolute child route path ') + "must start with the combined path of all its parent routes."), c.relativePath = c.relativePath.slice(a.length));
|
|
893
|
-
let E = Ne([a, c.relativePath]), y = r.concat(c);
|
|
894
|
-
f.children && f.children.length > 0 && (M(
|
|
895
|
-
// Our types know better, but runtime JS may not!
|
|
896
|
-
// @ts-expect-error
|
|
897
|
-
f.index !== !0,
|
|
898
|
-
"Index routes must not have child routes. Please remove " + ('all child routes from route path "' + E + '".')
|
|
899
|
-
), Cr(f.children, t, y, E)), !(f.path == null && !f.index) && t.push({
|
|
900
|
-
path: E,
|
|
901
|
-
score: on(E, f.index),
|
|
902
|
-
routesMeta: y
|
|
903
|
-
});
|
|
904
|
-
};
|
|
905
|
-
return e.forEach((f, l) => {
|
|
906
|
-
var h;
|
|
907
|
-
if (f.path === "" || !((h = f.path) != null && h.includes("?")))
|
|
908
|
-
o(f, l);
|
|
909
|
-
else
|
|
910
|
-
for (let c of Or(f.path))
|
|
911
|
-
o(f, l, c);
|
|
912
|
-
}), t;
|
|
913
|
-
}
|
|
914
|
-
function Or(e) {
|
|
915
|
-
let t = e.split("/");
|
|
916
|
-
if (t.length === 0) return [];
|
|
917
|
-
let [r, ...a] = t, o = r.endsWith("?"), f = r.replace(/\?$/, "");
|
|
918
|
-
if (a.length === 0)
|
|
919
|
-
return o ? [f, ""] : [f];
|
|
920
|
-
let l = Or(a.join("/")), h = [];
|
|
921
|
-
return h.push(...l.map((c) => c === "" ? f : [f, c].join("/"))), o && h.push(...l), h.map((c) => e.startsWith("/") && c === "" ? "/" : c);
|
|
922
|
-
}
|
|
923
|
-
function Qr(e) {
|
|
924
|
-
e.sort((t, r) => t.score !== r.score ? r.score - t.score : ln(t.routesMeta.map((a) => a.childrenIndex), r.routesMeta.map((a) => a.childrenIndex)));
|
|
925
|
-
}
|
|
926
|
-
const Zr = /^:[\w-]+$/, en = 3, tn = 2, rn = 1, nn = 10, an = -2, dr = (e) => e === "*";
|
|
927
|
-
function on(e, t) {
|
|
928
|
-
let r = e.split("/"), a = r.length;
|
|
929
|
-
return r.some(dr) && (a += an), t && (a += tn), r.filter((o) => !dr(o)).reduce((o, f) => o + (Zr.test(f) ? en : f === "" ? rn : nn), a);
|
|
930
|
-
}
|
|
931
|
-
function ln(e, t) {
|
|
932
|
-
return e.length === t.length && e.slice(0, -1).every((a, o) => a === t[o]) ? (
|
|
933
|
-
// If two routes are siblings, we should try to match the earlier sibling
|
|
934
|
-
// first. This allows people to have fine-grained control over the matching
|
|
935
|
-
// behavior by simply putting routes with identical paths in the order they
|
|
936
|
-
// want them tried.
|
|
937
|
-
e[e.length - 1] - t[t.length - 1]
|
|
938
|
-
) : (
|
|
939
|
-
// Otherwise, it doesn't really make sense to rank non-siblings by index,
|
|
940
|
-
// so they sort equally.
|
|
941
|
-
0
|
|
942
|
-
);
|
|
943
|
-
}
|
|
944
|
-
function sn(e, t, r) {
|
|
945
|
-
r === void 0 && (r = !1);
|
|
946
|
-
let {
|
|
947
|
-
routesMeta: a
|
|
948
|
-
} = e, o = {}, f = "/", l = [];
|
|
949
|
-
for (let h = 0; h < a.length; ++h) {
|
|
950
|
-
let c = a[h], E = h === a.length - 1, y = f === "/" ? t : t.slice(f.length) || "/", p = fr({
|
|
951
|
-
path: c.relativePath,
|
|
952
|
-
caseSensitive: c.caseSensitive,
|
|
953
|
-
end: E
|
|
954
|
-
}, y), R = c.route;
|
|
955
|
-
if (!p && E && r && !a[a.length - 1].route.index && (p = fr({
|
|
956
|
-
path: c.relativePath,
|
|
957
|
-
caseSensitive: c.caseSensitive,
|
|
958
|
-
end: !1
|
|
959
|
-
}, y)), !p)
|
|
960
|
-
return null;
|
|
961
|
-
Object.assign(o, p.params), l.push({
|
|
962
|
-
// TODO: Can this as be avoided?
|
|
963
|
-
params: o,
|
|
964
|
-
pathname: Ne([f, p.pathname]),
|
|
965
|
-
pathnameBase: hn(Ne([f, p.pathnameBase])),
|
|
966
|
-
route: R
|
|
967
|
-
}), p.pathnameBase !== "/" && (f = Ne([f, p.pathnameBase]));
|
|
968
|
-
}
|
|
969
|
-
return l;
|
|
970
|
-
}
|
|
971
|
-
function fr(e, t) {
|
|
972
|
-
typeof e == "string" && (e = {
|
|
973
|
-
path: e,
|
|
974
|
-
caseSensitive: !1,
|
|
975
|
-
end: !0
|
|
976
|
-
});
|
|
977
|
-
let [r, a] = un(e.path, e.caseSensitive, e.end), o = t.match(r);
|
|
978
|
-
if (!o) return null;
|
|
979
|
-
let f = o[0], l = f.replace(/(.)\/+$/, "$1"), h = o.slice(1);
|
|
980
|
-
return {
|
|
981
|
-
params: a.reduce((E, y, p) => {
|
|
982
|
-
let {
|
|
983
|
-
paramName: R,
|
|
984
|
-
isOptional: U
|
|
985
|
-
} = y;
|
|
986
|
-
if (R === "*") {
|
|
987
|
-
let S = h[p] || "";
|
|
988
|
-
l = f.slice(0, f.length - S.length).replace(/(.)\/+$/, "$1");
|
|
989
|
-
}
|
|
990
|
-
const N = h[p];
|
|
991
|
-
return U && !N ? E[R] = void 0 : E[R] = (N || "").replace(/%2F/g, "/"), E;
|
|
992
|
-
}, {}),
|
|
993
|
-
pathname: f,
|
|
994
|
-
pathnameBase: l,
|
|
995
|
-
pattern: e
|
|
996
|
-
};
|
|
997
|
-
}
|
|
998
|
-
function un(e, t, r) {
|
|
999
|
-
t === void 0 && (t = !1), r === void 0 && (r = !0), te(e === "*" || !e.endsWith("*") || e.endsWith("/*"), 'Route path "' + e + '" will be treated as if it were ' + ('"' + e.replace(/\*$/, "/*") + '" because the `*` character must ') + "always follow a `/` in the pattern. To get rid of this warning, " + ('please change the route path to "' + e.replace(/\*$/, "/*") + '".'));
|
|
1000
|
-
let a = [], o = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (l, h, c) => (a.push({
|
|
1001
|
-
paramName: h,
|
|
1002
|
-
isOptional: c != null
|
|
1003
|
-
}), c ? "/?([^\\/]+)?" : "/([^\\/]+)"));
|
|
1004
|
-
return e.endsWith("*") ? (a.push({
|
|
1005
|
-
paramName: "*"
|
|
1006
|
-
}), o += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : r ? o += "\\/*$" : e !== "" && e !== "/" && (o += "(?:(?=\\/|$))"), [new RegExp(o, t ? void 0 : "i"), a];
|
|
1007
|
-
}
|
|
1008
|
-
function cn(e) {
|
|
1009
|
-
try {
|
|
1010
|
-
return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
|
|
1011
|
-
} catch (t) {
|
|
1012
|
-
return te(!1, 'The URL path "' + e + '" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent ' + ("encoding (" + t + ").")), e;
|
|
1013
|
-
}
|
|
1014
|
-
}
|
|
1015
|
-
function Et(e, t) {
|
|
1016
|
-
if (t === "/") return e;
|
|
1017
|
-
if (!e.toLowerCase().startsWith(t.toLowerCase()))
|
|
1018
|
-
return null;
|
|
1019
|
-
let r = t.endsWith("/") ? t.length - 1 : t.length, a = e.charAt(r);
|
|
1020
|
-
return a && a !== "/" ? null : e.slice(r) || "/";
|
|
1021
|
-
}
|
|
1022
|
-
function dn(e, t) {
|
|
1023
|
-
t === void 0 && (t = "/");
|
|
1024
|
-
let {
|
|
1025
|
-
pathname: r,
|
|
1026
|
-
search: a = "",
|
|
1027
|
-
hash: o = ""
|
|
1028
|
-
} = typeof e == "string" ? Be(e) : e;
|
|
1029
|
-
return {
|
|
1030
|
-
pathname: r ? r.startsWith("/") ? r : fn(r, t) : t,
|
|
1031
|
-
search: pn(a),
|
|
1032
|
-
hash: vn(o)
|
|
1033
|
-
};
|
|
1034
|
-
}
|
|
1035
|
-
function fn(e, t) {
|
|
1036
|
-
let r = t.replace(/\/+$/, "").split("/");
|
|
1037
|
-
return e.split("/").forEach((o) => {
|
|
1038
|
-
o === ".." ? r.length > 1 && r.pop() : o !== "." && r.push(o);
|
|
1039
|
-
}), r.length > 1 ? r.join("/") : "/";
|
|
1040
|
-
}
|
|
1041
|
-
function Gt(e, t, r, a) {
|
|
1042
|
-
return "Cannot include a '" + e + "' character in a manually specified " + ("`to." + t + "` field [" + JSON.stringify(a) + "]. Please separate it out to the ") + ("`to." + r + "` field. Alternatively you may provide the full path as ") + 'a string in <Link to="..."> and the router will parse it for you.';
|
|
1043
|
-
}
|
|
1044
|
-
function Nr(e) {
|
|
1045
|
-
return e.filter((t, r) => r === 0 || t.route.path && t.route.path.length > 0);
|
|
1046
|
-
}
|
|
1047
|
-
function jt(e, t) {
|
|
1048
|
-
let r = Nr(e);
|
|
1049
|
-
return t ? r.map((a, o) => o === r.length - 1 ? a.pathname : a.pathnameBase) : r.map((a) => a.pathnameBase);
|
|
1050
|
-
}
|
|
1051
|
-
function Ut(e, t, r, a) {
|
|
1052
|
-
a === void 0 && (a = !1);
|
|
1053
|
-
let o;
|
|
1054
|
-
typeof e == "string" ? o = Be(e) : (o = Y({}, e), M(!o.pathname || !o.pathname.includes("?"), Gt("?", "pathname", "search", o)), M(!o.pathname || !o.pathname.includes("#"), Gt("#", "pathname", "hash", o)), M(!o.search || !o.search.includes("#"), Gt("#", "search", "hash", o)));
|
|
1055
|
-
let f = e === "" || o.pathname === "", l = f ? "/" : o.pathname, h;
|
|
1056
|
-
if (l == null)
|
|
1057
|
-
h = r;
|
|
1058
|
-
else {
|
|
1059
|
-
let p = t.length - 1;
|
|
1060
|
-
if (!a && l.startsWith("..")) {
|
|
1061
|
-
let R = l.split("/");
|
|
1062
|
-
for (; R[0] === ".."; )
|
|
1063
|
-
R.shift(), p -= 1;
|
|
1064
|
-
o.pathname = R.join("/");
|
|
1065
|
-
}
|
|
1066
|
-
h = p >= 0 ? t[p] : "/";
|
|
1067
|
-
}
|
|
1068
|
-
let c = dn(o, h), E = l && l !== "/" && l.endsWith("/"), y = (f || l === ".") && r.endsWith("/");
|
|
1069
|
-
return !c.pathname.endsWith("/") && (E || y) && (c.pathname += "/"), c;
|
|
1070
|
-
}
|
|
1071
|
-
const Ne = (e) => e.join("/").replace(/\/\/+/g, "/"), hn = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), pn = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, vn = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e;
|
|
1072
|
-
class Tr {
|
|
1073
|
-
constructor(t, r, a, o) {
|
|
1074
|
-
o === void 0 && (o = !1), this.status = t, this.statusText = r || "", this.internal = o, a instanceof Error ? (this.data = a.toString(), this.error = a) : this.data = a;
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
function At(e) {
|
|
1078
|
-
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
|
|
1079
|
-
}
|
|
1080
|
-
const Mr = ["post", "put", "patch", "delete"], mn = new Set(Mr), gn = ["get", ...Mr], yn = new Set(gn), En = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]), bn = /* @__PURE__ */ new Set([307, 308]), Xt = {
|
|
1081
|
-
state: "idle",
|
|
1082
|
-
location: void 0,
|
|
1083
|
-
formMethod: void 0,
|
|
1084
|
-
formAction: void 0,
|
|
1085
|
-
formEncType: void 0,
|
|
1086
|
-
formData: void 0,
|
|
1087
|
-
json: void 0,
|
|
1088
|
-
text: void 0
|
|
1089
|
-
}, Rn = {
|
|
1090
|
-
state: "idle",
|
|
1091
|
-
data: void 0,
|
|
1092
|
-
formMethod: void 0,
|
|
1093
|
-
formAction: void 0,
|
|
1094
|
-
formEncType: void 0,
|
|
1095
|
-
formData: void 0,
|
|
1096
|
-
json: void 0,
|
|
1097
|
-
text: void 0
|
|
1098
|
-
}, dt = {
|
|
1099
|
-
state: "unblocked",
|
|
1100
|
-
proceed: void 0,
|
|
1101
|
-
reset: void 0,
|
|
1102
|
-
location: void 0
|
|
1103
|
-
}, tr = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, wn = (e) => ({
|
|
1104
|
-
hasErrorBoundary: !!e.hasErrorBoundary
|
|
1105
|
-
}), Lr = "remix-router-transitions";
|
|
1106
|
-
function la(e) {
|
|
1107
|
-
const t = e.window ? e.window : typeof window < "u" ? window : void 0, r = typeof t < "u" && typeof t.document < "u" && typeof t.document.createElement < "u", a = !r;
|
|
1108
|
-
M(e.routes.length > 0, "You must provide a non-empty routes array to createRouter");
|
|
1109
|
-
let o;
|
|
1110
|
-
if (e.mapRouteProperties)
|
|
1111
|
-
o = e.mapRouteProperties;
|
|
1112
|
-
else if (e.detectErrorBoundary) {
|
|
1113
|
-
let i = e.detectErrorBoundary;
|
|
1114
|
-
o = (s) => ({
|
|
1115
|
-
hasErrorBoundary: i(s)
|
|
1116
|
-
});
|
|
1117
|
-
} else
|
|
1118
|
-
o = wn;
|
|
1119
|
-
let f = {}, l = mt(e.routes, o, void 0, f), h, c = e.basename || "/", E = e.unstable_dataStrategy || Pn, y = e.unstable_patchRoutesOnMiss, p = Y({
|
|
1120
|
-
v7_fetcherPersist: !1,
|
|
1121
|
-
v7_normalizeFormMethod: !1,
|
|
1122
|
-
v7_partialHydration: !1,
|
|
1123
|
-
v7_prependBasename: !1,
|
|
1124
|
-
v7_relativeSplatPath: !1,
|
|
1125
|
-
unstable_skipActionErrorRevalidation: !1
|
|
1126
|
-
}, e.future), R = null, U = /* @__PURE__ */ new Set(), N = null, S = null, j = null, L = e.hydrationData != null, T = Ke(l, e.history.location, c), q = null;
|
|
1127
|
-
if (T == null && !y) {
|
|
1128
|
-
let i = ae(404, {
|
|
1129
|
-
pathname: e.history.location.pathname
|
|
1130
|
-
}), {
|
|
1131
|
-
matches: s,
|
|
1132
|
-
route: d
|
|
1133
|
-
} = wr(l);
|
|
1134
|
-
T = s, q = {
|
|
1135
|
-
[d.id]: i
|
|
1136
|
-
};
|
|
1137
|
-
}
|
|
1138
|
-
T && y && Ze(T, l, e.history.location.pathname).active && (T = null);
|
|
1139
|
-
let ee;
|
|
1140
|
-
if (!T)
|
|
1141
|
-
ee = !1, T = [];
|
|
1142
|
-
else if (T.some((i) => i.route.lazy))
|
|
1143
|
-
ee = !1;
|
|
1144
|
-
else if (!T.some((i) => i.route.loader))
|
|
1145
|
-
ee = !0;
|
|
1146
|
-
else if (p.v7_partialHydration) {
|
|
1147
|
-
let i = e.hydrationData ? e.hydrationData.loaderData : null, s = e.hydrationData ? e.hydrationData.errors : null, d = (v) => v.route.loader ? typeof v.route.loader == "function" && v.route.loader.hydrate === !0 ? !1 : i && i[v.route.id] !== void 0 || s && s[v.route.id] !== void 0 : !0;
|
|
1148
|
-
if (s) {
|
|
1149
|
-
let v = T.findIndex((x) => s[x.route.id] !== void 0);
|
|
1150
|
-
ee = T.slice(0, v + 1).every(d);
|
|
1151
|
-
} else
|
|
1152
|
-
ee = T.every(d);
|
|
1153
|
-
} else
|
|
1154
|
-
ee = e.hydrationData != null;
|
|
1155
|
-
let oe, m = {
|
|
1156
|
-
historyAction: e.history.action,
|
|
1157
|
-
location: e.history.location,
|
|
1158
|
-
matches: T,
|
|
1159
|
-
initialized: ee,
|
|
1160
|
-
navigation: Xt,
|
|
1161
|
-
// Don't restore on initial updateState() if we were SSR'd
|
|
1162
|
-
restoreScrollPosition: e.hydrationData != null ? !1 : null,
|
|
1163
|
-
preventScrollReset: !1,
|
|
1164
|
-
revalidation: "idle",
|
|
1165
|
-
loaderData: e.hydrationData && e.hydrationData.loaderData || {},
|
|
1166
|
-
actionData: e.hydrationData && e.hydrationData.actionData || null,
|
|
1167
|
-
errors: e.hydrationData && e.hydrationData.errors || q,
|
|
1168
|
-
fetchers: /* @__PURE__ */ new Map(),
|
|
1169
|
-
blockers: /* @__PURE__ */ new Map()
|
|
1170
|
-
}, ie = G.Pop, fe = !1, B, re = !1, X = /* @__PURE__ */ new Map(), se = null, J = !1, z = !1, he = [], We = [], $ = /* @__PURE__ */ new Map(), ze = 0, Te = -1, Se = /* @__PURE__ */ new Map(), pe = /* @__PURE__ */ new Set(), _e = /* @__PURE__ */ new Map(), Me = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Set(), Pe = /* @__PURE__ */ new Map(), ye = /* @__PURE__ */ new Map(), nt = /* @__PURE__ */ new Map(), Le = !1;
|
|
1171
|
-
function at() {
|
|
1172
|
-
if (R = e.history.listen((i) => {
|
|
1173
|
-
let {
|
|
1174
|
-
action: s,
|
|
1175
|
-
location: d,
|
|
1176
|
-
delta: v
|
|
1177
|
-
} = i;
|
|
1178
|
-
if (Le) {
|
|
1179
|
-
Le = !1;
|
|
1180
|
-
return;
|
|
1181
|
-
}
|
|
1182
|
-
te(ye.size === 0 || v != null, "You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");
|
|
1183
|
-
let x = st({
|
|
1184
|
-
currentLocation: m.location,
|
|
1185
|
-
nextLocation: d,
|
|
1186
|
-
historyAction: s
|
|
1187
|
-
});
|
|
1188
|
-
if (x && v != null) {
|
|
1189
|
-
Le = !0, e.history.go(v * -1), Ae(x, {
|
|
1190
|
-
state: "blocked",
|
|
1191
|
-
location: d,
|
|
1192
|
-
proceed() {
|
|
1193
|
-
Ae(x, {
|
|
1194
|
-
state: "proceeding",
|
|
1195
|
-
proceed: void 0,
|
|
1196
|
-
reset: void 0,
|
|
1197
|
-
location: d
|
|
1198
|
-
}), e.history.go(v);
|
|
1199
|
-
},
|
|
1200
|
-
reset() {
|
|
1201
|
-
let C = new Map(m.blockers);
|
|
1202
|
-
C.set(x, dt), Q({
|
|
1203
|
-
blockers: C
|
|
1204
|
-
});
|
|
1205
|
-
}
|
|
1206
|
-
});
|
|
1207
|
-
return;
|
|
1208
|
-
}
|
|
1209
|
-
return ue(s, d);
|
|
1210
|
-
}), r) {
|
|
1211
|
-
Bn(t, X);
|
|
1212
|
-
let i = () => Vn(t, X);
|
|
1213
|
-
t.addEventListener("pagehide", i), se = () => t.removeEventListener("pagehide", i);
|
|
1214
|
-
}
|
|
1215
|
-
return m.initialized || ue(G.Pop, m.location, {
|
|
1216
|
-
initialHydration: !0
|
|
1217
|
-
}), oe;
|
|
1218
|
-
}
|
|
1219
|
-
function qe() {
|
|
1220
|
-
R && R(), se && se(), U.clear(), B && B.abort(), m.fetchers.forEach((i, s) => Ue(s)), m.blockers.forEach((i, s) => _t(s));
|
|
1221
|
-
}
|
|
1222
|
-
function Vt(i) {
|
|
1223
|
-
return U.add(i), () => U.delete(i);
|
|
1224
|
-
}
|
|
1225
|
-
function Q(i, s) {
|
|
1226
|
-
s === void 0 && (s = {}), m = Y({}, m, i);
|
|
1227
|
-
let d = [], v = [];
|
|
1228
|
-
p.v7_fetcherPersist && m.fetchers.forEach((x, C) => {
|
|
1229
|
-
x.state === "idle" && (ge.has(C) ? v.push(C) : d.push(C));
|
|
1230
|
-
}), [...U].forEach((x) => x(m, {
|
|
1231
|
-
deletedFetchers: v,
|
|
1232
|
-
unstable_viewTransitionOpts: s.viewTransitionOpts,
|
|
1233
|
-
unstable_flushSync: s.flushSync === !0
|
|
1234
|
-
})), p.v7_fetcherPersist && (d.forEach((x) => m.fetchers.delete(x)), v.forEach((x) => Ue(x)));
|
|
1235
|
-
}
|
|
1236
|
-
function Fe(i, s, d) {
|
|
1237
|
-
var v, x;
|
|
1238
|
-
let {
|
|
1239
|
-
flushSync: C
|
|
1240
|
-
} = d === void 0 ? {} : d, n = m.actionData != null && m.navigation.formMethod != null && Ee(m.navigation.formMethod) && m.navigation.state === "loading" && ((v = i.state) == null ? void 0 : v._isRedirect) !== !0, u;
|
|
1241
|
-
s.actionData ? Object.keys(s.actionData).length > 0 ? u = s.actionData : u = null : n ? u = m.actionData : u = null;
|
|
1242
|
-
let g = s.loaderData ? br(m.loaderData, s.loaderData, s.matches || [], s.errors) : m.loaderData, b = m.blockers;
|
|
1243
|
-
b.size > 0 && (b = new Map(b), b.forEach((D, _) => b.set(_, dt)));
|
|
1244
|
-
let w = fe === !0 || m.navigation.formMethod != null && Ee(m.navigation.formMethod) && ((x = i.state) == null ? void 0 : x._isRedirect) !== !0;
|
|
1245
|
-
h && (l = h, h = void 0), J || ie === G.Pop || (ie === G.Push ? e.history.push(i, i.state) : ie === G.Replace && e.history.replace(i, i.state));
|
|
1246
|
-
let O;
|
|
1247
|
-
if (ie === G.Pop) {
|
|
1248
|
-
let D = X.get(m.location.pathname);
|
|
1249
|
-
D && D.has(i.pathname) ? O = {
|
|
1250
|
-
currentLocation: m.location,
|
|
1251
|
-
nextLocation: i
|
|
1252
|
-
} : X.has(i.pathname) && (O = {
|
|
1253
|
-
currentLocation: i,
|
|
1254
|
-
nextLocation: m.location
|
|
1255
|
-
});
|
|
1256
|
-
} else if (re) {
|
|
1257
|
-
let D = X.get(m.location.pathname);
|
|
1258
|
-
D ? D.add(i.pathname) : (D = /* @__PURE__ */ new Set([i.pathname]), X.set(m.location.pathname, D)), O = {
|
|
1259
|
-
currentLocation: m.location,
|
|
1260
|
-
nextLocation: i
|
|
1261
|
-
};
|
|
1262
|
-
}
|
|
1263
|
-
Q(Y({}, s, {
|
|
1264
|
-
actionData: u,
|
|
1265
|
-
loaderData: g,
|
|
1266
|
-
historyAction: ie,
|
|
1267
|
-
location: i,
|
|
1268
|
-
initialized: !0,
|
|
1269
|
-
navigation: Xt,
|
|
1270
|
-
revalidation: "idle",
|
|
1271
|
-
restoreScrollPosition: Nt(i, s.matches || m.matches),
|
|
1272
|
-
preventScrollReset: w,
|
|
1273
|
-
blockers: b
|
|
1274
|
-
}), {
|
|
1275
|
-
viewTransitionOpts: O,
|
|
1276
|
-
flushSync: C === !0
|
|
1277
|
-
}), ie = G.Pop, fe = !1, re = !1, J = !1, z = !1, he = [], We = [];
|
|
1278
|
-
}
|
|
1279
|
-
async function bt(i, s) {
|
|
1280
|
-
if (typeof i == "number") {
|
|
1281
|
-
e.history.go(i);
|
|
1282
|
-
return;
|
|
1283
|
-
}
|
|
1284
|
-
let d = Zt(m.location, m.matches, c, p.v7_prependBasename, i, p.v7_relativeSplatPath, s == null ? void 0 : s.fromRouteId, s == null ? void 0 : s.relative), {
|
|
1285
|
-
path: v,
|
|
1286
|
-
submission: x,
|
|
1287
|
-
error: C
|
|
1288
|
-
} = hr(p.v7_normalizeFormMethod, !1, d, s), n = m.location, u = vt(m.location, v, s && s.state);
|
|
1289
|
-
u = Y({}, u, e.history.encodeLocation(u));
|
|
1290
|
-
let g = s && s.replace != null ? s.replace : void 0, b = G.Push;
|
|
1291
|
-
g === !0 ? b = G.Replace : g === !1 || x != null && Ee(x.formMethod) && x.formAction === m.location.pathname + m.location.search && (b = G.Replace);
|
|
1292
|
-
let w = s && "preventScrollReset" in s ? s.preventScrollReset === !0 : void 0, O = (s && s.unstable_flushSync) === !0, D = st({
|
|
1293
|
-
currentLocation: n,
|
|
1294
|
-
nextLocation: u,
|
|
1295
|
-
historyAction: b
|
|
1296
|
-
});
|
|
1297
|
-
if (D) {
|
|
1298
|
-
Ae(D, {
|
|
1299
|
-
state: "blocked",
|
|
1300
|
-
location: u,
|
|
1301
|
-
proceed() {
|
|
1302
|
-
Ae(D, {
|
|
1303
|
-
state: "proceeding",
|
|
1304
|
-
proceed: void 0,
|
|
1305
|
-
reset: void 0,
|
|
1306
|
-
location: u
|
|
1307
|
-
}), bt(i, s);
|
|
1308
|
-
},
|
|
1309
|
-
reset() {
|
|
1310
|
-
let _ = new Map(m.blockers);
|
|
1311
|
-
_.set(D, dt), Q({
|
|
1312
|
-
blockers: _
|
|
1313
|
-
});
|
|
1314
|
-
}
|
|
1315
|
-
});
|
|
1316
|
-
return;
|
|
1317
|
-
}
|
|
1318
|
-
return await ue(b, u, {
|
|
1319
|
-
submission: x,
|
|
1320
|
-
// Send through the formData serialization error if we have one so we can
|
|
1321
|
-
// render at the right error boundary after we match routes
|
|
1322
|
-
pendingError: C,
|
|
1323
|
-
preventScrollReset: w,
|
|
1324
|
-
replace: s && s.replace,
|
|
1325
|
-
enableViewTransition: s && s.unstable_viewTransition,
|
|
1326
|
-
flushSync: O
|
|
1327
|
-
});
|
|
1328
|
-
}
|
|
1329
|
-
function Qe() {
|
|
1330
|
-
if (Ce(), Q({
|
|
1331
|
-
revalidation: "loading"
|
|
1332
|
-
}), m.navigation.state !== "submitting") {
|
|
1333
|
-
if (m.navigation.state === "idle") {
|
|
1334
|
-
ue(m.historyAction, m.location, {
|
|
1335
|
-
startUninterruptedRevalidation: !0
|
|
1336
|
-
});
|
|
1337
|
-
return;
|
|
1338
|
-
}
|
|
1339
|
-
ue(ie || m.historyAction, m.navigation.location, {
|
|
1340
|
-
overrideNavigation: m.navigation
|
|
1341
|
-
});
|
|
1342
|
-
}
|
|
1343
|
-
}
|
|
1344
|
-
async function ue(i, s, d) {
|
|
1345
|
-
B && B.abort(), B = null, ie = i, J = (d && d.startUninterruptedRevalidation) === !0, Ot(m.location, m.matches), fe = (d && d.preventScrollReset) === !0, re = (d && d.enableViewTransition) === !0;
|
|
1346
|
-
let v = h || l, x = d && d.overrideNavigation, C = Ke(v, s, c), n = (d && d.flushSync) === !0, u = Ze(C, v, s.pathname);
|
|
1347
|
-
if (u.active && u.matches && (C = u.matches), !C) {
|
|
1348
|
-
let {
|
|
1349
|
-
error: F,
|
|
1350
|
-
notFoundMatches: I,
|
|
1351
|
-
route: A
|
|
1352
|
-
} = we(s.pathname);
|
|
1353
|
-
Fe(s, {
|
|
1354
|
-
matches: I,
|
|
1355
|
-
loaderData: {},
|
|
1356
|
-
errors: {
|
|
1357
|
-
[A.id]: F
|
|
1358
|
-
}
|
|
1359
|
-
}, {
|
|
1360
|
-
flushSync: n
|
|
1361
|
-
});
|
|
1362
|
-
return;
|
|
1363
|
-
}
|
|
1364
|
-
if (m.initialized && !z && Ln(m.location, s) && !(d && d.submission && Ee(d.submission.formMethod))) {
|
|
1365
|
-
Fe(s, {
|
|
1366
|
-
matches: C
|
|
1367
|
-
}, {
|
|
1368
|
-
flushSync: n
|
|
1369
|
-
});
|
|
1370
|
-
return;
|
|
1371
|
-
}
|
|
1372
|
-
B = new AbortController();
|
|
1373
|
-
let g = tt(e.history, s, B.signal, d && d.submission), b;
|
|
1374
|
-
if (d && d.pendingError)
|
|
1375
|
-
b = [pt(C).route.id, {
|
|
1376
|
-
type: W.error,
|
|
1377
|
-
error: d.pendingError
|
|
1378
|
-
}];
|
|
1379
|
-
else if (d && d.submission && Ee(d.submission.formMethod)) {
|
|
1380
|
-
let F = await Rt(g, s, d.submission, C, u.active, {
|
|
1381
|
-
replace: d.replace,
|
|
1382
|
-
flushSync: n
|
|
1383
|
-
});
|
|
1384
|
-
if (F.shortCircuited)
|
|
1385
|
-
return;
|
|
1386
|
-
if (F.pendingActionResult) {
|
|
1387
|
-
let [I, A] = F.pendingActionResult;
|
|
1388
|
-
if (de(A) && At(A.error) && A.error.status === 404) {
|
|
1389
|
-
B = null, Fe(s, {
|
|
1390
|
-
matches: F.matches,
|
|
1391
|
-
loaderData: {},
|
|
1392
|
-
errors: {
|
|
1393
|
-
[I]: A.error
|
|
1394
|
-
}
|
|
1395
|
-
});
|
|
1396
|
-
return;
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1399
|
-
C = F.matches || C, b = F.pendingActionResult, x = qt(s, d.submission), n = !1, u.active = !1, g = tt(e.history, g.url, g.signal);
|
|
1400
|
-
}
|
|
1401
|
-
let {
|
|
1402
|
-
shortCircuited: w,
|
|
1403
|
-
matches: O,
|
|
1404
|
-
loaderData: D,
|
|
1405
|
-
errors: _
|
|
1406
|
-
} = await wt(g, s, C, u.active, x, d && d.submission, d && d.fetcherSubmission, d && d.replace, d && d.initialHydration === !0, n, b);
|
|
1407
|
-
w || (B = null, Fe(s, Y({
|
|
1408
|
-
matches: O || C
|
|
1409
|
-
}, Rr(b), {
|
|
1410
|
-
loaderData: D,
|
|
1411
|
-
errors: _
|
|
1412
|
-
})));
|
|
1413
|
-
}
|
|
1414
|
-
async function Rt(i, s, d, v, x, C) {
|
|
1415
|
-
C === void 0 && (C = {}), Ce();
|
|
1416
|
-
let n = In(s, d);
|
|
1417
|
-
if (Q({
|
|
1418
|
-
navigation: n
|
|
1419
|
-
}, {
|
|
1420
|
-
flushSync: C.flushSync === !0
|
|
1421
|
-
}), x) {
|
|
1422
|
-
let b = await Je(v, s.pathname, i.signal);
|
|
1423
|
-
if (b.type === "aborted")
|
|
1424
|
-
return {
|
|
1425
|
-
shortCircuited: !0
|
|
1426
|
-
};
|
|
1427
|
-
if (b.type === "error") {
|
|
1428
|
-
let {
|
|
1429
|
-
error: w,
|
|
1430
|
-
notFoundMatches: O,
|
|
1431
|
-
route: D
|
|
1432
|
-
} = Ie(s.pathname, b);
|
|
1433
|
-
return {
|
|
1434
|
-
matches: O,
|
|
1435
|
-
pendingActionResult: [D.id, {
|
|
1436
|
-
type: W.error,
|
|
1437
|
-
error: w
|
|
1438
|
-
}]
|
|
1439
|
-
};
|
|
1440
|
-
} else if (b.matches)
|
|
1441
|
-
v = b.matches;
|
|
1442
|
-
else {
|
|
1443
|
-
let {
|
|
1444
|
-
notFoundMatches: w,
|
|
1445
|
-
error: O,
|
|
1446
|
-
route: D
|
|
1447
|
-
} = we(s.pathname);
|
|
1448
|
-
return {
|
|
1449
|
-
matches: w,
|
|
1450
|
-
pendingActionResult: [D.id, {
|
|
1451
|
-
type: W.error,
|
|
1452
|
-
error: O
|
|
1453
|
-
}]
|
|
1454
|
-
};
|
|
1455
|
-
}
|
|
1456
|
-
}
|
|
1457
|
-
let u, g = ht(v, s);
|
|
1458
|
-
if (!g.route.action && !g.route.lazy)
|
|
1459
|
-
u = {
|
|
1460
|
-
type: W.error,
|
|
1461
|
-
error: ae(405, {
|
|
1462
|
-
method: i.method,
|
|
1463
|
-
pathname: s.pathname,
|
|
1464
|
-
routeId: g.route.id
|
|
1465
|
-
})
|
|
1466
|
-
};
|
|
1467
|
-
else if (u = (await je("action", i, [g], v))[0], i.signal.aborted)
|
|
1468
|
-
return {
|
|
1469
|
-
shortCircuited: !0
|
|
1470
|
-
};
|
|
1471
|
-
if (Xe(u)) {
|
|
1472
|
-
let b;
|
|
1473
|
-
return C && C.replace != null ? b = C.replace : b = gr(u.response.headers.get("Location"), new URL(i.url), c) === m.location.pathname + m.location.search, await Ye(i, u, {
|
|
1474
|
-
submission: d,
|
|
1475
|
-
replace: b
|
|
1476
|
-
}), {
|
|
1477
|
-
shortCircuited: !0
|
|
1478
|
-
};
|
|
1479
|
-
}
|
|
1480
|
-
if (Ge(u))
|
|
1481
|
-
throw ae(400, {
|
|
1482
|
-
type: "defer-action"
|
|
1483
|
-
});
|
|
1484
|
-
if (de(u)) {
|
|
1485
|
-
let b = pt(v, g.route.id);
|
|
1486
|
-
return (C && C.replace) !== !0 && (ie = G.Push), {
|
|
1487
|
-
matches: v,
|
|
1488
|
-
pendingActionResult: [b.route.id, u]
|
|
1489
|
-
};
|
|
1490
|
-
}
|
|
1491
|
-
return {
|
|
1492
|
-
matches: v,
|
|
1493
|
-
pendingActionResult: [g.route.id, u]
|
|
1494
|
-
};
|
|
1495
|
-
}
|
|
1496
|
-
async function wt(i, s, d, v, x, C, n, u, g, b, w) {
|
|
1497
|
-
let O = x || qt(s, C), D = C || n || Sr(O), _ = !J && (!p.v7_partialHydration || !g);
|
|
1498
|
-
if (v) {
|
|
1499
|
-
if (_) {
|
|
1500
|
-
let H = $e(w);
|
|
1501
|
-
Q(Y({
|
|
1502
|
-
navigation: O
|
|
1503
|
-
}, H !== void 0 ? {
|
|
1504
|
-
actionData: H
|
|
1505
|
-
} : {}), {
|
|
1506
|
-
flushSync: b
|
|
1507
|
-
});
|
|
1508
|
-
}
|
|
1509
|
-
let k = await Je(d, s.pathname, i.signal);
|
|
1510
|
-
if (k.type === "aborted")
|
|
1511
|
-
return {
|
|
1512
|
-
shortCircuited: !0
|
|
1513
|
-
};
|
|
1514
|
-
if (k.type === "error") {
|
|
1515
|
-
let {
|
|
1516
|
-
error: H,
|
|
1517
|
-
notFoundMatches: ce,
|
|
1518
|
-
route: V
|
|
1519
|
-
} = Ie(s.pathname, k);
|
|
1520
|
-
return {
|
|
1521
|
-
matches: ce,
|
|
1522
|
-
loaderData: {},
|
|
1523
|
-
errors: {
|
|
1524
|
-
[V.id]: H
|
|
1525
|
-
}
|
|
1526
|
-
};
|
|
1527
|
-
} else if (k.matches)
|
|
1528
|
-
d = k.matches;
|
|
1529
|
-
else {
|
|
1530
|
-
let {
|
|
1531
|
-
error: H,
|
|
1532
|
-
notFoundMatches: ce,
|
|
1533
|
-
route: V
|
|
1534
|
-
} = we(s.pathname);
|
|
1535
|
-
return {
|
|
1536
|
-
matches: ce,
|
|
1537
|
-
loaderData: {},
|
|
1538
|
-
errors: {
|
|
1539
|
-
[V.id]: H
|
|
1540
|
-
}
|
|
1541
|
-
};
|
|
1542
|
-
}
|
|
1543
|
-
}
|
|
1544
|
-
let F = h || l, [I, A] = pr(e.history, m, d, D, s, p.v7_partialHydration && g === !0, p.unstable_skipActionErrorRevalidation, z, he, We, ge, _e, pe, F, c, w);
|
|
1545
|
-
if (He((k) => !(d && d.some((H) => H.route.id === k)) || I && I.some((H) => H.route.id === k)), Te = ++ze, I.length === 0 && A.length === 0) {
|
|
1546
|
-
let k = Dt();
|
|
1547
|
-
return Fe(s, Y({
|
|
1548
|
-
matches: d,
|
|
1549
|
-
loaderData: {},
|
|
1550
|
-
// Commit pending error if we're short circuiting
|
|
1551
|
-
errors: w && de(w[1]) ? {
|
|
1552
|
-
[w[0]]: w[1].error
|
|
1553
|
-
} : null
|
|
1554
|
-
}, Rr(w), k ? {
|
|
1555
|
-
fetchers: new Map(m.fetchers)
|
|
1556
|
-
} : {}), {
|
|
1557
|
-
flushSync: b
|
|
1558
|
-
}), {
|
|
1559
|
-
shortCircuited: !0
|
|
1560
|
-
};
|
|
1561
|
-
}
|
|
1562
|
-
if (_) {
|
|
1563
|
-
let k = {};
|
|
1564
|
-
if (!v) {
|
|
1565
|
-
k.navigation = O;
|
|
1566
|
-
let H = $e(w);
|
|
1567
|
-
H !== void 0 && (k.actionData = H);
|
|
1568
|
-
}
|
|
1569
|
-
A.length > 0 && (k.fetchers = Wt(A)), Q(k, {
|
|
1570
|
-
flushSync: b
|
|
1571
|
-
});
|
|
1572
|
-
}
|
|
1573
|
-
A.forEach((k) => {
|
|
1574
|
-
$.has(k.key) && Re(k.key), k.controller && $.set(k.key, k.controller);
|
|
1575
|
-
});
|
|
1576
|
-
let Z = () => A.forEach((k) => Re(k.key));
|
|
1577
|
-
B && B.signal.addEventListener("abort", Z);
|
|
1578
|
-
let {
|
|
1579
|
-
loaderResults: ne,
|
|
1580
|
-
fetcherResults: le
|
|
1581
|
-
} = await it(m.matches, d, I, A, i);
|
|
1582
|
-
if (i.signal.aborted)
|
|
1583
|
-
return {
|
|
1584
|
-
shortCircuited: !0
|
|
1585
|
-
};
|
|
1586
|
-
B && B.signal.removeEventListener("abort", Z), A.forEach((k) => $.delete(k.key));
|
|
1587
|
-
let K = xr([...ne, ...le]);
|
|
1588
|
-
if (K) {
|
|
1589
|
-
if (K.idx >= I.length) {
|
|
1590
|
-
let k = A[K.idx - I.length].key;
|
|
1591
|
-
pe.add(k);
|
|
1592
|
-
}
|
|
1593
|
-
return await Ye(i, K.result, {
|
|
1594
|
-
replace: u
|
|
1595
|
-
}), {
|
|
1596
|
-
shortCircuited: !0
|
|
1597
|
-
};
|
|
1598
|
-
}
|
|
1599
|
-
let {
|
|
1600
|
-
loaderData: xe,
|
|
1601
|
-
errors: me
|
|
1602
|
-
} = Er(m, d, I, ne, w, A, le, Pe);
|
|
1603
|
-
Pe.forEach((k, H) => {
|
|
1604
|
-
k.subscribe((ce) => {
|
|
1605
|
-
(ce || k.done) && Pe.delete(H);
|
|
1606
|
-
});
|
|
1607
|
-
}), p.v7_partialHydration && g && m.errors && Object.entries(m.errors).filter((k) => {
|
|
1608
|
-
let [H] = k;
|
|
1609
|
-
return !I.some((ce) => ce.route.id === H);
|
|
1610
|
-
}).forEach((k) => {
|
|
1611
|
-
let [H, ce] = k;
|
|
1612
|
-
me = Object.assign(me || {}, {
|
|
1613
|
-
[H]: ce
|
|
1614
|
-
});
|
|
1615
|
-
});
|
|
1616
|
-
let et = Dt(), Tt = St(Te), Mt = et || Tt || A.length > 0;
|
|
1617
|
-
return Y({
|
|
1618
|
-
matches: d,
|
|
1619
|
-
loaderData: xe,
|
|
1620
|
-
errors: me
|
|
1621
|
-
}, Mt ? {
|
|
1622
|
-
fetchers: new Map(m.fetchers)
|
|
1623
|
-
} : {});
|
|
1624
|
-
}
|
|
1625
|
-
function $e(i) {
|
|
1626
|
-
if (i && !de(i[1]))
|
|
1627
|
-
return {
|
|
1628
|
-
[i[0]]: i[1].data
|
|
1629
|
-
};
|
|
1630
|
-
if (m.actionData)
|
|
1631
|
-
return Object.keys(m.actionData).length === 0 ? null : m.actionData;
|
|
1632
|
-
}
|
|
1633
|
-
function Wt(i) {
|
|
1634
|
-
return i.forEach((s) => {
|
|
1635
|
-
let d = m.fetchers.get(s.key), v = ft(void 0, d ? d.data : void 0);
|
|
1636
|
-
m.fetchers.set(s.key, v);
|
|
1637
|
-
}), new Map(m.fetchers);
|
|
1638
|
-
}
|
|
1639
|
-
function zt(i, s, d, v) {
|
|
1640
|
-
if (a)
|
|
1641
|
-
throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");
|
|
1642
|
-
$.has(i) && Re(i);
|
|
1643
|
-
let x = (v && v.unstable_flushSync) === !0, C = h || l, n = Zt(m.location, m.matches, c, p.v7_prependBasename, d, p.v7_relativeSplatPath, s, v == null ? void 0 : v.relative), u = Ke(C, n, c), g = Ze(u, C, n);
|
|
1644
|
-
if (g.active && g.matches && (u = g.matches), !u) {
|
|
1645
|
-
ve(i, s, ae(404, {
|
|
1646
|
-
pathname: n
|
|
1647
|
-
}), {
|
|
1648
|
-
flushSync: x
|
|
1649
|
-
});
|
|
1650
|
-
return;
|
|
1651
|
-
}
|
|
1652
|
-
let {
|
|
1653
|
-
path: b,
|
|
1654
|
-
submission: w,
|
|
1655
|
-
error: O
|
|
1656
|
-
} = hr(p.v7_normalizeFormMethod, !0, n, v);
|
|
1657
|
-
if (O) {
|
|
1658
|
-
ve(i, s, O, {
|
|
1659
|
-
flushSync: x
|
|
1660
|
-
});
|
|
1661
|
-
return;
|
|
1662
|
-
}
|
|
1663
|
-
let D = ht(u, b);
|
|
1664
|
-
if (fe = (v && v.preventScrollReset) === !0, w && Ee(w.formMethod)) {
|
|
1665
|
-
ot(i, s, b, D, u, g.active, x, w);
|
|
1666
|
-
return;
|
|
1667
|
-
}
|
|
1668
|
-
_e.set(i, {
|
|
1669
|
-
routeId: s,
|
|
1670
|
-
path: b
|
|
1671
|
-
}), $t(i, s, b, D, u, g.active, x, w);
|
|
1672
|
-
}
|
|
1673
|
-
async function ot(i, s, d, v, x, C, n, u) {
|
|
1674
|
-
Ce(), _e.delete(i);
|
|
1675
|
-
function g(V) {
|
|
1676
|
-
if (!V.route.action && !V.route.lazy) {
|
|
1677
|
-
let Oe = ae(405, {
|
|
1678
|
-
method: u.formMethod,
|
|
1679
|
-
pathname: d,
|
|
1680
|
-
routeId: s
|
|
1681
|
-
});
|
|
1682
|
-
return ve(i, s, Oe, {
|
|
1683
|
-
flushSync: n
|
|
1684
|
-
}), !0;
|
|
1685
|
-
}
|
|
1686
|
-
return !1;
|
|
1687
|
-
}
|
|
1688
|
-
if (!C && g(v))
|
|
1689
|
-
return;
|
|
1690
|
-
let b = m.fetchers.get(i);
|
|
1691
|
-
be(i, kn(u, b), {
|
|
1692
|
-
flushSync: n
|
|
1693
|
-
});
|
|
1694
|
-
let w = new AbortController(), O = tt(e.history, d, w.signal, u);
|
|
1695
|
-
if (C) {
|
|
1696
|
-
let V = await Je(x, d, O.signal);
|
|
1697
|
-
if (V.type === "aborted")
|
|
1698
|
-
return;
|
|
1699
|
-
if (V.type === "error") {
|
|
1700
|
-
let {
|
|
1701
|
-
error: Oe
|
|
1702
|
-
} = Ie(d, V);
|
|
1703
|
-
ve(i, s, Oe, {
|
|
1704
|
-
flushSync: n
|
|
1705
|
-
});
|
|
1706
|
-
return;
|
|
1707
|
-
} else if (V.matches) {
|
|
1708
|
-
if (x = V.matches, v = ht(x, d), g(v))
|
|
1709
|
-
return;
|
|
1710
|
-
} else {
|
|
1711
|
-
ve(i, s, ae(404, {
|
|
1712
|
-
pathname: d
|
|
1713
|
-
}), {
|
|
1714
|
-
flushSync: n
|
|
1715
|
-
});
|
|
1716
|
-
return;
|
|
1717
|
-
}
|
|
1718
|
-
}
|
|
1719
|
-
$.set(i, w);
|
|
1720
|
-
let D = ze, F = (await je("action", O, [v], x))[0];
|
|
1721
|
-
if (O.signal.aborted) {
|
|
1722
|
-
$.get(i) === w && $.delete(i);
|
|
1723
|
-
return;
|
|
1724
|
-
}
|
|
1725
|
-
if (p.v7_fetcherPersist && ge.has(i)) {
|
|
1726
|
-
if (Xe(F) || de(F)) {
|
|
1727
|
-
be(i, ke(void 0));
|
|
1728
|
-
return;
|
|
1729
|
-
}
|
|
1730
|
-
} else {
|
|
1731
|
-
if (Xe(F))
|
|
1732
|
-
if ($.delete(i), Te > D) {
|
|
1733
|
-
be(i, ke(void 0));
|
|
1734
|
-
return;
|
|
1735
|
-
} else
|
|
1736
|
-
return pe.add(i), be(i, ft(u)), Ye(O, F, {
|
|
1737
|
-
fetcherSubmission: u
|
|
1738
|
-
});
|
|
1739
|
-
if (de(F)) {
|
|
1740
|
-
ve(i, s, F.error);
|
|
1741
|
-
return;
|
|
1742
|
-
}
|
|
1743
|
-
}
|
|
1744
|
-
if (Ge(F))
|
|
1745
|
-
throw ae(400, {
|
|
1746
|
-
type: "defer-action"
|
|
1747
|
-
});
|
|
1748
|
-
let I = m.navigation.location || m.location, A = tt(e.history, I, w.signal), Z = h || l, ne = m.navigation.state !== "idle" ? Ke(Z, m.navigation.location, c) : m.matches;
|
|
1749
|
-
M(ne, "Didn't find any matches after fetcher action");
|
|
1750
|
-
let le = ++ze;
|
|
1751
|
-
Se.set(i, le);
|
|
1752
|
-
let K = ft(u, F.data);
|
|
1753
|
-
m.fetchers.set(i, K);
|
|
1754
|
-
let [xe, me] = pr(e.history, m, ne, u, I, !1, p.unstable_skipActionErrorRevalidation, z, he, We, ge, _e, pe, Z, c, [v.route.id, F]);
|
|
1755
|
-
me.filter((V) => V.key !== i).forEach((V) => {
|
|
1756
|
-
let Oe = V.key, ir = m.fetchers.get(Oe), $r = ft(void 0, ir ? ir.data : void 0);
|
|
1757
|
-
m.fetchers.set(Oe, $r), $.has(Oe) && Re(Oe), V.controller && $.set(Oe, V.controller);
|
|
1758
|
-
}), Q({
|
|
1759
|
-
fetchers: new Map(m.fetchers)
|
|
1760
|
-
});
|
|
1761
|
-
let et = () => me.forEach((V) => Re(V.key));
|
|
1762
|
-
w.signal.addEventListener("abort", et);
|
|
1763
|
-
let {
|
|
1764
|
-
loaderResults: Tt,
|
|
1765
|
-
fetcherResults: Mt
|
|
1766
|
-
} = await it(m.matches, ne, xe, me, A);
|
|
1767
|
-
if (w.signal.aborted)
|
|
1768
|
-
return;
|
|
1769
|
-
w.signal.removeEventListener("abort", et), Se.delete(i), $.delete(i), me.forEach((V) => $.delete(V.key));
|
|
1770
|
-
let k = xr([...Tt, ...Mt]);
|
|
1771
|
-
if (k) {
|
|
1772
|
-
if (k.idx >= xe.length) {
|
|
1773
|
-
let V = me[k.idx - xe.length].key;
|
|
1774
|
-
pe.add(V);
|
|
1775
|
-
}
|
|
1776
|
-
return Ye(A, k.result);
|
|
1777
|
-
}
|
|
1778
|
-
let {
|
|
1779
|
-
loaderData: H,
|
|
1780
|
-
errors: ce
|
|
1781
|
-
} = Er(m, m.matches, xe, Tt, void 0, me, Mt, Pe);
|
|
1782
|
-
if (m.fetchers.has(i)) {
|
|
1783
|
-
let V = ke(F.data);
|
|
1784
|
-
m.fetchers.set(i, V);
|
|
1785
|
-
}
|
|
1786
|
-
St(le), m.navigation.state === "loading" && le > Te ? (M(ie, "Expected pending action"), B && B.abort(), Fe(m.navigation.location, {
|
|
1787
|
-
matches: ne,
|
|
1788
|
-
loaderData: H,
|
|
1789
|
-
errors: ce,
|
|
1790
|
-
fetchers: new Map(m.fetchers)
|
|
1791
|
-
})) : (Q({
|
|
1792
|
-
errors: ce,
|
|
1793
|
-
loaderData: br(m.loaderData, H, ne, ce),
|
|
1794
|
-
fetchers: new Map(m.fetchers)
|
|
1795
|
-
}), z = !1);
|
|
1796
|
-
}
|
|
1797
|
-
async function $t(i, s, d, v, x, C, n, u) {
|
|
1798
|
-
let g = m.fetchers.get(i);
|
|
1799
|
-
be(i, ft(u, g ? g.data : void 0), {
|
|
1800
|
-
flushSync: n
|
|
1801
|
-
});
|
|
1802
|
-
let b = new AbortController(), w = tt(e.history, d, b.signal);
|
|
1803
|
-
if (C) {
|
|
1804
|
-
let F = await Je(x, d, w.signal);
|
|
1805
|
-
if (F.type === "aborted")
|
|
1806
|
-
return;
|
|
1807
|
-
if (F.type === "error") {
|
|
1808
|
-
let {
|
|
1809
|
-
error: I
|
|
1810
|
-
} = Ie(d, F);
|
|
1811
|
-
ve(i, s, I, {
|
|
1812
|
-
flushSync: n
|
|
1813
|
-
});
|
|
1814
|
-
return;
|
|
1815
|
-
} else if (F.matches)
|
|
1816
|
-
x = F.matches, v = ht(x, d);
|
|
1817
|
-
else {
|
|
1818
|
-
ve(i, s, ae(404, {
|
|
1819
|
-
pathname: d
|
|
1820
|
-
}), {
|
|
1821
|
-
flushSync: n
|
|
1822
|
-
});
|
|
1823
|
-
return;
|
|
1824
|
-
}
|
|
1825
|
-
}
|
|
1826
|
-
$.set(i, b);
|
|
1827
|
-
let O = ze, _ = (await je("loader", w, [v], x))[0];
|
|
1828
|
-
if (Ge(_) && (_ = await Ir(_, w.signal, !0) || _), $.get(i) === b && $.delete(i), !w.signal.aborted) {
|
|
1829
|
-
if (ge.has(i)) {
|
|
1830
|
-
be(i, ke(void 0));
|
|
1831
|
-
return;
|
|
1832
|
-
}
|
|
1833
|
-
if (Xe(_))
|
|
1834
|
-
if (Te > O) {
|
|
1835
|
-
be(i, ke(void 0));
|
|
1836
|
-
return;
|
|
1837
|
-
} else {
|
|
1838
|
-
pe.add(i), await Ye(w, _);
|
|
1839
|
-
return;
|
|
1840
|
-
}
|
|
1841
|
-
if (de(_)) {
|
|
1842
|
-
ve(i, s, _.error);
|
|
1843
|
-
return;
|
|
1844
|
-
}
|
|
1845
|
-
M(!Ge(_), "Unhandled fetcher deferred data"), be(i, ke(_.data));
|
|
1846
|
-
}
|
|
1847
|
-
}
|
|
1848
|
-
async function Ye(i, s, d) {
|
|
1849
|
-
let {
|
|
1850
|
-
submission: v,
|
|
1851
|
-
fetcherSubmission: x,
|
|
1852
|
-
replace: C
|
|
1853
|
-
} = d === void 0 ? {} : d;
|
|
1854
|
-
s.response.headers.has("X-Remix-Revalidate") && (z = !0);
|
|
1855
|
-
let n = s.response.headers.get("Location");
|
|
1856
|
-
M(n, "Expected a Location header on the redirect Response"), n = gr(n, new URL(i.url), c);
|
|
1857
|
-
let u = vt(m.location, n, {
|
|
1858
|
-
_isRedirect: !0
|
|
1859
|
-
});
|
|
1860
|
-
if (r) {
|
|
1861
|
-
let _ = !1;
|
|
1862
|
-
if (s.response.headers.has("X-Remix-Reload-Document"))
|
|
1863
|
-
_ = !0;
|
|
1864
|
-
else if (tr.test(n)) {
|
|
1865
|
-
const F = e.history.createURL(n);
|
|
1866
|
-
_ = // Hard reload if it's an absolute URL to a new origin
|
|
1867
|
-
F.origin !== t.location.origin || // Hard reload if it's an absolute URL that does not match our basename
|
|
1868
|
-
Et(F.pathname, c) == null;
|
|
1869
|
-
}
|
|
1870
|
-
if (_) {
|
|
1871
|
-
C ? t.location.replace(n) : t.location.assign(n);
|
|
1872
|
-
return;
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
|
-
B = null;
|
|
1876
|
-
let g = C === !0 ? G.Replace : G.Push, {
|
|
1877
|
-
formMethod: b,
|
|
1878
|
-
formAction: w,
|
|
1879
|
-
formEncType: O
|
|
1880
|
-
} = m.navigation;
|
|
1881
|
-
!v && !x && b && w && O && (v = Sr(m.navigation));
|
|
1882
|
-
let D = v || x;
|
|
1883
|
-
if (bn.has(s.response.status) && D && Ee(D.formMethod))
|
|
1884
|
-
await ue(g, u, {
|
|
1885
|
-
submission: Y({}, D, {
|
|
1886
|
-
formAction: n
|
|
1887
|
-
}),
|
|
1888
|
-
// Preserve this flag across redirects
|
|
1889
|
-
preventScrollReset: fe
|
|
1890
|
-
});
|
|
1891
|
-
else {
|
|
1892
|
-
let _ = qt(u, v);
|
|
1893
|
-
await ue(g, u, {
|
|
1894
|
-
overrideNavigation: _,
|
|
1895
|
-
// Send fetcher submissions through for shouldRevalidate
|
|
1896
|
-
fetcherSubmission: x,
|
|
1897
|
-
// Preserve this flag across redirects
|
|
1898
|
-
preventScrollReset: fe
|
|
1899
|
-
});
|
|
1900
|
-
}
|
|
1901
|
-
}
|
|
1902
|
-
async function je(i, s, d, v) {
|
|
1903
|
-
try {
|
|
1904
|
-
let x = await Cn(E, i, s, d, v, f, o);
|
|
1905
|
-
return await Promise.all(x.map((C, n) => {
|
|
1906
|
-
if (jn(C)) {
|
|
1907
|
-
let u = C.result;
|
|
1908
|
-
return {
|
|
1909
|
-
type: W.redirect,
|
|
1910
|
-
response: Tn(u, s, d[n].route.id, v, c, p.v7_relativeSplatPath)
|
|
1911
|
-
};
|
|
1912
|
-
}
|
|
1913
|
-
return Nn(C);
|
|
1914
|
-
}));
|
|
1915
|
-
} catch (x) {
|
|
1916
|
-
return d.map(() => ({
|
|
1917
|
-
type: W.error,
|
|
1918
|
-
error: x
|
|
1919
|
-
}));
|
|
1920
|
-
}
|
|
1921
|
-
}
|
|
1922
|
-
async function it(i, s, d, v, x) {
|
|
1923
|
-
let [C, ...n] = await Promise.all([d.length ? je("loader", x, d, s) : [], ...v.map((u) => {
|
|
1924
|
-
if (u.matches && u.match && u.controller) {
|
|
1925
|
-
let g = tt(e.history, u.path, u.controller.signal);
|
|
1926
|
-
return je("loader", g, [u.match], u.matches).then((b) => b[0]);
|
|
1927
|
-
} else
|
|
1928
|
-
return Promise.resolve({
|
|
1929
|
-
type: W.error,
|
|
1930
|
-
error: ae(404, {
|
|
1931
|
-
pathname: u.path
|
|
1932
|
-
})
|
|
1933
|
-
});
|
|
1934
|
-
})]);
|
|
1935
|
-
return await Promise.all([Dr(i, d, C, C.map(() => x.signal), !1, m.loaderData), Dr(i, v.map((u) => u.match), n, v.map((u) => u.controller ? u.controller.signal : null), !0)]), {
|
|
1936
|
-
loaderResults: C,
|
|
1937
|
-
fetcherResults: n
|
|
1938
|
-
};
|
|
1939
|
-
}
|
|
1940
|
-
function Ce() {
|
|
1941
|
-
z = !0, he.push(...He()), _e.forEach((i, s) => {
|
|
1942
|
-
$.has(s) && (We.push(s), Re(s));
|
|
1943
|
-
});
|
|
1944
|
-
}
|
|
1945
|
-
function be(i, s, d) {
|
|
1946
|
-
d === void 0 && (d = {}), m.fetchers.set(i, s), Q({
|
|
1947
|
-
fetchers: new Map(m.fetchers)
|
|
1948
|
-
}, {
|
|
1949
|
-
flushSync: (d && d.flushSync) === !0
|
|
1950
|
-
});
|
|
1951
|
-
}
|
|
1952
|
-
function ve(i, s, d, v) {
|
|
1953
|
-
v === void 0 && (v = {});
|
|
1954
|
-
let x = pt(m.matches, s);
|
|
1955
|
-
Ue(i), Q({
|
|
1956
|
-
errors: {
|
|
1957
|
-
[x.route.id]: d
|
|
1958
|
-
},
|
|
1959
|
-
fetchers: new Map(m.fetchers)
|
|
1960
|
-
}, {
|
|
1961
|
-
flushSync: (v && v.flushSync) === !0
|
|
1962
|
-
});
|
|
1963
|
-
}
|
|
1964
|
-
function lt(i) {
|
|
1965
|
-
return p.v7_fetcherPersist && (Me.set(i, (Me.get(i) || 0) + 1), ge.has(i) && ge.delete(i)), m.fetchers.get(i) || Rn;
|
|
1966
|
-
}
|
|
1967
|
-
function Ue(i) {
|
|
1968
|
-
let s = m.fetchers.get(i);
|
|
1969
|
-
$.has(i) && !(s && s.state === "loading" && Se.has(i)) && Re(i), _e.delete(i), Se.delete(i), pe.delete(i), ge.delete(i), m.fetchers.delete(i);
|
|
1970
|
-
}
|
|
1971
|
-
function Yt(i) {
|
|
1972
|
-
if (p.v7_fetcherPersist) {
|
|
1973
|
-
let s = (Me.get(i) || 0) - 1;
|
|
1974
|
-
s <= 0 ? (Me.delete(i), ge.add(i)) : Me.set(i, s);
|
|
1975
|
-
} else
|
|
1976
|
-
Ue(i);
|
|
1977
|
-
Q({
|
|
1978
|
-
fetchers: new Map(m.fetchers)
|
|
1979
|
-
});
|
|
1980
|
-
}
|
|
1981
|
-
function Re(i) {
|
|
1982
|
-
let s = $.get(i);
|
|
1983
|
-
M(s, "Expected fetch controller: " + i), s.abort(), $.delete(i);
|
|
1984
|
-
}
|
|
1985
|
-
function xt(i) {
|
|
1986
|
-
for (let s of i) {
|
|
1987
|
-
let d = lt(s), v = ke(d.data);
|
|
1988
|
-
m.fetchers.set(s, v);
|
|
1989
|
-
}
|
|
1990
|
-
}
|
|
1991
|
-
function Dt() {
|
|
1992
|
-
let i = [], s = !1;
|
|
1993
|
-
for (let d of pe) {
|
|
1994
|
-
let v = m.fetchers.get(d);
|
|
1995
|
-
M(v, "Expected fetcher: " + d), v.state === "loading" && (pe.delete(d), i.push(d), s = !0);
|
|
1996
|
-
}
|
|
1997
|
-
return xt(i), s;
|
|
1998
|
-
}
|
|
1999
|
-
function St(i) {
|
|
2000
|
-
let s = [];
|
|
2001
|
-
for (let [d, v] of Se)
|
|
2002
|
-
if (v < i) {
|
|
2003
|
-
let x = m.fetchers.get(d);
|
|
2004
|
-
M(x, "Expected fetcher: " + d), x.state === "loading" && (Re(d), Se.delete(d), s.push(d));
|
|
2005
|
-
}
|
|
2006
|
-
return xt(s), s.length > 0;
|
|
2007
|
-
}
|
|
2008
|
-
function Ht(i, s) {
|
|
2009
|
-
let d = m.blockers.get(i) || dt;
|
|
2010
|
-
return ye.get(i) !== s && ye.set(i, s), d;
|
|
2011
|
-
}
|
|
2012
|
-
function _t(i) {
|
|
2013
|
-
m.blockers.delete(i), ye.delete(i);
|
|
2014
|
-
}
|
|
2015
|
-
function Ae(i, s) {
|
|
2016
|
-
let d = m.blockers.get(i) || dt;
|
|
2017
|
-
M(d.state === "unblocked" && s.state === "blocked" || d.state === "blocked" && s.state === "blocked" || d.state === "blocked" && s.state === "proceeding" || d.state === "blocked" && s.state === "unblocked" || d.state === "proceeding" && s.state === "unblocked", "Invalid blocker state transition: " + d.state + " -> " + s.state);
|
|
2018
|
-
let v = new Map(m.blockers);
|
|
2019
|
-
v.set(i, s), Q({
|
|
2020
|
-
blockers: v
|
|
2021
|
-
});
|
|
2022
|
-
}
|
|
2023
|
-
function st(i) {
|
|
2024
|
-
let {
|
|
2025
|
-
currentLocation: s,
|
|
2026
|
-
nextLocation: d,
|
|
2027
|
-
historyAction: v
|
|
2028
|
-
} = i;
|
|
2029
|
-
if (ye.size === 0)
|
|
2030
|
-
return;
|
|
2031
|
-
ye.size > 1 && te(!1, "A router only supports one blocker at a time");
|
|
2032
|
-
let x = Array.from(ye.entries()), [C, n] = x[x.length - 1], u = m.blockers.get(C);
|
|
2033
|
-
if (!(u && u.state === "proceeding") && n({
|
|
2034
|
-
currentLocation: s,
|
|
2035
|
-
nextLocation: d,
|
|
2036
|
-
historyAction: v
|
|
2037
|
-
}))
|
|
2038
|
-
return C;
|
|
2039
|
-
}
|
|
2040
|
-
function we(i) {
|
|
2041
|
-
let s = ae(404, {
|
|
2042
|
-
pathname: i
|
|
2043
|
-
}), d = h || l, {
|
|
2044
|
-
matches: v,
|
|
2045
|
-
route: x
|
|
2046
|
-
} = wr(d);
|
|
2047
|
-
return He(), {
|
|
2048
|
-
notFoundMatches: v,
|
|
2049
|
-
route: x,
|
|
2050
|
-
error: s
|
|
2051
|
-
};
|
|
2052
|
-
}
|
|
2053
|
-
function Ie(i, s) {
|
|
2054
|
-
let d = s.partialMatches, v = d[d.length - 1].route, x = ae(400, {
|
|
2055
|
-
type: "route-discovery",
|
|
2056
|
-
routeId: v.id,
|
|
2057
|
-
pathname: i,
|
|
2058
|
-
message: s.error != null && "message" in s.error ? s.error : String(s.error)
|
|
2059
|
-
});
|
|
2060
|
-
return {
|
|
2061
|
-
notFoundMatches: d,
|
|
2062
|
-
route: v,
|
|
2063
|
-
error: x
|
|
2064
|
-
};
|
|
2065
|
-
}
|
|
2066
|
-
function He(i) {
|
|
2067
|
-
let s = [];
|
|
2068
|
-
return Pe.forEach((d, v) => {
|
|
2069
|
-
(!i || i(v)) && (d.cancel(), s.push(v), Pe.delete(v));
|
|
2070
|
-
}), s;
|
|
2071
|
-
}
|
|
2072
|
-
function Pt(i, s, d) {
|
|
2073
|
-
if (N = i, j = s, S = d || null, !L && m.navigation === Xt) {
|
|
2074
|
-
L = !0;
|
|
2075
|
-
let v = Nt(m.location, m.matches);
|
|
2076
|
-
v != null && Q({
|
|
2077
|
-
restoreScrollPosition: v
|
|
2078
|
-
});
|
|
2079
|
-
}
|
|
2080
|
-
return () => {
|
|
2081
|
-
N = null, j = null, S = null;
|
|
2082
|
-
};
|
|
2083
|
-
}
|
|
2084
|
-
function Ct(i, s) {
|
|
2085
|
-
return S && S(i, s.map((v) => qr(v, m.loaderData))) || i.key;
|
|
2086
|
-
}
|
|
2087
|
-
function Ot(i, s) {
|
|
2088
|
-
if (N && j) {
|
|
2089
|
-
let d = Ct(i, s);
|
|
2090
|
-
N[d] = j();
|
|
2091
|
-
}
|
|
2092
|
-
}
|
|
2093
|
-
function Nt(i, s) {
|
|
2094
|
-
if (N) {
|
|
2095
|
-
let d = Ct(i, s), v = N[d];
|
|
2096
|
-
if (typeof v == "number")
|
|
2097
|
-
return v;
|
|
2098
|
-
}
|
|
2099
|
-
return null;
|
|
2100
|
-
}
|
|
2101
|
-
function Ze(i, s, d) {
|
|
2102
|
-
if (y)
|
|
2103
|
-
if (i) {
|
|
2104
|
-
let v = i[i.length - 1].route;
|
|
2105
|
-
if (v.path && (v.path === "*" || v.path.endsWith("/*")))
|
|
2106
|
-
return {
|
|
2107
|
-
active: !0,
|
|
2108
|
-
matches: Lt(s, d, c, !0)
|
|
2109
|
-
};
|
|
2110
|
-
} else
|
|
2111
|
-
return {
|
|
2112
|
-
active: !0,
|
|
2113
|
-
matches: Lt(s, d, c, !0) || []
|
|
2114
|
-
};
|
|
2115
|
-
return {
|
|
2116
|
-
active: !1,
|
|
2117
|
-
matches: null
|
|
2118
|
-
};
|
|
2119
|
-
}
|
|
2120
|
-
async function Je(i, s, d) {
|
|
2121
|
-
let v = i, x = v.length > 0 ? v[v.length - 1].route : null;
|
|
2122
|
-
for (; ; ) {
|
|
2123
|
-
let C = h == null, n = h || l;
|
|
2124
|
-
try {
|
|
2125
|
-
await _n(y, s, v, n, f, o, nt, d);
|
|
2126
|
-
} catch (w) {
|
|
2127
|
-
return {
|
|
2128
|
-
type: "error",
|
|
2129
|
-
error: w,
|
|
2130
|
-
partialMatches: v
|
|
2131
|
-
};
|
|
2132
|
-
} finally {
|
|
2133
|
-
C && (l = [...l]);
|
|
2134
|
-
}
|
|
2135
|
-
if (d.aborted)
|
|
2136
|
-
return {
|
|
2137
|
-
type: "aborted"
|
|
2138
|
-
};
|
|
2139
|
-
let u = Ke(n, s, c), g = !1;
|
|
2140
|
-
if (u) {
|
|
2141
|
-
let w = u[u.length - 1].route;
|
|
2142
|
-
if (w.index)
|
|
2143
|
-
return {
|
|
2144
|
-
type: "success",
|
|
2145
|
-
matches: u
|
|
2146
|
-
};
|
|
2147
|
-
if (w.path && w.path.length > 0)
|
|
2148
|
-
if (w.path === "*")
|
|
2149
|
-
g = !0;
|
|
2150
|
-
else
|
|
2151
|
-
return {
|
|
2152
|
-
type: "success",
|
|
2153
|
-
matches: u
|
|
2154
|
-
};
|
|
2155
|
-
}
|
|
2156
|
-
let b = Lt(n, s, c, !0);
|
|
2157
|
-
if (!b || v.map((w) => w.route.id).join("-") === b.map((w) => w.route.id).join("-"))
|
|
2158
|
-
return {
|
|
2159
|
-
type: "success",
|
|
2160
|
-
matches: g ? u : null
|
|
2161
|
-
};
|
|
2162
|
-
if (v = b, x = v[v.length - 1].route, x.path === "*")
|
|
2163
|
-
return {
|
|
2164
|
-
type: "success",
|
|
2165
|
-
matches: v
|
|
2166
|
-
};
|
|
2167
|
-
}
|
|
2168
|
-
}
|
|
2169
|
-
function Jt(i) {
|
|
2170
|
-
f = {}, h = mt(i, o, void 0, f);
|
|
2171
|
-
}
|
|
2172
|
-
function Kt(i, s) {
|
|
2173
|
-
let d = h == null;
|
|
2174
|
-
jr(i, s, h || l, f, o), d && (l = [...l], Q({}));
|
|
2175
|
-
}
|
|
2176
|
-
return oe = {
|
|
2177
|
-
get basename() {
|
|
2178
|
-
return c;
|
|
2179
|
-
},
|
|
2180
|
-
get future() {
|
|
2181
|
-
return p;
|
|
2182
|
-
},
|
|
2183
|
-
get state() {
|
|
2184
|
-
return m;
|
|
2185
|
-
},
|
|
2186
|
-
get routes() {
|
|
2187
|
-
return l;
|
|
2188
|
-
},
|
|
2189
|
-
get window() {
|
|
2190
|
-
return t;
|
|
2191
|
-
},
|
|
2192
|
-
initialize: at,
|
|
2193
|
-
subscribe: Vt,
|
|
2194
|
-
enableScrollRestoration: Pt,
|
|
2195
|
-
navigate: bt,
|
|
2196
|
-
fetch: zt,
|
|
2197
|
-
revalidate: Qe,
|
|
2198
|
-
// Passthrough to history-aware createHref used by useHref so we get proper
|
|
2199
|
-
// hash-aware URLs in DOM paths
|
|
2200
|
-
createHref: (i) => e.history.createHref(i),
|
|
2201
|
-
encodeLocation: (i) => e.history.encodeLocation(i),
|
|
2202
|
-
getFetcher: lt,
|
|
2203
|
-
deleteFetcher: Yt,
|
|
2204
|
-
dispose: qe,
|
|
2205
|
-
getBlocker: Ht,
|
|
2206
|
-
deleteBlocker: _t,
|
|
2207
|
-
patchRoutes: Kt,
|
|
2208
|
-
_internalFetchControllers: $,
|
|
2209
|
-
_internalActiveDeferreds: Pe,
|
|
2210
|
-
// TODO: Remove setRoutes, it's temporary to avoid dealing with
|
|
2211
|
-
// updating the tree while validating the update algorithm.
|
|
2212
|
-
_internalSetRoutes: Jt
|
|
2213
|
-
}, oe;
|
|
2214
|
-
}
|
|
2215
|
-
function xn(e) {
|
|
2216
|
-
return e != null && ("formData" in e && e.formData != null || "body" in e && e.body !== void 0);
|
|
2217
|
-
}
|
|
2218
|
-
function Zt(e, t, r, a, o, f, l, h) {
|
|
2219
|
-
let c, E;
|
|
2220
|
-
if (l) {
|
|
2221
|
-
c = [];
|
|
2222
|
-
for (let p of t)
|
|
2223
|
-
if (c.push(p), p.route.id === l) {
|
|
2224
|
-
E = p;
|
|
2225
|
-
break;
|
|
2226
|
-
}
|
|
2227
|
-
} else
|
|
2228
|
-
c = t, E = t[t.length - 1];
|
|
2229
|
-
let y = Ut(o || ".", jt(c, f), Et(e.pathname, r) || e.pathname, h === "path");
|
|
2230
|
-
return o == null && (y.search = e.search, y.hash = e.hash), (o == null || o === "" || o === ".") && E && E.route.index && !rr(y.search) && (y.search = y.search ? y.search.replace(/^\?/, "?index&") : "?index"), a && r !== "/" && (y.pathname = y.pathname === "/" ? r : Ne([r, y.pathname])), yt(y);
|
|
2231
|
-
}
|
|
2232
|
-
function hr(e, t, r, a) {
|
|
2233
|
-
if (!a || !xn(a))
|
|
2234
|
-
return {
|
|
2235
|
-
path: r
|
|
2236
|
-
};
|
|
2237
|
-
if (a.formMethod && !An(a.formMethod))
|
|
2238
|
-
return {
|
|
2239
|
-
path: r,
|
|
2240
|
-
error: ae(405, {
|
|
2241
|
-
method: a.formMethod
|
|
2242
|
-
})
|
|
2243
|
-
};
|
|
2244
|
-
let o = () => ({
|
|
2245
|
-
path: r,
|
|
2246
|
-
error: ae(400, {
|
|
2247
|
-
type: "invalid-body"
|
|
2248
|
-
})
|
|
2249
|
-
}), f = a.formMethod || "get", l = e ? f.toUpperCase() : f.toLowerCase(), h = Ur(r);
|
|
2250
|
-
if (a.body !== void 0) {
|
|
2251
|
-
if (a.formEncType === "text/plain") {
|
|
2252
|
-
if (!Ee(l))
|
|
2253
|
-
return o();
|
|
2254
|
-
let R = typeof a.body == "string" ? a.body : a.body instanceof FormData || a.body instanceof URLSearchParams ? (
|
|
2255
|
-
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data
|
|
2256
|
-
Array.from(a.body.entries()).reduce((U, N) => {
|
|
2257
|
-
let [S, j] = N;
|
|
2258
|
-
return "" + U + S + "=" + j + `
|
|
2259
|
-
`;
|
|
2260
|
-
}, "")
|
|
2261
|
-
) : String(a.body);
|
|
2262
|
-
return {
|
|
2263
|
-
path: r,
|
|
2264
|
-
submission: {
|
|
2265
|
-
formMethod: l,
|
|
2266
|
-
formAction: h,
|
|
2267
|
-
formEncType: a.formEncType,
|
|
2268
|
-
formData: void 0,
|
|
2269
|
-
json: void 0,
|
|
2270
|
-
text: R
|
|
2271
|
-
}
|
|
2272
|
-
};
|
|
2273
|
-
} else if (a.formEncType === "application/json") {
|
|
2274
|
-
if (!Ee(l))
|
|
2275
|
-
return o();
|
|
2276
|
-
try {
|
|
2277
|
-
let R = typeof a.body == "string" ? JSON.parse(a.body) : a.body;
|
|
2278
|
-
return {
|
|
2279
|
-
path: r,
|
|
2280
|
-
submission: {
|
|
2281
|
-
formMethod: l,
|
|
2282
|
-
formAction: h,
|
|
2283
|
-
formEncType: a.formEncType,
|
|
2284
|
-
formData: void 0,
|
|
2285
|
-
json: R,
|
|
2286
|
-
text: void 0
|
|
2287
|
-
}
|
|
2288
|
-
};
|
|
2289
|
-
} catch {
|
|
2290
|
-
return o();
|
|
2291
|
-
}
|
|
2292
|
-
}
|
|
2293
|
-
}
|
|
2294
|
-
M(typeof FormData == "function", "FormData is not available in this environment");
|
|
2295
|
-
let c, E;
|
|
2296
|
-
if (a.formData)
|
|
2297
|
-
c = er(a.formData), E = a.formData;
|
|
2298
|
-
else if (a.body instanceof FormData)
|
|
2299
|
-
c = er(a.body), E = a.body;
|
|
2300
|
-
else if (a.body instanceof URLSearchParams)
|
|
2301
|
-
c = a.body, E = yr(c);
|
|
2302
|
-
else if (a.body == null)
|
|
2303
|
-
c = new URLSearchParams(), E = new FormData();
|
|
2304
|
-
else
|
|
2305
|
-
try {
|
|
2306
|
-
c = new URLSearchParams(a.body), E = yr(c);
|
|
2307
|
-
} catch {
|
|
2308
|
-
return o();
|
|
2309
|
-
}
|
|
2310
|
-
let y = {
|
|
2311
|
-
formMethod: l,
|
|
2312
|
-
formAction: h,
|
|
2313
|
-
formEncType: a && a.formEncType || "application/x-www-form-urlencoded",
|
|
2314
|
-
formData: E,
|
|
2315
|
-
json: void 0,
|
|
2316
|
-
text: void 0
|
|
2317
|
-
};
|
|
2318
|
-
if (Ee(y.formMethod))
|
|
2319
|
-
return {
|
|
2320
|
-
path: r,
|
|
2321
|
-
submission: y
|
|
2322
|
-
};
|
|
2323
|
-
let p = Be(r);
|
|
2324
|
-
return t && p.search && rr(p.search) && c.append("index", ""), p.search = "?" + c, {
|
|
2325
|
-
path: yt(p),
|
|
2326
|
-
submission: y
|
|
2327
|
-
};
|
|
2328
|
-
}
|
|
2329
|
-
function Dn(e, t) {
|
|
2330
|
-
let r = e;
|
|
2331
|
-
if (t) {
|
|
2332
|
-
let a = e.findIndex((o) => o.route.id === t);
|
|
2333
|
-
a >= 0 && (r = e.slice(0, a));
|
|
2334
|
-
}
|
|
2335
|
-
return r;
|
|
2336
|
-
}
|
|
2337
|
-
function pr(e, t, r, a, o, f, l, h, c, E, y, p, R, U, N, S) {
|
|
2338
|
-
let j = S ? de(S[1]) ? S[1].error : S[1].data : void 0, L = e.createURL(t.location), T = e.createURL(o), q = S && de(S[1]) ? S[0] : void 0, ee = q ? Dn(r, q) : r, oe = S ? S[1].statusCode : void 0, m = l && oe && oe >= 400, ie = ee.filter((B, re) => {
|
|
2339
|
-
let {
|
|
2340
|
-
route: X
|
|
2341
|
-
} = B;
|
|
2342
|
-
if (X.lazy)
|
|
2343
|
-
return !0;
|
|
2344
|
-
if (X.loader == null)
|
|
2345
|
-
return !1;
|
|
2346
|
-
if (f)
|
|
2347
|
-
return typeof X.loader != "function" || X.loader.hydrate ? !0 : t.loaderData[X.id] === void 0 && // Don't re-run if the loader ran and threw an error
|
|
2348
|
-
(!t.errors || t.errors[X.id] === void 0);
|
|
2349
|
-
if (Sn(t.loaderData, t.matches[re], B) || c.some((z) => z === B.route.id))
|
|
2350
|
-
return !0;
|
|
2351
|
-
let se = t.matches[re], J = B;
|
|
2352
|
-
return vr(B, Y({
|
|
2353
|
-
currentUrl: L,
|
|
2354
|
-
currentParams: se.params,
|
|
2355
|
-
nextUrl: T,
|
|
2356
|
-
nextParams: J.params
|
|
2357
|
-
}, a, {
|
|
2358
|
-
actionResult: j,
|
|
2359
|
-
unstable_actionStatus: oe,
|
|
2360
|
-
defaultShouldRevalidate: m ? !1 : (
|
|
2361
|
-
// Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate
|
|
2362
|
-
h || L.pathname + L.search === T.pathname + T.search || // Search params affect all loaders
|
|
2363
|
-
L.search !== T.search || Fr(se, J)
|
|
2364
|
-
)
|
|
2365
|
-
}));
|
|
2366
|
-
}), fe = [];
|
|
2367
|
-
return p.forEach((B, re) => {
|
|
2368
|
-
if (f || !r.some((he) => he.route.id === B.routeId) || y.has(re))
|
|
2369
|
-
return;
|
|
2370
|
-
let X = Ke(U, B.path, N);
|
|
2371
|
-
if (!X) {
|
|
2372
|
-
fe.push({
|
|
2373
|
-
key: re,
|
|
2374
|
-
routeId: B.routeId,
|
|
2375
|
-
path: B.path,
|
|
2376
|
-
matches: null,
|
|
2377
|
-
match: null,
|
|
2378
|
-
controller: null
|
|
2379
|
-
});
|
|
2380
|
-
return;
|
|
2381
|
-
}
|
|
2382
|
-
let se = t.fetchers.get(re), J = ht(X, B.path), z = !1;
|
|
2383
|
-
R.has(re) ? z = !1 : E.includes(re) ? z = !0 : se && se.state !== "idle" && se.data === void 0 ? z = h : z = vr(J, Y({
|
|
2384
|
-
currentUrl: L,
|
|
2385
|
-
currentParams: t.matches[t.matches.length - 1].params,
|
|
2386
|
-
nextUrl: T,
|
|
2387
|
-
nextParams: r[r.length - 1].params
|
|
2388
|
-
}, a, {
|
|
2389
|
-
actionResult: j,
|
|
2390
|
-
unstable_actionStatus: oe,
|
|
2391
|
-
defaultShouldRevalidate: m ? !1 : h
|
|
2392
|
-
})), z && fe.push({
|
|
2393
|
-
key: re,
|
|
2394
|
-
routeId: B.routeId,
|
|
2395
|
-
path: B.path,
|
|
2396
|
-
matches: X,
|
|
2397
|
-
match: J,
|
|
2398
|
-
controller: new AbortController()
|
|
2399
|
-
});
|
|
2400
|
-
}), [ie, fe];
|
|
2401
|
-
}
|
|
2402
|
-
function Sn(e, t, r) {
|
|
2403
|
-
let a = (
|
|
2404
|
-
// [a] -> [a, b]
|
|
2405
|
-
!t || // [a, b] -> [a, c]
|
|
2406
|
-
r.route.id !== t.route.id
|
|
2407
|
-
), o = e[r.route.id] === void 0;
|
|
2408
|
-
return a || o;
|
|
2409
|
-
}
|
|
2410
|
-
function Fr(e, t) {
|
|
2411
|
-
let r = e.route.path;
|
|
2412
|
-
return (
|
|
2413
|
-
// param change for this match, /users/123 -> /users/456
|
|
2414
|
-
e.pathname !== t.pathname || // splat param changed, which is not present in match.path
|
|
2415
|
-
// e.g. /files/images/avatar.jpg -> files/finances.xls
|
|
2416
|
-
r != null && r.endsWith("*") && e.params["*"] !== t.params["*"]
|
|
2417
|
-
);
|
|
2418
|
-
}
|
|
2419
|
-
function vr(e, t) {
|
|
2420
|
-
if (e.route.shouldRevalidate) {
|
|
2421
|
-
let r = e.route.shouldRevalidate(t);
|
|
2422
|
-
if (typeof r == "boolean")
|
|
2423
|
-
return r;
|
|
2424
|
-
}
|
|
2425
|
-
return t.defaultShouldRevalidate;
|
|
2426
|
-
}
|
|
2427
|
-
async function _n(e, t, r, a, o, f, l, h) {
|
|
2428
|
-
let c = [t, ...r.map((E) => E.route.id)].join("-");
|
|
2429
|
-
try {
|
|
2430
|
-
let E = l.get(c);
|
|
2431
|
-
E || (E = e({
|
|
2432
|
-
path: t,
|
|
2433
|
-
matches: r,
|
|
2434
|
-
patch: (y, p) => {
|
|
2435
|
-
h.aborted || jr(y, p, a, o, f);
|
|
2436
|
-
}
|
|
2437
|
-
}), l.set(c, E)), E && Fn(E) && await E;
|
|
2438
|
-
} finally {
|
|
2439
|
-
l.delete(c);
|
|
2440
|
-
}
|
|
2441
|
-
}
|
|
2442
|
-
function jr(e, t, r, a, o) {
|
|
2443
|
-
if (e) {
|
|
2444
|
-
var f;
|
|
2445
|
-
let l = a[e];
|
|
2446
|
-
M(l, "No route found to patch children into: routeId = " + e);
|
|
2447
|
-
let h = mt(t, o, [e, "patch", String(((f = l.children) == null ? void 0 : f.length) || "0")], a);
|
|
2448
|
-
l.children ? l.children.push(...h) : l.children = h;
|
|
2449
|
-
} else {
|
|
2450
|
-
let l = mt(t, o, ["patch", String(r.length || "0")], a);
|
|
2451
|
-
r.push(...l);
|
|
2452
|
-
}
|
|
2453
|
-
}
|
|
2454
|
-
async function mr(e, t, r) {
|
|
2455
|
-
if (!e.lazy)
|
|
2456
|
-
return;
|
|
2457
|
-
let a = await e.lazy();
|
|
2458
|
-
if (!e.lazy)
|
|
2459
|
-
return;
|
|
2460
|
-
let o = r[e.id];
|
|
2461
|
-
M(o, "No route found in manifest");
|
|
2462
|
-
let f = {};
|
|
2463
|
-
for (let l in a) {
|
|
2464
|
-
let c = o[l] !== void 0 && // This property isn't static since it should always be updated based
|
|
2465
|
-
// on the route updates
|
|
2466
|
-
l !== "hasErrorBoundary";
|
|
2467
|
-
te(!c, 'Route "' + o.id + '" has a static property "' + l + '" defined but its lazy function is also returning a value for this property. ' + ('The lazy route property "' + l + '" will be ignored.')), !c && !Gr.has(l) && (f[l] = a[l]);
|
|
2468
|
-
}
|
|
2469
|
-
Object.assign(o, f), Object.assign(o, Y({}, t(o), {
|
|
2470
|
-
lazy: void 0
|
|
2471
|
-
}));
|
|
2472
|
-
}
|
|
2473
|
-
function Pn(e) {
|
|
2474
|
-
return Promise.all(e.matches.map((t) => t.resolve()));
|
|
2475
|
-
}
|
|
2476
|
-
async function Cn(e, t, r, a, o, f, l, h) {
|
|
2477
|
-
let c = a.reduce((p, R) => p.add(R.route.id), /* @__PURE__ */ new Set()), E = /* @__PURE__ */ new Set(), y = await e({
|
|
2478
|
-
matches: o.map((p) => {
|
|
2479
|
-
let R = c.has(p.route.id);
|
|
2480
|
-
return Y({}, p, {
|
|
2481
|
-
shouldLoad: R,
|
|
2482
|
-
resolve: (N) => (E.add(p.route.id), R ? On(t, r, p, f, l, N, h) : Promise.resolve({
|
|
2483
|
-
type: W.data,
|
|
2484
|
-
result: void 0
|
|
2485
|
-
}))
|
|
2486
|
-
});
|
|
2487
|
-
}),
|
|
2488
|
-
request: r,
|
|
2489
|
-
params: o[0].params,
|
|
2490
|
-
context: h
|
|
2491
|
-
});
|
|
2492
|
-
return o.forEach((p) => M(E.has(p.route.id), '`match.resolve()` was not called for route id "' + p.route.id + '". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')), y.filter((p, R) => c.has(o[R].route.id));
|
|
2493
|
-
}
|
|
2494
|
-
async function On(e, t, r, a, o, f, l) {
|
|
2495
|
-
let h, c, E = (y) => {
|
|
2496
|
-
let p, R = new Promise((S, j) => p = j);
|
|
2497
|
-
c = () => p(), t.signal.addEventListener("abort", c);
|
|
2498
|
-
let U = (S) => typeof y != "function" ? Promise.reject(new Error("You cannot call the handler for a route which defines a boolean " + ('"' + e + '" [routeId: ' + r.route.id + "]"))) : y({
|
|
2499
|
-
request: t,
|
|
2500
|
-
params: r.params,
|
|
2501
|
-
context: l
|
|
2502
|
-
}, ...S !== void 0 ? [S] : []), N;
|
|
2503
|
-
return f ? N = f((S) => U(S)) : N = (async () => {
|
|
2504
|
-
try {
|
|
2505
|
-
return {
|
|
2506
|
-
type: "data",
|
|
2507
|
-
result: await U()
|
|
2508
|
-
};
|
|
2509
|
-
} catch (S) {
|
|
2510
|
-
return {
|
|
2511
|
-
type: "error",
|
|
2512
|
-
result: S
|
|
2513
|
-
};
|
|
2514
|
-
}
|
|
2515
|
-
})(), Promise.race([N, R]);
|
|
2516
|
-
};
|
|
2517
|
-
try {
|
|
2518
|
-
let y = r.route[e];
|
|
2519
|
-
if (r.route.lazy)
|
|
2520
|
-
if (y) {
|
|
2521
|
-
let p, [R] = await Promise.all([
|
|
2522
|
-
// If the handler throws, don't let it immediately bubble out,
|
|
2523
|
-
// since we need to let the lazy() execution finish so we know if this
|
|
2524
|
-
// route has a boundary that can handle the error
|
|
2525
|
-
E(y).catch((U) => {
|
|
2526
|
-
p = U;
|
|
2527
|
-
}),
|
|
2528
|
-
mr(r.route, o, a)
|
|
2529
|
-
]);
|
|
2530
|
-
if (p !== void 0)
|
|
2531
|
-
throw p;
|
|
2532
|
-
h = R;
|
|
2533
|
-
} else if (await mr(r.route, o, a), y = r.route[e], y)
|
|
2534
|
-
h = await E(y);
|
|
2535
|
-
else if (e === "action") {
|
|
2536
|
-
let p = new URL(t.url), R = p.pathname + p.search;
|
|
2537
|
-
throw ae(405, {
|
|
2538
|
-
method: t.method,
|
|
2539
|
-
pathname: R,
|
|
2540
|
-
routeId: r.route.id
|
|
2541
|
-
});
|
|
2542
|
-
} else
|
|
2543
|
-
return {
|
|
2544
|
-
type: W.data,
|
|
2545
|
-
result: void 0
|
|
2546
|
-
};
|
|
2547
|
-
else if (y)
|
|
2548
|
-
h = await E(y);
|
|
2549
|
-
else {
|
|
2550
|
-
let p = new URL(t.url), R = p.pathname + p.search;
|
|
2551
|
-
throw ae(404, {
|
|
2552
|
-
pathname: R
|
|
2553
|
-
});
|
|
2554
|
-
}
|
|
2555
|
-
M(h.result !== void 0, "You defined " + (e === "action" ? "an action" : "a loader") + " for route " + ('"' + r.route.id + "\" but didn't return anything from your `" + e + "` ") + "function. Please return a value or `null`.");
|
|
2556
|
-
} catch (y) {
|
|
2557
|
-
return {
|
|
2558
|
-
type: W.error,
|
|
2559
|
-
result: y
|
|
2560
|
-
};
|
|
2561
|
-
} finally {
|
|
2562
|
-
c && t.signal.removeEventListener("abort", c);
|
|
2563
|
-
}
|
|
2564
|
-
return h;
|
|
2565
|
-
}
|
|
2566
|
-
async function Nn(e) {
|
|
2567
|
-
let {
|
|
2568
|
-
result: t,
|
|
2569
|
-
type: r,
|
|
2570
|
-
status: a
|
|
2571
|
-
} = e;
|
|
2572
|
-
if (Ar(t)) {
|
|
2573
|
-
let l;
|
|
2574
|
-
try {
|
|
2575
|
-
let h = t.headers.get("Content-Type");
|
|
2576
|
-
h && /\bapplication\/json\b/.test(h) ? t.body == null ? l = null : l = await t.json() : l = await t.text();
|
|
2577
|
-
} catch (h) {
|
|
2578
|
-
return {
|
|
2579
|
-
type: W.error,
|
|
2580
|
-
error: h
|
|
2581
|
-
};
|
|
2582
|
-
}
|
|
2583
|
-
return r === W.error ? {
|
|
2584
|
-
type: W.error,
|
|
2585
|
-
error: new Tr(t.status, t.statusText, l),
|
|
2586
|
-
statusCode: t.status,
|
|
2587
|
-
headers: t.headers
|
|
2588
|
-
} : {
|
|
2589
|
-
type: W.data,
|
|
2590
|
-
data: l,
|
|
2591
|
-
statusCode: t.status,
|
|
2592
|
-
headers: t.headers
|
|
2593
|
-
};
|
|
2594
|
-
}
|
|
2595
|
-
if (r === W.error)
|
|
2596
|
-
return {
|
|
2597
|
-
type: W.error,
|
|
2598
|
-
error: t,
|
|
2599
|
-
statusCode: At(t) ? t.status : a
|
|
2600
|
-
};
|
|
2601
|
-
if (Un(t)) {
|
|
2602
|
-
var o, f;
|
|
2603
|
-
return {
|
|
2604
|
-
type: W.deferred,
|
|
2605
|
-
deferredData: t,
|
|
2606
|
-
statusCode: (o = t.init) == null ? void 0 : o.status,
|
|
2607
|
-
headers: ((f = t.init) == null ? void 0 : f.headers) && new Headers(t.init.headers)
|
|
2608
|
-
};
|
|
2609
|
-
}
|
|
2610
|
-
return {
|
|
2611
|
-
type: W.data,
|
|
2612
|
-
data: t,
|
|
2613
|
-
statusCode: a
|
|
2614
|
-
};
|
|
2615
|
-
}
|
|
2616
|
-
function Tn(e, t, r, a, o, f) {
|
|
2617
|
-
let l = e.headers.get("Location");
|
|
2618
|
-
if (M(l, "Redirects returned/thrown from loaders/actions must have a Location header"), !tr.test(l)) {
|
|
2619
|
-
let h = a.slice(0, a.findIndex((c) => c.route.id === r) + 1);
|
|
2620
|
-
l = Zt(new URL(t.url), h, o, !0, l, f), e.headers.set("Location", l);
|
|
2621
|
-
}
|
|
2622
|
-
return e;
|
|
2623
|
-
}
|
|
2624
|
-
function gr(e, t, r) {
|
|
2625
|
-
if (tr.test(e)) {
|
|
2626
|
-
let a = e, o = a.startsWith("//") ? new URL(t.protocol + a) : new URL(a), f = Et(o.pathname, r) != null;
|
|
2627
|
-
if (o.origin === t.origin && f)
|
|
2628
|
-
return o.pathname + o.search + o.hash;
|
|
2629
|
-
}
|
|
2630
|
-
return e;
|
|
2631
|
-
}
|
|
2632
|
-
function tt(e, t, r, a) {
|
|
2633
|
-
let o = e.createURL(Ur(t)).toString(), f = {
|
|
2634
|
-
signal: r
|
|
2635
|
-
};
|
|
2636
|
-
if (a && Ee(a.formMethod)) {
|
|
2637
|
-
let {
|
|
2638
|
-
formMethod: l,
|
|
2639
|
-
formEncType: h
|
|
2640
|
-
} = a;
|
|
2641
|
-
f.method = l.toUpperCase(), h === "application/json" ? (f.headers = new Headers({
|
|
2642
|
-
"Content-Type": h
|
|
2643
|
-
}), f.body = JSON.stringify(a.json)) : h === "text/plain" ? f.body = a.text : h === "application/x-www-form-urlencoded" && a.formData ? f.body = er(a.formData) : f.body = a.formData;
|
|
2644
|
-
}
|
|
2645
|
-
return new Request(o, f);
|
|
2646
|
-
}
|
|
2647
|
-
function er(e) {
|
|
2648
|
-
let t = new URLSearchParams();
|
|
2649
|
-
for (let [r, a] of e.entries())
|
|
2650
|
-
t.append(r, typeof a == "string" ? a : a.name);
|
|
2651
|
-
return t;
|
|
2652
|
-
}
|
|
2653
|
-
function yr(e) {
|
|
2654
|
-
let t = new FormData();
|
|
2655
|
-
for (let [r, a] of e.entries())
|
|
2656
|
-
t.append(r, a);
|
|
2657
|
-
return t;
|
|
2658
|
-
}
|
|
2659
|
-
function Mn(e, t, r, a, o, f) {
|
|
2660
|
-
let l = {}, h = null, c, E = !1, y = {}, p = a && de(a[1]) ? a[1].error : void 0;
|
|
2661
|
-
return r.forEach((R, U) => {
|
|
2662
|
-
let N = t[U].route.id;
|
|
2663
|
-
if (M(!Xe(R), "Cannot handle redirect results in processLoaderData"), de(R)) {
|
|
2664
|
-
let S = R.error;
|
|
2665
|
-
p !== void 0 && (S = p, p = void 0), h = h || {};
|
|
2666
|
-
{
|
|
2667
|
-
let j = pt(e, N);
|
|
2668
|
-
h[j.route.id] == null && (h[j.route.id] = S);
|
|
2669
|
-
}
|
|
2670
|
-
l[N] = void 0, E || (E = !0, c = At(R.error) ? R.error.status : 500), R.headers && (y[N] = R.headers);
|
|
2671
|
-
} else
|
|
2672
|
-
Ge(R) ? (o.set(N, R.deferredData), l[N] = R.deferredData.data, R.statusCode != null && R.statusCode !== 200 && !E && (c = R.statusCode), R.headers && (y[N] = R.headers)) : (l[N] = R.data, R.statusCode && R.statusCode !== 200 && !E && (c = R.statusCode), R.headers && (y[N] = R.headers));
|
|
2673
|
-
}), p !== void 0 && a && (h = {
|
|
2674
|
-
[a[0]]: p
|
|
2675
|
-
}, l[a[0]] = void 0), {
|
|
2676
|
-
loaderData: l,
|
|
2677
|
-
errors: h,
|
|
2678
|
-
statusCode: c || 200,
|
|
2679
|
-
loaderHeaders: y
|
|
2680
|
-
};
|
|
2681
|
-
}
|
|
2682
|
-
function Er(e, t, r, a, o, f, l, h) {
|
|
2683
|
-
let {
|
|
2684
|
-
loaderData: c,
|
|
2685
|
-
errors: E
|
|
2686
|
-
} = Mn(t, r, a, o, h);
|
|
2687
|
-
for (let y = 0; y < f.length; y++) {
|
|
2688
|
-
let {
|
|
2689
|
-
key: p,
|
|
2690
|
-
match: R,
|
|
2691
|
-
controller: U
|
|
2692
|
-
} = f[y];
|
|
2693
|
-
M(l !== void 0 && l[y] !== void 0, "Did not find corresponding fetcher result");
|
|
2694
|
-
let N = l[y];
|
|
2695
|
-
if (!(U && U.signal.aborted))
|
|
2696
|
-
if (de(N)) {
|
|
2697
|
-
let S = pt(e.matches, R == null ? void 0 : R.route.id);
|
|
2698
|
-
E && E[S.route.id] || (E = Y({}, E, {
|
|
2699
|
-
[S.route.id]: N.error
|
|
2700
|
-
})), e.fetchers.delete(p);
|
|
2701
|
-
} else if (Xe(N))
|
|
2702
|
-
M(!1, "Unhandled fetcher revalidation redirect");
|
|
2703
|
-
else if (Ge(N))
|
|
2704
|
-
M(!1, "Unhandled fetcher deferred data");
|
|
2705
|
-
else {
|
|
2706
|
-
let S = ke(N.data);
|
|
2707
|
-
e.fetchers.set(p, S);
|
|
2708
|
-
}
|
|
2709
|
-
}
|
|
2710
|
-
return {
|
|
2711
|
-
loaderData: c,
|
|
2712
|
-
errors: E
|
|
2713
|
-
};
|
|
2714
|
-
}
|
|
2715
|
-
function br(e, t, r, a) {
|
|
2716
|
-
let o = Y({}, t);
|
|
2717
|
-
for (let f of r) {
|
|
2718
|
-
let l = f.route.id;
|
|
2719
|
-
if (t.hasOwnProperty(l) ? t[l] !== void 0 && (o[l] = t[l]) : e[l] !== void 0 && f.route.loader && (o[l] = e[l]), a && a.hasOwnProperty(l))
|
|
2720
|
-
break;
|
|
2721
|
-
}
|
|
2722
|
-
return o;
|
|
2723
|
-
}
|
|
2724
|
-
function Rr(e) {
|
|
2725
|
-
return e ? de(e[1]) ? {
|
|
2726
|
-
// Clear out prior actionData on errors
|
|
2727
|
-
actionData: {}
|
|
2728
|
-
} : {
|
|
2729
|
-
actionData: {
|
|
2730
|
-
[e[0]]: e[1].data
|
|
2731
|
-
}
|
|
2732
|
-
} : {};
|
|
2733
|
-
}
|
|
2734
|
-
function pt(e, t) {
|
|
2735
|
-
return (t ? e.slice(0, e.findIndex((a) => a.route.id === t) + 1) : [...e]).reverse().find((a) => a.route.hasErrorBoundary === !0) || e[0];
|
|
2736
|
-
}
|
|
2737
|
-
function wr(e) {
|
|
2738
|
-
let t = e.length === 1 ? e[0] : e.find((r) => r.index || !r.path || r.path === "/") || {
|
|
2739
|
-
id: "__shim-error-route__"
|
|
2740
|
-
};
|
|
2741
|
-
return {
|
|
2742
|
-
matches: [{
|
|
2743
|
-
params: {},
|
|
2744
|
-
pathname: "",
|
|
2745
|
-
pathnameBase: "",
|
|
2746
|
-
route: t
|
|
2747
|
-
}],
|
|
2748
|
-
route: t
|
|
2749
|
-
};
|
|
2750
|
-
}
|
|
2751
|
-
function ae(e, t) {
|
|
2752
|
-
let {
|
|
2753
|
-
pathname: r,
|
|
2754
|
-
routeId: a,
|
|
2755
|
-
method: o,
|
|
2756
|
-
type: f,
|
|
2757
|
-
message: l
|
|
2758
|
-
} = t === void 0 ? {} : t, h = "Unknown Server Error", c = "Unknown @remix-run/router error";
|
|
2759
|
-
return e === 400 ? (h = "Bad Request", f === "route-discovery" ? c = 'Unable to match URL "' + r + '" - the `children()` function for ' + ("route `" + a + "` threw the following error:\n" + l) : o && r && a ? c = "You made a " + o + ' request to "' + r + '" but ' + ('did not provide a `loader` for route "' + a + '", ') + "so there is no way to handle the request." : f === "defer-action" ? c = "defer() is not supported in actions" : f === "invalid-body" && (c = "Unable to encode submission body")) : e === 403 ? (h = "Forbidden", c = 'Route "' + a + '" does not match URL "' + r + '"') : e === 404 ? (h = "Not Found", c = 'No route matches URL "' + r + '"') : e === 405 && (h = "Method Not Allowed", o && r && a ? c = "You made a " + o.toUpperCase() + ' request to "' + r + '" but ' + ('did not provide an `action` for route "' + a + '", ') + "so there is no way to handle the request." : o && (c = 'Invalid request method "' + o.toUpperCase() + '"')), new Tr(e || 500, h, new Error(c), !0);
|
|
2760
|
-
}
|
|
2761
|
-
function xr(e) {
|
|
2762
|
-
for (let t = e.length - 1; t >= 0; t--) {
|
|
2763
|
-
let r = e[t];
|
|
2764
|
-
if (Xe(r))
|
|
2765
|
-
return {
|
|
2766
|
-
result: r,
|
|
2767
|
-
idx: t
|
|
2768
|
-
};
|
|
2769
|
-
}
|
|
2770
|
-
}
|
|
2771
|
-
function Ur(e) {
|
|
2772
|
-
let t = typeof e == "string" ? Be(e) : e;
|
|
2773
|
-
return yt(Y({}, t, {
|
|
2774
|
-
hash: ""
|
|
2775
|
-
}));
|
|
2776
|
-
}
|
|
2777
|
-
function Ln(e, t) {
|
|
2778
|
-
return e.pathname !== t.pathname || e.search !== t.search ? !1 : e.hash === "" ? t.hash !== "" : e.hash === t.hash ? !0 : t.hash !== "";
|
|
2779
|
-
}
|
|
2780
|
-
function Fn(e) {
|
|
2781
|
-
return typeof e == "object" && e != null && "then" in e;
|
|
2782
|
-
}
|
|
2783
|
-
function jn(e) {
|
|
2784
|
-
return Ar(e.result) && En.has(e.result.status);
|
|
2785
|
-
}
|
|
2786
|
-
function Ge(e) {
|
|
2787
|
-
return e.type === W.deferred;
|
|
2788
|
-
}
|
|
2789
|
-
function de(e) {
|
|
2790
|
-
return e.type === W.error;
|
|
2791
|
-
}
|
|
2792
|
-
function Xe(e) {
|
|
2793
|
-
return (e && e.type) === W.redirect;
|
|
2794
|
-
}
|
|
2795
|
-
function Un(e) {
|
|
2796
|
-
let t = e;
|
|
2797
|
-
return t && typeof t == "object" && typeof t.data == "object" && typeof t.subscribe == "function" && typeof t.cancel == "function" && typeof t.resolveData == "function";
|
|
2798
|
-
}
|
|
2799
|
-
function Ar(e) {
|
|
2800
|
-
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.headers == "object" && typeof e.body < "u";
|
|
2801
|
-
}
|
|
2802
|
-
function An(e) {
|
|
2803
|
-
return yn.has(e.toLowerCase());
|
|
2804
|
-
}
|
|
2805
|
-
function Ee(e) {
|
|
2806
|
-
return mn.has(e.toLowerCase());
|
|
2807
|
-
}
|
|
2808
|
-
async function Dr(e, t, r, a, o, f) {
|
|
2809
|
-
for (let l = 0; l < r.length; l++) {
|
|
2810
|
-
let h = r[l], c = t[l];
|
|
2811
|
-
if (!c)
|
|
2812
|
-
continue;
|
|
2813
|
-
let E = e.find((p) => p.route.id === c.route.id), y = E != null && !Fr(E, c) && (f && f[c.route.id]) !== void 0;
|
|
2814
|
-
if (Ge(h) && (o || y)) {
|
|
2815
|
-
let p = a[l];
|
|
2816
|
-
M(p, "Expected an AbortSignal for revalidating fetcher deferred result"), await Ir(h, p, o).then((R) => {
|
|
2817
|
-
R && (r[l] = R || r[l]);
|
|
2818
|
-
});
|
|
2819
|
-
}
|
|
2820
|
-
}
|
|
2821
|
-
}
|
|
2822
|
-
async function Ir(e, t, r) {
|
|
2823
|
-
if (r === void 0 && (r = !1), !await e.deferredData.resolveData(t)) {
|
|
2824
|
-
if (r)
|
|
2825
|
-
try {
|
|
2826
|
-
return {
|
|
2827
|
-
type: W.data,
|
|
2828
|
-
data: e.deferredData.unwrappedData
|
|
2829
|
-
};
|
|
2830
|
-
} catch (o) {
|
|
2831
|
-
return {
|
|
2832
|
-
type: W.error,
|
|
2833
|
-
error: o
|
|
2834
|
-
};
|
|
2835
|
-
}
|
|
2836
|
-
return {
|
|
2837
|
-
type: W.data,
|
|
2838
|
-
data: e.deferredData.data
|
|
2839
|
-
};
|
|
2840
|
-
}
|
|
2841
|
-
}
|
|
2842
|
-
function rr(e) {
|
|
2843
|
-
return new URLSearchParams(e).getAll("index").some((t) => t === "");
|
|
2844
|
-
}
|
|
2845
|
-
function ht(e, t) {
|
|
2846
|
-
let r = typeof t == "string" ? Be(t).search : t.search;
|
|
2847
|
-
if (e[e.length - 1].route.index && rr(r || ""))
|
|
2848
|
-
return e[e.length - 1];
|
|
2849
|
-
let a = Nr(e);
|
|
2850
|
-
return a[a.length - 1];
|
|
2851
|
-
}
|
|
2852
|
-
function Sr(e) {
|
|
2853
|
-
let {
|
|
2854
|
-
formMethod: t,
|
|
2855
|
-
formAction: r,
|
|
2856
|
-
formEncType: a,
|
|
2857
|
-
text: o,
|
|
2858
|
-
formData: f,
|
|
2859
|
-
json: l
|
|
2860
|
-
} = e;
|
|
2861
|
-
if (!(!t || !r || !a)) {
|
|
2862
|
-
if (o != null)
|
|
2863
|
-
return {
|
|
2864
|
-
formMethod: t,
|
|
2865
|
-
formAction: r,
|
|
2866
|
-
formEncType: a,
|
|
2867
|
-
formData: void 0,
|
|
2868
|
-
json: void 0,
|
|
2869
|
-
text: o
|
|
2870
|
-
};
|
|
2871
|
-
if (f != null)
|
|
2872
|
-
return {
|
|
2873
|
-
formMethod: t,
|
|
2874
|
-
formAction: r,
|
|
2875
|
-
formEncType: a,
|
|
2876
|
-
formData: f,
|
|
2877
|
-
json: void 0,
|
|
2878
|
-
text: void 0
|
|
2879
|
-
};
|
|
2880
|
-
if (l !== void 0)
|
|
2881
|
-
return {
|
|
2882
|
-
formMethod: t,
|
|
2883
|
-
formAction: r,
|
|
2884
|
-
formEncType: a,
|
|
2885
|
-
formData: void 0,
|
|
2886
|
-
json: l,
|
|
2887
|
-
text: void 0
|
|
2888
|
-
};
|
|
2889
|
-
}
|
|
2890
|
-
}
|
|
2891
|
-
function qt(e, t) {
|
|
2892
|
-
return t ? {
|
|
2893
|
-
state: "loading",
|
|
2894
|
-
location: e,
|
|
2895
|
-
formMethod: t.formMethod,
|
|
2896
|
-
formAction: t.formAction,
|
|
2897
|
-
formEncType: t.formEncType,
|
|
2898
|
-
formData: t.formData,
|
|
2899
|
-
json: t.json,
|
|
2900
|
-
text: t.text
|
|
2901
|
-
} : {
|
|
2902
|
-
state: "loading",
|
|
2903
|
-
location: e,
|
|
2904
|
-
formMethod: void 0,
|
|
2905
|
-
formAction: void 0,
|
|
2906
|
-
formEncType: void 0,
|
|
2907
|
-
formData: void 0,
|
|
2908
|
-
json: void 0,
|
|
2909
|
-
text: void 0
|
|
2910
|
-
};
|
|
2911
|
-
}
|
|
2912
|
-
function In(e, t) {
|
|
2913
|
-
return {
|
|
2914
|
-
state: "submitting",
|
|
2915
|
-
location: e,
|
|
2916
|
-
formMethod: t.formMethod,
|
|
2917
|
-
formAction: t.formAction,
|
|
2918
|
-
formEncType: t.formEncType,
|
|
2919
|
-
formData: t.formData,
|
|
2920
|
-
json: t.json,
|
|
2921
|
-
text: t.text
|
|
2922
|
-
};
|
|
2923
|
-
}
|
|
2924
|
-
function ft(e, t) {
|
|
2925
|
-
return e ? {
|
|
2926
|
-
state: "loading",
|
|
2927
|
-
formMethod: e.formMethod,
|
|
2928
|
-
formAction: e.formAction,
|
|
2929
|
-
formEncType: e.formEncType,
|
|
2930
|
-
formData: e.formData,
|
|
2931
|
-
json: e.json,
|
|
2932
|
-
text: e.text,
|
|
2933
|
-
data: t
|
|
2934
|
-
} : {
|
|
2935
|
-
state: "loading",
|
|
2936
|
-
formMethod: void 0,
|
|
2937
|
-
formAction: void 0,
|
|
2938
|
-
formEncType: void 0,
|
|
2939
|
-
formData: void 0,
|
|
2940
|
-
json: void 0,
|
|
2941
|
-
text: void 0,
|
|
2942
|
-
data: t
|
|
2943
|
-
};
|
|
2944
|
-
}
|
|
2945
|
-
function kn(e, t) {
|
|
2946
|
-
return {
|
|
2947
|
-
state: "submitting",
|
|
2948
|
-
formMethod: e.formMethod,
|
|
2949
|
-
formAction: e.formAction,
|
|
2950
|
-
formEncType: e.formEncType,
|
|
2951
|
-
formData: e.formData,
|
|
2952
|
-
json: e.json,
|
|
2953
|
-
text: e.text,
|
|
2954
|
-
data: t ? t.data : void 0
|
|
2955
|
-
};
|
|
2956
|
-
}
|
|
2957
|
-
function ke(e) {
|
|
2958
|
-
return {
|
|
2959
|
-
state: "idle",
|
|
2960
|
-
formMethod: void 0,
|
|
2961
|
-
formAction: void 0,
|
|
2962
|
-
formEncType: void 0,
|
|
2963
|
-
formData: void 0,
|
|
2964
|
-
json: void 0,
|
|
2965
|
-
text: void 0,
|
|
2966
|
-
data: e
|
|
2967
|
-
};
|
|
2968
|
-
}
|
|
2969
|
-
function Bn(e, t) {
|
|
2970
|
-
try {
|
|
2971
|
-
let r = e.sessionStorage.getItem(Lr);
|
|
2972
|
-
if (r) {
|
|
2973
|
-
let a = JSON.parse(r);
|
|
2974
|
-
for (let [o, f] of Object.entries(a || {}))
|
|
2975
|
-
f && Array.isArray(f) && t.set(o, new Set(f || []));
|
|
2976
|
-
}
|
|
2977
|
-
} catch {
|
|
2978
|
-
}
|
|
2979
|
-
}
|
|
2980
|
-
function Vn(e, t) {
|
|
2981
|
-
if (t.size > 0) {
|
|
2982
|
-
let r = {};
|
|
2983
|
-
for (let [a, o] of t)
|
|
2984
|
-
r[a] = [...o];
|
|
2985
|
-
try {
|
|
2986
|
-
e.sessionStorage.setItem(Lr, JSON.stringify(r));
|
|
2987
|
-
} catch (a) {
|
|
2988
|
-
te(!1, "Failed to save applied view transitions in sessionStorage (" + a + ").");
|
|
2989
|
-
}
|
|
2990
|
-
}
|
|
2991
|
-
}
|
|
2992
|
-
/**
|
|
2993
|
-
* React Router v6.24.1
|
|
2994
|
-
*
|
|
2995
|
-
* Copyright (c) Remix Software Inc.
|
|
2996
|
-
*
|
|
2997
|
-
* This source code is licensed under the MIT license found in the
|
|
2998
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
2999
|
-
*
|
|
3000
|
-
* @license MIT
|
|
3001
|
-
*/
|
|
3002
|
-
function Ft() {
|
|
3003
|
-
return Ft = Object.assign ? Object.assign.bind() : function(e) {
|
|
3004
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
3005
|
-
var r = arguments[t];
|
|
3006
|
-
for (var a in r)
|
|
3007
|
-
Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]);
|
|
3008
|
-
}
|
|
3009
|
-
return e;
|
|
3010
|
-
}, Ft.apply(this, arguments);
|
|
3011
|
-
}
|
|
3012
|
-
const It = /* @__PURE__ */ P.createContext(null);
|
|
3013
|
-
process.env.NODE_ENV !== "production" && (It.displayName = "DataRouter");
|
|
3014
|
-
const kr = /* @__PURE__ */ P.createContext(null);
|
|
3015
|
-
process.env.NODE_ENV !== "production" && (kr.displayName = "DataRouterState");
|
|
3016
|
-
const Wn = /* @__PURE__ */ P.createContext(null);
|
|
3017
|
-
process.env.NODE_ENV !== "production" && (Wn.displayName = "Await");
|
|
3018
|
-
const Ve = /* @__PURE__ */ P.createContext(null);
|
|
3019
|
-
process.env.NODE_ENV !== "production" && (Ve.displayName = "Navigation");
|
|
3020
|
-
const kt = /* @__PURE__ */ P.createContext(null);
|
|
3021
|
-
process.env.NODE_ENV !== "production" && (kt.displayName = "Location");
|
|
3022
|
-
const De = /* @__PURE__ */ P.createContext({
|
|
3023
|
-
outlet: null,
|
|
3024
|
-
matches: [],
|
|
3025
|
-
isDataRoute: !1
|
|
3026
|
-
});
|
|
3027
|
-
process.env.NODE_ENV !== "production" && (De.displayName = "Route");
|
|
3028
|
-
const nr = /* @__PURE__ */ P.createContext(null);
|
|
3029
|
-
process.env.NODE_ENV !== "production" && (nr.displayName = "RouteError");
|
|
3030
|
-
function sa(e, t) {
|
|
3031
|
-
let {
|
|
3032
|
-
relative: r
|
|
3033
|
-
} = t === void 0 ? {} : t;
|
|
3034
|
-
rt() || (process.env.NODE_ENV !== "production" ? M(
|
|
3035
|
-
!1,
|
|
3036
|
-
// TODO: This error is probably because they somehow have 2 versions of the
|
|
3037
|
-
// router loaded. We can help them understand how to avoid that.
|
|
3038
|
-
"useHref() may be used only in the context of a <Router> component."
|
|
3039
|
-
) : M(!1));
|
|
3040
|
-
let {
|
|
3041
|
-
basename: a,
|
|
3042
|
-
navigator: o
|
|
3043
|
-
} = P.useContext(Ve), {
|
|
3044
|
-
hash: f,
|
|
3045
|
-
pathname: l,
|
|
3046
|
-
search: h
|
|
3047
|
-
} = Jn(e, {
|
|
3048
|
-
relative: r
|
|
3049
|
-
}), c = l;
|
|
3050
|
-
return a !== "/" && (c = l === "/" ? a : Ne([a, l])), o.createHref({
|
|
3051
|
-
pathname: c,
|
|
3052
|
-
search: h,
|
|
3053
|
-
hash: f
|
|
3054
|
-
});
|
|
3055
|
-
}
|
|
3056
|
-
function rt() {
|
|
3057
|
-
return P.useContext(kt) != null;
|
|
3058
|
-
}
|
|
3059
|
-
function Bt() {
|
|
3060
|
-
return rt() || (process.env.NODE_ENV !== "production" ? M(
|
|
3061
|
-
!1,
|
|
3062
|
-
// TODO: This error is probably because they somehow have 2 versions of the
|
|
3063
|
-
// router loaded. We can help them understand how to avoid that.
|
|
3064
|
-
"useLocation() may be used only in the context of a <Router> component."
|
|
3065
|
-
) : M(!1)), P.useContext(kt).location;
|
|
3066
|
-
}
|
|
3067
|
-
const Br = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
3068
|
-
function Vr(e) {
|
|
3069
|
-
P.useContext(Ve).static || P.useLayoutEffect(e);
|
|
3070
|
-
}
|
|
3071
|
-
function zn() {
|
|
3072
|
-
let {
|
|
3073
|
-
isDataRoute: e
|
|
3074
|
-
} = P.useContext(De);
|
|
3075
|
-
return e ? na() : $n();
|
|
3076
|
-
}
|
|
3077
|
-
function $n() {
|
|
3078
|
-
rt() || (process.env.NODE_ENV !== "production" ? M(
|
|
3079
|
-
!1,
|
|
3080
|
-
// TODO: This error is probably because they somehow have 2 versions of the
|
|
3081
|
-
// router loaded. We can help them understand how to avoid that.
|
|
3082
|
-
"useNavigate() may be used only in the context of a <Router> component."
|
|
3083
|
-
) : M(!1));
|
|
3084
|
-
let e = P.useContext(It), {
|
|
3085
|
-
basename: t,
|
|
3086
|
-
future: r,
|
|
3087
|
-
navigator: a
|
|
3088
|
-
} = P.useContext(Ve), {
|
|
3089
|
-
matches: o
|
|
3090
|
-
} = P.useContext(De), {
|
|
3091
|
-
pathname: f
|
|
3092
|
-
} = Bt(), l = JSON.stringify(jt(o, r.v7_relativeSplatPath)), h = P.useRef(!1);
|
|
3093
|
-
return Vr(() => {
|
|
3094
|
-
h.current = !0;
|
|
3095
|
-
}), P.useCallback(function(E, y) {
|
|
3096
|
-
if (y === void 0 && (y = {}), process.env.NODE_ENV !== "production" && te(h.current, Br), !h.current) return;
|
|
3097
|
-
if (typeof E == "number") {
|
|
3098
|
-
a.go(E);
|
|
3099
|
-
return;
|
|
3100
|
-
}
|
|
3101
|
-
let p = Ut(E, JSON.parse(l), f, y.relative === "path");
|
|
3102
|
-
e == null && t !== "/" && (p.pathname = p.pathname === "/" ? t : Ne([t, p.pathname])), (y.replace ? a.replace : a.push)(p, y.state, y);
|
|
3103
|
-
}, [t, a, l, f, e]);
|
|
3104
|
-
}
|
|
3105
|
-
const Yn = /* @__PURE__ */ P.createContext(null);
|
|
3106
|
-
function Hn(e) {
|
|
3107
|
-
let t = P.useContext(De).outlet;
|
|
3108
|
-
return t && /* @__PURE__ */ P.createElement(Yn.Provider, {
|
|
3109
|
-
value: e
|
|
3110
|
-
}, t);
|
|
3111
|
-
}
|
|
3112
|
-
function Jn(e, t) {
|
|
3113
|
-
let {
|
|
3114
|
-
relative: r
|
|
3115
|
-
} = t === void 0 ? {} : t, {
|
|
3116
|
-
future: a
|
|
3117
|
-
} = P.useContext(Ve), {
|
|
3118
|
-
matches: o
|
|
3119
|
-
} = P.useContext(De), {
|
|
3120
|
-
pathname: f
|
|
3121
|
-
} = Bt(), l = JSON.stringify(jt(o, a.v7_relativeSplatPath));
|
|
3122
|
-
return P.useMemo(() => Ut(e, JSON.parse(l), f, r === "path"), [e, l, f, r]);
|
|
3123
|
-
}
|
|
3124
|
-
function ua(e, t, r, a) {
|
|
3125
|
-
rt() || (process.env.NODE_ENV !== "production" ? M(
|
|
3126
|
-
!1,
|
|
3127
|
-
// TODO: This error is probably because they somehow have 2 versions of the
|
|
3128
|
-
// router loaded. We can help them understand how to avoid that.
|
|
3129
|
-
"useRoutes() may be used only in the context of a <Router> component."
|
|
3130
|
-
) : M(!1));
|
|
3131
|
-
let {
|
|
3132
|
-
navigator: o
|
|
3133
|
-
} = P.useContext(Ve), {
|
|
3134
|
-
matches: f
|
|
3135
|
-
} = P.useContext(De), l = f[f.length - 1], h = l ? l.params : {}, c = l ? l.pathname : "/", E = l ? l.pathnameBase : "/", y = l && l.route;
|
|
3136
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3137
|
-
let L = y && y.path || "";
|
|
3138
|
-
zr(c, !y || L.endsWith("*"), "You rendered descendant <Routes> (or called `useRoutes()`) at " + ('"' + c + '" (under <Route path="' + L + '">) 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.
|
|
3139
|
-
|
|
3140
|
-
` + ('Please change the parent <Route path="' + L + '"> to <Route ') + ('path="' + (L === "/" ? "*" : L + "/*") + '">.'));
|
|
3141
|
-
}
|
|
3142
|
-
let p = Bt(), R;
|
|
3143
|
-
R = p;
|
|
3144
|
-
let U = R.pathname || "/", N = U;
|
|
3145
|
-
if (E !== "/") {
|
|
3146
|
-
let L = E.replace(/^\//, "").split("/");
|
|
3147
|
-
N = "/" + U.replace(/^\//, "").split("/").slice(L.length).join("/");
|
|
3148
|
-
}
|
|
3149
|
-
let S = Ke(e, {
|
|
3150
|
-
pathname: N
|
|
3151
|
-
});
|
|
3152
|
-
return process.env.NODE_ENV !== "production" && (process.env.NODE_ENV !== "production" && te(y || S != null, 'No routes matched location "' + R.pathname + R.search + R.hash + '" '), process.env.NODE_ENV !== "production" && te(S == null || S[S.length - 1].route.element !== void 0 || S[S.length - 1].route.Component !== void 0 || S[S.length - 1].route.lazy !== void 0, 'Matched leaf route at location "' + R.pathname + R.search + R.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.')), Qn(S && S.map((L) => Object.assign({}, L, {
|
|
3153
|
-
params: Object.assign({}, h, L.params),
|
|
3154
|
-
pathname: Ne([
|
|
3155
|
-
E,
|
|
3156
|
-
// Re-encode pathnames that were decoded inside matchRoutes
|
|
3157
|
-
o.encodeLocation ? o.encodeLocation(L.pathname).pathname : L.pathname
|
|
3158
|
-
]),
|
|
3159
|
-
pathnameBase: L.pathnameBase === "/" ? E : Ne([
|
|
3160
|
-
E,
|
|
3161
|
-
// Re-encode pathnames that were decoded inside matchRoutes
|
|
3162
|
-
o.encodeLocation ? o.encodeLocation(L.pathnameBase).pathname : L.pathnameBase
|
|
3163
|
-
])
|
|
3164
|
-
})), f, r, a);
|
|
3165
|
-
}
|
|
3166
|
-
function Kn() {
|
|
3167
|
-
let e = ra(), t = At(e) ? e.status + " " + e.statusText : e instanceof Error ? e.message : JSON.stringify(e), r = e instanceof Error ? e.stack : null, a = "rgba(200,200,200, 0.5)", o = {
|
|
3168
|
-
padding: "0.5rem",
|
|
3169
|
-
backgroundColor: a
|
|
3170
|
-
}, f = {
|
|
3171
|
-
padding: "2px 4px",
|
|
3172
|
-
backgroundColor: a
|
|
3173
|
-
}, l = null;
|
|
3174
|
-
return process.env.NODE_ENV !== "production" && (console.error("Error handled by React Router default ErrorBoundary:", e), l = /* @__PURE__ */ P.createElement(P.Fragment, null, /* @__PURE__ */ P.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ P.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ P.createElement("code", {
|
|
3175
|
-
style: f
|
|
3176
|
-
}, "ErrorBoundary"), " or", " ", /* @__PURE__ */ P.createElement("code", {
|
|
3177
|
-
style: f
|
|
3178
|
-
}, "errorElement"), " prop on your route."))), /* @__PURE__ */ P.createElement(P.Fragment, null, /* @__PURE__ */ P.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ P.createElement("h3", {
|
|
3179
|
-
style: {
|
|
3180
|
-
fontStyle: "italic"
|
|
3181
|
-
}
|
|
3182
|
-
}, t), r ? /* @__PURE__ */ P.createElement("pre", {
|
|
3183
|
-
style: o
|
|
3184
|
-
}, r) : null, l);
|
|
3185
|
-
}
|
|
3186
|
-
const Gn = /* @__PURE__ */ P.createElement(Kn, null);
|
|
3187
|
-
class Xn extends P.Component {
|
|
3188
|
-
constructor(t) {
|
|
3189
|
-
super(t), this.state = {
|
|
3190
|
-
location: t.location,
|
|
3191
|
-
revalidation: t.revalidation,
|
|
3192
|
-
error: t.error
|
|
3193
|
-
};
|
|
3194
|
-
}
|
|
3195
|
-
static getDerivedStateFromError(t) {
|
|
3196
|
-
return {
|
|
3197
|
-
error: t
|
|
3198
|
-
};
|
|
3199
|
-
}
|
|
3200
|
-
static getDerivedStateFromProps(t, r) {
|
|
3201
|
-
return r.location !== t.location || r.revalidation !== "idle" && t.revalidation === "idle" ? {
|
|
3202
|
-
error: t.error,
|
|
3203
|
-
location: t.location,
|
|
3204
|
-
revalidation: t.revalidation
|
|
3205
|
-
} : {
|
|
3206
|
-
error: t.error !== void 0 ? t.error : r.error,
|
|
3207
|
-
location: r.location,
|
|
3208
|
-
revalidation: t.revalidation || r.revalidation
|
|
3209
|
-
};
|
|
3210
|
-
}
|
|
3211
|
-
componentDidCatch(t, r) {
|
|
3212
|
-
console.error("React Router caught the following error during render", t, r);
|
|
3213
|
-
}
|
|
3214
|
-
render() {
|
|
3215
|
-
return this.state.error !== void 0 ? /* @__PURE__ */ P.createElement(De.Provider, {
|
|
3216
|
-
value: this.props.routeContext
|
|
3217
|
-
}, /* @__PURE__ */ P.createElement(nr.Provider, {
|
|
3218
|
-
value: this.state.error,
|
|
3219
|
-
children: this.props.component
|
|
3220
|
-
})) : this.props.children;
|
|
3221
|
-
}
|
|
3222
|
-
}
|
|
3223
|
-
function qn(e) {
|
|
3224
|
-
let {
|
|
3225
|
-
routeContext: t,
|
|
3226
|
-
match: r,
|
|
3227
|
-
children: a
|
|
3228
|
-
} = e, o = P.useContext(It);
|
|
3229
|
-
return o && o.static && o.staticContext && (r.route.errorElement || r.route.ErrorBoundary) && (o.staticContext._deepestRenderedBoundaryId = r.route.id), /* @__PURE__ */ P.createElement(De.Provider, {
|
|
3230
|
-
value: t
|
|
3231
|
-
}, a);
|
|
3232
|
-
}
|
|
3233
|
-
function Qn(e, t, r, a) {
|
|
3234
|
-
var o;
|
|
3235
|
-
if (t === void 0 && (t = []), r === void 0 && (r = null), a === void 0 && (a = null), e == null) {
|
|
3236
|
-
var f;
|
|
3237
|
-
if ((f = r) != null && f.errors)
|
|
3238
|
-
e = r.matches;
|
|
3239
|
-
else
|
|
3240
|
-
return null;
|
|
3241
|
-
}
|
|
3242
|
-
let l = e, h = (o = r) == null ? void 0 : o.errors;
|
|
3243
|
-
if (h != null) {
|
|
3244
|
-
let y = l.findIndex((p) => p.route.id && (h == null ? void 0 : h[p.route.id]) !== void 0);
|
|
3245
|
-
y >= 0 || (process.env.NODE_ENV !== "production" ? M(!1, "Could not find a matching route for errors on route IDs: " + Object.keys(h).join(",")) : M(!1)), l = l.slice(0, Math.min(l.length, y + 1));
|
|
3246
|
-
}
|
|
3247
|
-
let c = !1, E = -1;
|
|
3248
|
-
if (r && a && a.v7_partialHydration)
|
|
3249
|
-
for (let y = 0; y < l.length; y++) {
|
|
3250
|
-
let p = l[y];
|
|
3251
|
-
if ((p.route.HydrateFallback || p.route.hydrateFallbackElement) && (E = y), p.route.id) {
|
|
3252
|
-
let {
|
|
3253
|
-
loaderData: R,
|
|
3254
|
-
errors: U
|
|
3255
|
-
} = r, N = p.route.loader && R[p.route.id] === void 0 && (!U || U[p.route.id] === void 0);
|
|
3256
|
-
if (p.route.lazy || N) {
|
|
3257
|
-
c = !0, E >= 0 ? l = l.slice(0, E + 1) : l = [l[0]];
|
|
3258
|
-
break;
|
|
3259
|
-
}
|
|
3260
|
-
}
|
|
3261
|
-
}
|
|
3262
|
-
return l.reduceRight((y, p, R) => {
|
|
3263
|
-
let U, N = !1, S = null, j = null;
|
|
3264
|
-
r && (U = h && p.route.id ? h[p.route.id] : void 0, S = p.route.errorElement || Gn, c && (E < 0 && R === 0 ? (zr("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), N = !0, j = null) : E === R && (N = !0, j = p.route.hydrateFallbackElement || null)));
|
|
3265
|
-
let L = t.concat(l.slice(0, R + 1)), T = () => {
|
|
3266
|
-
let q;
|
|
3267
|
-
return U ? q = S : N ? q = j : p.route.Component ? q = /* @__PURE__ */ P.createElement(p.route.Component, null) : p.route.element ? q = p.route.element : q = y, /* @__PURE__ */ P.createElement(qn, {
|
|
3268
|
-
match: p,
|
|
3269
|
-
routeContext: {
|
|
3270
|
-
outlet: y,
|
|
3271
|
-
matches: L,
|
|
3272
|
-
isDataRoute: r != null
|
|
3273
|
-
},
|
|
3274
|
-
children: q
|
|
3275
|
-
});
|
|
3276
|
-
};
|
|
3277
|
-
return r && (p.route.ErrorBoundary || p.route.errorElement || R === 0) ? /* @__PURE__ */ P.createElement(Xn, {
|
|
3278
|
-
location: r.location,
|
|
3279
|
-
revalidation: r.revalidation,
|
|
3280
|
-
component: S,
|
|
3281
|
-
error: U,
|
|
3282
|
-
children: T(),
|
|
3283
|
-
routeContext: {
|
|
3284
|
-
outlet: null,
|
|
3285
|
-
matches: L,
|
|
3286
|
-
isDataRoute: !0
|
|
3287
|
-
}
|
|
3288
|
-
}) : T();
|
|
3289
|
-
}, null);
|
|
3290
|
-
}
|
|
3291
|
-
var Wr = /* @__PURE__ */ function(e) {
|
|
3292
|
-
return e.UseBlocker = "useBlocker", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e;
|
|
3293
|
-
}(Wr || {}), gt = /* @__PURE__ */ function(e) {
|
|
3294
|
-
return e.UseBlocker = "useBlocker", e.UseLoaderData = "useLoaderData", e.UseActionData = "useActionData", e.UseRouteError = "useRouteError", e.UseNavigation = "useNavigation", e.UseRouteLoaderData = "useRouteLoaderData", e.UseMatches = "useMatches", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e.UseRouteId = "useRouteId", e;
|
|
3295
|
-
}(gt || {});
|
|
3296
|
-
function ar(e) {
|
|
3297
|
-
return e + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";
|
|
3298
|
-
}
|
|
3299
|
-
function Zn(e) {
|
|
3300
|
-
let t = P.useContext(It);
|
|
3301
|
-
return t || (process.env.NODE_ENV !== "production" ? M(!1, ar(e)) : M(!1)), t;
|
|
3302
|
-
}
|
|
3303
|
-
function ea(e) {
|
|
3304
|
-
let t = P.useContext(kr);
|
|
3305
|
-
return t || (process.env.NODE_ENV !== "production" ? M(!1, ar(e)) : M(!1)), t;
|
|
3306
|
-
}
|
|
3307
|
-
function ta(e) {
|
|
3308
|
-
let t = P.useContext(De);
|
|
3309
|
-
return t || (process.env.NODE_ENV !== "production" ? M(!1, ar(e)) : M(!1)), t;
|
|
3310
|
-
}
|
|
3311
|
-
function or(e) {
|
|
3312
|
-
let t = ta(e), r = t.matches[t.matches.length - 1];
|
|
3313
|
-
return r.route.id || (process.env.NODE_ENV !== "production" ? M(!1, e + ' can only be used on routes that contain a unique "id"') : M(!1)), r.route.id;
|
|
3314
|
-
}
|
|
3315
|
-
function ca() {
|
|
3316
|
-
return or(gt.UseRouteId);
|
|
3317
|
-
}
|
|
3318
|
-
function ra() {
|
|
3319
|
-
var e;
|
|
3320
|
-
let t = P.useContext(nr), r = ea(gt.UseRouteError), a = or(gt.UseRouteError);
|
|
3321
|
-
return t !== void 0 ? t : (e = r.errors) == null ? void 0 : e[a];
|
|
3322
|
-
}
|
|
3323
|
-
function na() {
|
|
3324
|
-
let {
|
|
3325
|
-
router: e
|
|
3326
|
-
} = Zn(Wr.UseNavigateStable), t = or(gt.UseNavigateStable), r = P.useRef(!1);
|
|
3327
|
-
return Vr(() => {
|
|
3328
|
-
r.current = !0;
|
|
3329
|
-
}), P.useCallback(function(o, f) {
|
|
3330
|
-
f === void 0 && (f = {}), process.env.NODE_ENV !== "production" && te(r.current, Br), r.current && (typeof o == "number" ? e.navigate(o) : e.navigate(o, Ft({
|
|
3331
|
-
fromRouteId: t
|
|
3332
|
-
}, f)));
|
|
3333
|
-
}, [e, t]);
|
|
3334
|
-
}
|
|
3335
|
-
const _r = {};
|
|
3336
|
-
function zr(e, t, r) {
|
|
3337
|
-
!t && !_r[e] && (_r[e] = !0, process.env.NODE_ENV !== "production" && te(!1, r));
|
|
3338
|
-
}
|
|
3339
|
-
function da(e) {
|
|
3340
|
-
let {
|
|
3341
|
-
to: t,
|
|
3342
|
-
replace: r,
|
|
3343
|
-
state: a,
|
|
3344
|
-
relative: o
|
|
3345
|
-
} = e;
|
|
3346
|
-
rt() || (process.env.NODE_ENV !== "production" ? M(
|
|
3347
|
-
!1,
|
|
3348
|
-
// TODO: This error is probably because they somehow have 2 versions of
|
|
3349
|
-
// the router loaded. We can help them understand how to avoid that.
|
|
3350
|
-
"<Navigate> may be used only in the context of a <Router> component."
|
|
3351
|
-
) : M(!1));
|
|
3352
|
-
let {
|
|
3353
|
-
future: f,
|
|
3354
|
-
static: l
|
|
3355
|
-
} = P.useContext(Ve);
|
|
3356
|
-
process.env.NODE_ENV !== "production" && te(!l, "<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");
|
|
3357
|
-
let {
|
|
3358
|
-
matches: h
|
|
3359
|
-
} = P.useContext(De), {
|
|
3360
|
-
pathname: c
|
|
3361
|
-
} = Bt(), E = zn(), y = Ut(t, jt(h, f.v7_relativeSplatPath), c, o === "path"), p = JSON.stringify(y);
|
|
3362
|
-
return P.useEffect(() => E(JSON.parse(p), {
|
|
3363
|
-
replace: r,
|
|
3364
|
-
state: a,
|
|
3365
|
-
relative: o
|
|
3366
|
-
}), [E, p, o, r, a]), null;
|
|
3367
|
-
}
|
|
3368
|
-
function fa(e) {
|
|
3369
|
-
return Hn(e.context);
|
|
3370
|
-
}
|
|
3371
|
-
function ha(e) {
|
|
3372
|
-
let {
|
|
3373
|
-
basename: t = "/",
|
|
3374
|
-
children: r = null,
|
|
3375
|
-
location: a,
|
|
3376
|
-
navigationType: o = G.Pop,
|
|
3377
|
-
navigator: f,
|
|
3378
|
-
static: l = !1,
|
|
3379
|
-
future: h
|
|
3380
|
-
} = e;
|
|
3381
|
-
rt() && (process.env.NODE_ENV !== "production" ? M(!1, "You cannot render a <Router> inside another <Router>. You should never have more than one in your app.") : M(!1));
|
|
3382
|
-
let c = t.replace(/^\/*/, "/"), E = P.useMemo(() => ({
|
|
3383
|
-
basename: c,
|
|
3384
|
-
navigator: f,
|
|
3385
|
-
static: l,
|
|
3386
|
-
future: Ft({
|
|
3387
|
-
v7_relativeSplatPath: !1
|
|
3388
|
-
}, h)
|
|
3389
|
-
}), [c, h, f, l]);
|
|
3390
|
-
typeof a == "string" && (a = Be(a));
|
|
3391
|
-
let {
|
|
3392
|
-
pathname: y = "/",
|
|
3393
|
-
search: p = "",
|
|
3394
|
-
hash: R = "",
|
|
3395
|
-
state: U = null,
|
|
3396
|
-
key: N = "default"
|
|
3397
|
-
} = a, S = P.useMemo(() => {
|
|
3398
|
-
let j = Et(y, c);
|
|
3399
|
-
return j == null ? null : {
|
|
3400
|
-
location: {
|
|
3401
|
-
pathname: j,
|
|
3402
|
-
search: p,
|
|
3403
|
-
hash: R,
|
|
3404
|
-
state: U,
|
|
3405
|
-
key: N
|
|
3406
|
-
},
|
|
3407
|
-
navigationType: o
|
|
3408
|
-
};
|
|
3409
|
-
}, [c, y, p, R, U, N, o]);
|
|
3410
|
-
return process.env.NODE_ENV !== "production" && te(S != null, '<Router basename="' + c + '"> is not able to match the URL ' + ('"' + y + p + R + '" because it does not start with the ') + "basename, so the <Router> won't render anything."), S == null ? null : /* @__PURE__ */ P.createElement(Ve.Provider, {
|
|
3411
|
-
value: E
|
|
3412
|
-
}, /* @__PURE__ */ P.createElement(kt.Provider, {
|
|
3413
|
-
children: r,
|
|
3414
|
-
value: S
|
|
3415
|
-
}));
|
|
3416
|
-
}
|
|
3417
|
-
new Promise(() => {
|
|
3418
|
-
});
|
|
3419
|
-
function pa(e) {
|
|
3420
|
-
let t = {
|
|
3421
|
-
// Note: this check also occurs in createRoutesFromChildren so update
|
|
3422
|
-
// there if you change this -- please and thank you!
|
|
3423
|
-
hasErrorBoundary: e.ErrorBoundary != null || e.errorElement != null
|
|
3424
|
-
};
|
|
3425
|
-
return e.Component && (process.env.NODE_ENV !== "production" && e.element && process.env.NODE_ENV !== "production" && te(!1, "You should not include both `Component` and `element` on your route - `Component` will be used."), Object.assign(t, {
|
|
3426
|
-
element: /* @__PURE__ */ P.createElement(e.Component),
|
|
3427
|
-
Component: void 0
|
|
3428
|
-
})), e.HydrateFallback && (process.env.NODE_ENV !== "production" && e.hydrateFallbackElement && process.env.NODE_ENV !== "production" && te(!1, "You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."), Object.assign(t, {
|
|
3429
|
-
hydrateFallbackElement: /* @__PURE__ */ P.createElement(e.HydrateFallback),
|
|
3430
|
-
HydrateFallback: void 0
|
|
3431
|
-
})), e.ErrorBoundary && (process.env.NODE_ENV !== "production" && e.errorElement && process.env.NODE_ENV !== "production" && te(!1, "You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."), Object.assign(t, {
|
|
3432
|
-
errorElement: /* @__PURE__ */ P.createElement(e.ErrorBoundary),
|
|
3433
|
-
ErrorBoundary: void 0
|
|
3434
|
-
})), t;
|
|
3435
|
-
}
|
|
3436
|
-
export {
|
|
3437
|
-
kr as D,
|
|
3438
|
-
Tr as E,
|
|
3439
|
-
da as N,
|
|
3440
|
-
fa as O,
|
|
3441
|
-
De as R,
|
|
3442
|
-
zn as a,
|
|
3443
|
-
ra as b,
|
|
3444
|
-
Ve as c,
|
|
3445
|
-
sa as d,
|
|
3446
|
-
Jn as e,
|
|
3447
|
-
yt as f,
|
|
3448
|
-
ca as g,
|
|
3449
|
-
Ne as h,
|
|
3450
|
-
M as i,
|
|
3451
|
-
oa as j,
|
|
3452
|
-
la as k,
|
|
3453
|
-
ia as l,
|
|
3454
|
-
fr as m,
|
|
3455
|
-
pa as n,
|
|
3456
|
-
It as o,
|
|
3457
|
-
ha as p,
|
|
3458
|
-
ua as q,
|
|
3459
|
-
Et as s,
|
|
3460
|
-
Bt as u,
|
|
3461
|
-
te as w
|
|
3462
|
-
};
|