zudoku 0.33.2-local.4 → 0.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +121 -0
- package/dist/config/loader.d.ts +3 -2
- package/dist/config/loader.js +10 -20
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/common.d.ts +346 -346
- package/dist/config/validators/validate.d.ts +165 -165
- package/dist/lib/components/AnchorLink.d.ts +2 -2
- package/dist/lib/components/AnchorLink.js +4 -4
- package/dist/lib/components/AnchorLink.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +6 -5
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +4 -0
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +4 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +5 -3
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js +2 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -5
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +11 -0
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js +14 -0
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +10 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +9 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +75 -24
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +8 -0
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +17 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.js +11 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +19 -13
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +6 -4
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +4 -3
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/ui/Checkbox.d.ts +2 -8
- package/dist/lib/ui/Checkbox.js +1 -13
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +6 -6
- package/dist/lib/ui/Select.js +1 -1
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/ui/SyntaxHighlight.d.ts +2 -1
- package/dist/lib/ui/SyntaxHighlight.js +19 -15
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +1 -1
- package/dist/lib/util/MdxComponents.js +2 -2
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/vite/config.js +3 -7
- package/dist/vite/config.js.map +1 -1
- package/lib/{AuthenticationPlugin-BCYuduZ9.js → AuthenticationPlugin-4ip08maU.js} +3 -3
- package/lib/{AuthenticationPlugin-BCYuduZ9.js.map → AuthenticationPlugin-4ip08maU.js.map} +1 -1
- package/lib/Callout-B_sEhkYd.js +211 -0
- package/lib/Callout-B_sEhkYd.js.map +1 -0
- package/lib/{Dialog-mi6BrnrM.js → Dialog-sbgekbjb.js} +48 -33
- package/lib/{Dialog-mi6BrnrM.js.map → Dialog-sbgekbjb.js.map} +1 -1
- package/lib/{Markdown-DofXBcqg.js → Markdown-DZXjQjpH.js} +4099 -3848
- package/lib/Markdown-DZXjQjpH.js.map +1 -0
- package/lib/{MdxPage-KJcNWIgt.js → MdxPage-52vRwa_7.js} +13 -13
- package/lib/{MdxPage-KJcNWIgt.js.map → MdxPage-52vRwa_7.js.map} +1 -1
- package/lib/{OasProvider-HcqBeC4H.js → OasProvider-CR2nG1Eg.js} +4 -4
- package/lib/{OasProvider-HcqBeC4H.js.map → OasProvider-CR2nG1Eg.js.map} +1 -1
- package/lib/{OperationList-C3wnbFxp.js → OperationList-DndcCJUG.js} +1097 -1052
- package/lib/{OperationList-C3wnbFxp.js.map → OperationList-DndcCJUG.js.map} +1 -1
- package/lib/{Select-Co6MuS4j.js → Select-FAYHOYTy.js} +35 -35
- package/lib/{Select-Co6MuS4j.js.map → Select-FAYHOYTy.js.map} +1 -1
- package/lib/{SlotletProvider-CYFNHuok.js → SlotletProvider-TydSHROc.js} +4 -4
- package/lib/{SlotletProvider-CYFNHuok.js.map → SlotletProvider-TydSHROc.js.map} +1 -1
- package/lib/{chunk-IR6S3I6Y-CRDBmIgK.js → chunk-HA7DTUK3-ZGg2W6yV.js} +276 -276
- package/lib/chunk-HA7DTUK3-ZGg2W6yV.js.map +1 -0
- package/lib/{hook-LTe5qHSc.js → hook-CfCFKZ-2.js} +10 -7
- package/lib/{hook-LTe5qHSc.js.map → hook-CfCFKZ-2.js.map} +1 -1
- package/lib/index-DK7IuUyR.js +2201 -0
- package/lib/index-DK7IuUyR.js.map +1 -0
- package/lib/index.esm-CltAN0Tf.js +711 -0
- package/lib/index.esm-CltAN0Tf.js.map +1 -0
- package/lib/objectEntries-BS7aAgOm.js +12 -0
- package/lib/objectEntries-BS7aAgOm.js.map +1 -0
- package/lib/ui/Checkbox.js +15 -25
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/Command.js +1 -1
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +483 -502
- package/lib/ui/SyntaxHighlight.js.map +1 -1
- package/lib/{useExposedProps-D76yras4.js → useExposedProps-BslIn-FE.js} +2 -2
- package/lib/{useExposedProps-D76yras4.js.map → useExposedProps-BslIn-FE.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +3 -3
- package/lib/zudoku.components.js +1390 -32
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +5 -5
- package/lib/zudoku.plugin-api-keys.js +4 -4
- package/lib/zudoku.plugin-custom-pages.js +2 -2
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +84 -154
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/package.json +5 -5
- package/src/lib/components/AnchorLink.tsx +7 -7
- package/src/lib/components/navigation/SidebarItem.tsx +8 -23
- package/src/lib/core/ZudokuContext.ts +4 -0
- package/src/lib/plugins/openapi/OperationList.tsx +73 -33
- package/src/lib/plugins/openapi/OperationListItem.tsx +105 -92
- package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
- package/src/lib/plugins/openapi/graphql/graphql.ts +3 -0
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +30 -32
- package/src/lib/plugins/openapi/playground/Headers.tsx +0 -1
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +74 -0
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +54 -0
- package/src/lib/plugins/openapi/playground/Playground.tsx +164 -133
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +0 -1
- package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +51 -0
- package/src/lib/plugins/openapi/playground/rememberedIdentity.ts +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +24 -4
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +66 -45
- package/src/lib/ui/Checkbox.tsx +8 -24
- package/src/lib/ui/Select.tsx +1 -1
- package/src/lib/ui/SyntaxHighlight.tsx +94 -96
- package/src/lib/util/MdxComponents.tsx +2 -2
- package/lib/Command-CrTA1FX0.js +0 -140
- package/lib/Command-CrTA1FX0.js.map +0 -1
- package/lib/Markdown-DofXBcqg.js.map +0 -1
- package/lib/chunk-IR6S3I6Y-CRDBmIgK.js.map +0 -1
- package/lib/index-CtkRMvMw.js +0 -2052
- package/lib/index-CtkRMvMw.js.map +0 -1
- package/lib/index-vn5bsvmU.js +0 -1399
- package/lib/index-vn5bsvmU.js.map +0 -1
- package/lib/useScrollToAnchor-DKyrbZoy.js +0 -977
- package/lib/useScrollToAnchor-DKyrbZoy.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as o from "react";
|
|
2
2
|
var _ = {}, ue;
|
|
3
3
|
function Ae() {
|
|
4
4
|
if (ue) return _;
|
|
5
5
|
ue = 1, Object.defineProperty(_, "__esModule", { value: !0 }), _.parse = c, _.serialize = s;
|
|
6
|
-
const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, n = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, a = /^[\u0020-\u003A\u003D-\u007E]*$/, r = Object.prototype.toString,
|
|
6
|
+
const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, n = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, a = /^[\u0020-\u003A\u003D-\u007E]*$/, r = Object.prototype.toString, i = /* @__PURE__ */ (() => {
|
|
7
7
|
const d = function() {
|
|
8
8
|
};
|
|
9
9
|
return d.prototype = /* @__PURE__ */ Object.create(null), d;
|
|
10
10
|
})();
|
|
11
11
|
function c(d, m) {
|
|
12
|
-
const f = new
|
|
12
|
+
const f = new i(), E = d.length;
|
|
13
13
|
if (E < 2)
|
|
14
14
|
return f;
|
|
15
15
|
const g = (m == null ? void 0 : m.decode) || h;
|
|
@@ -18,18 +18,18 @@ function Ae() {
|
|
|
18
18
|
const y = d.indexOf("=", v);
|
|
19
19
|
if (y === -1)
|
|
20
20
|
break;
|
|
21
|
-
const w = d.indexOf(";", v),
|
|
22
|
-
if (y >
|
|
21
|
+
const w = d.indexOf(";", v), b = w === -1 ? E : w;
|
|
22
|
+
if (y > b) {
|
|
23
23
|
v = d.lastIndexOf(";", y - 1) + 1;
|
|
24
24
|
continue;
|
|
25
25
|
}
|
|
26
26
|
const x = u(d, v, y), C = l(d, y, x), $ = d.slice(x, C);
|
|
27
27
|
if (f[$] === void 0) {
|
|
28
|
-
let P = u(d, y + 1,
|
|
29
|
-
const
|
|
30
|
-
f[$] =
|
|
28
|
+
let P = u(d, y + 1, b), S = l(d, b, P);
|
|
29
|
+
const M = g(d.slice(P, S));
|
|
30
|
+
f[$] = M;
|
|
31
31
|
}
|
|
32
|
-
v =
|
|
32
|
+
v = b + 1;
|
|
33
33
|
} while (v < E);
|
|
34
34
|
return f;
|
|
35
35
|
}
|
|
@@ -126,7 +126,7 @@ function Ae() {
|
|
|
126
126
|
}
|
|
127
127
|
Ae();
|
|
128
128
|
/**
|
|
129
|
-
* react-router v7.
|
|
129
|
+
* react-router v7.2.0
|
|
130
130
|
*
|
|
131
131
|
* Copyright (c) Remix Software Inc.
|
|
132
132
|
*
|
|
@@ -135,7 +135,7 @@ Ae();
|
|
|
135
135
|
*
|
|
136
136
|
* @license MIT
|
|
137
137
|
*/
|
|
138
|
-
function
|
|
138
|
+
function R(e, t) {
|
|
139
139
|
if (e === !1 || e === null || typeof e > "u")
|
|
140
140
|
throw new Error(t);
|
|
141
141
|
}
|
|
@@ -166,17 +166,17 @@ function Y(e) {
|
|
|
166
166
|
return t;
|
|
167
167
|
}
|
|
168
168
|
function pe(e, t, n = "/") {
|
|
169
|
-
return
|
|
169
|
+
return Me(e, t, n, !1);
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
let r = typeof t == "string" ? Y(t) : t,
|
|
173
|
-
if (
|
|
171
|
+
function Me(e, t, n, a) {
|
|
172
|
+
let r = typeof t == "string" ? Y(t) : t, i = D(r.pathname || "/", n);
|
|
173
|
+
if (i == null)
|
|
174
174
|
return null;
|
|
175
175
|
let c = ve(e);
|
|
176
|
-
|
|
176
|
+
De(c);
|
|
177
177
|
let u = null;
|
|
178
178
|
for (let l = 0; u == null && l < c.length; ++l) {
|
|
179
|
-
let s = ye(
|
|
179
|
+
let s = ye(i);
|
|
180
180
|
u = ze(
|
|
181
181
|
c[l],
|
|
182
182
|
s,
|
|
@@ -186,54 +186,54 @@ function De(e, t, n, a) {
|
|
|
186
186
|
return u;
|
|
187
187
|
}
|
|
188
188
|
function ve(e, t = [], n = [], a = "") {
|
|
189
|
-
let r = (
|
|
189
|
+
let r = (i, c, u) => {
|
|
190
190
|
let l = {
|
|
191
|
-
relativePath: u === void 0 ?
|
|
192
|
-
caseSensitive:
|
|
191
|
+
relativePath: u === void 0 ? i.path || "" : u,
|
|
192
|
+
caseSensitive: i.caseSensitive === !0,
|
|
193
193
|
childrenIndex: c,
|
|
194
|
-
route:
|
|
194
|
+
route: i
|
|
195
195
|
};
|
|
196
|
-
l.relativePath.startsWith("/") && (
|
|
196
|
+
l.relativePath.startsWith("/") && (R(
|
|
197
197
|
l.relativePath.startsWith(a),
|
|
198
198
|
`Absolute route path "${l.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
|
|
199
199
|
), l.relativePath = l.relativePath.slice(a.length));
|
|
200
200
|
let s = A([a, l.relativePath]), h = n.concat(l);
|
|
201
|
-
|
|
201
|
+
i.children && i.children.length > 0 && (R(
|
|
202
202
|
// Our types know better, but runtime JS may not!
|
|
203
203
|
// @ts-expect-error
|
|
204
|
-
|
|
204
|
+
i.index !== !0,
|
|
205
205
|
`Index routes must not have child routes. Please remove all child routes from route path "${s}".`
|
|
206
|
-
), ve(
|
|
206
|
+
), ve(i.children, t, h, s)), !(i.path == null && !i.index) && t.push({
|
|
207
207
|
path: s,
|
|
208
|
-
score: He(s,
|
|
208
|
+
score: He(s, i.index),
|
|
209
209
|
routesMeta: h
|
|
210
210
|
});
|
|
211
211
|
};
|
|
212
|
-
return e.forEach((
|
|
212
|
+
return e.forEach((i, c) => {
|
|
213
213
|
var u;
|
|
214
|
-
if (
|
|
215
|
-
r(
|
|
214
|
+
if (i.path === "" || !((u = i.path) != null && u.includes("?")))
|
|
215
|
+
r(i, c);
|
|
216
216
|
else
|
|
217
|
-
for (let l of ge(
|
|
218
|
-
r(
|
|
217
|
+
for (let l of ge(i.path))
|
|
218
|
+
r(i, c, l);
|
|
219
219
|
}), t;
|
|
220
220
|
}
|
|
221
221
|
function ge(e) {
|
|
222
222
|
let t = e.split("/");
|
|
223
223
|
if (t.length === 0) return [];
|
|
224
|
-
let [n, ...a] = t, r = n.endsWith("?"),
|
|
224
|
+
let [n, ...a] = t, r = n.endsWith("?"), i = n.replace(/\?$/, "");
|
|
225
225
|
if (a.length === 0)
|
|
226
|
-
return r ? [
|
|
226
|
+
return r ? [i, ""] : [i];
|
|
227
227
|
let c = ge(a.join("/")), u = [];
|
|
228
228
|
return u.push(
|
|
229
229
|
...c.map(
|
|
230
|
-
(l) => l === "" ?
|
|
230
|
+
(l) => l === "" ? i : [i, l].join("/")
|
|
231
231
|
)
|
|
232
232
|
), r && u.push(...c), u.map(
|
|
233
233
|
(l) => e.startsWith("/") && l === "" ? "/" : l
|
|
234
234
|
);
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function De(e) {
|
|
237
237
|
e.sort(
|
|
238
238
|
(t, n) => t.score !== n.score ? n.score - t.score : We(
|
|
239
239
|
t.routesMeta.map((a) => a.childrenIndex),
|
|
@@ -241,11 +241,11 @@ function Ie(e) {
|
|
|
241
241
|
)
|
|
242
242
|
);
|
|
243
243
|
}
|
|
244
|
-
var
|
|
244
|
+
var Ie = /^:[\w-]+$/, Oe = 3, Fe = 2, _e = 1, Ue = 10, Be = -2, ce = (e) => e === "*";
|
|
245
245
|
function He(e, t) {
|
|
246
246
|
let n = e.split("/"), a = n.length;
|
|
247
247
|
return n.some(ce) && (a += Be), t && (a += Fe), n.filter((r) => !ce(r)).reduce(
|
|
248
|
-
(r,
|
|
248
|
+
(r, i) => r + (Ie.test(i) ? Oe : i === "" ? _e : Ue),
|
|
249
249
|
a
|
|
250
250
|
);
|
|
251
251
|
}
|
|
@@ -263,9 +263,9 @@ function We(e, t) {
|
|
|
263
263
|
);
|
|
264
264
|
}
|
|
265
265
|
function ze(e, t, n = !1) {
|
|
266
|
-
let { routesMeta: a } = e, r = {},
|
|
266
|
+
let { routesMeta: a } = e, r = {}, i = "/", c = [];
|
|
267
267
|
for (let u = 0; u < a.length; ++u) {
|
|
268
|
-
let l = a[u], s = u === a.length - 1, h =
|
|
268
|
+
let l = a[u], s = u === a.length - 1, h = i === "/" ? t : t.slice(i.length) || "/", p = H(
|
|
269
269
|
{ path: l.relativePath, caseSensitive: l.caseSensitive, end: s },
|
|
270
270
|
h
|
|
271
271
|
), d = l.route;
|
|
@@ -281,12 +281,12 @@ function ze(e, t, n = !1) {
|
|
|
281
281
|
Object.assign(r, p.params), c.push({
|
|
282
282
|
// TODO: Can this as be avoided?
|
|
283
283
|
params: r,
|
|
284
|
-
pathname: A([
|
|
284
|
+
pathname: A([i, p.pathname]),
|
|
285
285
|
pathnameBase: Ke(
|
|
286
|
-
A([
|
|
286
|
+
A([i, p.pathnameBase])
|
|
287
287
|
),
|
|
288
288
|
route: d
|
|
289
|
-
}), p.pathnameBase !== "/" && (
|
|
289
|
+
}), p.pathnameBase !== "/" && (i = A([i, p.pathnameBase]));
|
|
290
290
|
}
|
|
291
291
|
return c;
|
|
292
292
|
}
|
|
@@ -298,20 +298,20 @@ function H(e, t) {
|
|
|
298
298
|
e.end
|
|
299
299
|
), r = t.match(n);
|
|
300
300
|
if (!r) return null;
|
|
301
|
-
let
|
|
301
|
+
let i = r[0], c = i.replace(/(.)\/+$/, "$1"), u = r.slice(1);
|
|
302
302
|
return {
|
|
303
303
|
params: a.reduce(
|
|
304
304
|
(s, { paramName: h, isOptional: p }, d) => {
|
|
305
305
|
if (h === "*") {
|
|
306
306
|
let f = u[d] || "";
|
|
307
|
-
c =
|
|
307
|
+
c = i.slice(0, i.length - f.length).replace(/(.)\/+$/, "$1");
|
|
308
308
|
}
|
|
309
309
|
const m = u[d];
|
|
310
310
|
return p && !m ? s[h] = void 0 : s[h] = (m || "").replace(/%2F/g, "/"), s;
|
|
311
311
|
},
|
|
312
312
|
{}
|
|
313
313
|
),
|
|
314
|
-
pathname:
|
|
314
|
+
pathname: i,
|
|
315
315
|
pathnameBase: c,
|
|
316
316
|
pattern: e
|
|
317
317
|
};
|
|
@@ -337,7 +337,7 @@ function ye(e) {
|
|
|
337
337
|
), e;
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function D(e, t) {
|
|
341
341
|
if (t === "/") return e;
|
|
342
342
|
if (!e.toLowerCase().startsWith(t.toLowerCase()))
|
|
343
343
|
return null;
|
|
@@ -380,17 +380,17 @@ function Z(e) {
|
|
|
380
380
|
}
|
|
381
381
|
function ee(e, t, n, a = !1) {
|
|
382
382
|
let r;
|
|
383
|
-
typeof e == "string" ? r = Y(e) : (r = { ...e },
|
|
383
|
+
typeof e == "string" ? r = Y(e) : (r = { ...e }, R(
|
|
384
384
|
!r.pathname || !r.pathname.includes("?"),
|
|
385
385
|
G("?", "pathname", "search", r)
|
|
386
|
-
),
|
|
386
|
+
), R(
|
|
387
387
|
!r.pathname || !r.pathname.includes("#"),
|
|
388
388
|
G("#", "pathname", "hash", r)
|
|
389
|
-
),
|
|
389
|
+
), R(
|
|
390
390
|
!r.search || !r.search.includes("#"),
|
|
391
391
|
G("#", "search", "hash", r)
|
|
392
392
|
));
|
|
393
|
-
let
|
|
393
|
+
let i = e === "" || r.pathname === "", c = i ? "/" : r.pathname, u;
|
|
394
394
|
if (c == null)
|
|
395
395
|
u = n;
|
|
396
396
|
else {
|
|
@@ -403,7 +403,7 @@ function ee(e, t, n, a = !1) {
|
|
|
403
403
|
}
|
|
404
404
|
u = p >= 0 ? t[p] : "/";
|
|
405
405
|
}
|
|
406
|
-
let l = je(r, u), s = c && c !== "/" && c.endsWith("/"), h = (
|
|
406
|
+
let l = je(r, u), s = c && c !== "/" && c.endsWith("/"), h = (i || c === ".") && n.endsWith("/");
|
|
407
407
|
return !l.pathname.endsWith("/") && (s || h) && (l.pathname += "/"), l;
|
|
408
408
|
}
|
|
409
409
|
var A = (e) => e.join("/").replace(/\/\/+/g, "/"), Ke = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), qe = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Ge = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, an = (e, t = 302) => {
|
|
@@ -429,89 +429,89 @@ var Xe = [
|
|
|
429
429
|
...Ee
|
|
430
430
|
];
|
|
431
431
|
new Set(Xe);
|
|
432
|
-
var
|
|
433
|
-
|
|
434
|
-
var F =
|
|
432
|
+
var I = o.createContext(null);
|
|
433
|
+
I.displayName = "DataRouter";
|
|
434
|
+
var F = o.createContext(null);
|
|
435
435
|
F.displayName = "DataRouterState";
|
|
436
|
-
var J =
|
|
436
|
+
var J = o.createContext({
|
|
437
437
|
isTransitioning: !1
|
|
438
438
|
});
|
|
439
439
|
J.displayName = "ViewTransition";
|
|
440
|
-
var te =
|
|
440
|
+
var te = o.createContext(
|
|
441
441
|
/* @__PURE__ */ new Map()
|
|
442
442
|
);
|
|
443
443
|
te.displayName = "Fetchers";
|
|
444
|
-
var Qe =
|
|
444
|
+
var Qe = o.createContext(null);
|
|
445
445
|
Qe.displayName = "Await";
|
|
446
|
-
var T =
|
|
446
|
+
var T = o.createContext(
|
|
447
447
|
null
|
|
448
448
|
);
|
|
449
449
|
T.displayName = "Navigation";
|
|
450
|
-
var K =
|
|
450
|
+
var K = o.createContext(
|
|
451
451
|
null
|
|
452
452
|
);
|
|
453
453
|
K.displayName = "Location";
|
|
454
|
-
var k =
|
|
454
|
+
var k = o.createContext({
|
|
455
455
|
outlet: null,
|
|
456
456
|
matches: [],
|
|
457
457
|
isDataRoute: !1
|
|
458
458
|
});
|
|
459
459
|
k.displayName = "Route";
|
|
460
|
-
var ne =
|
|
460
|
+
var ne = o.createContext(null);
|
|
461
461
|
ne.displayName = "RouteError";
|
|
462
462
|
function Ze(e, { relative: t } = {}) {
|
|
463
|
-
|
|
464
|
-
|
|
463
|
+
R(
|
|
464
|
+
O(),
|
|
465
465
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
466
466
|
// router loaded. We can help them understand how to avoid that.
|
|
467
467
|
"useHref() may be used only in the context of a <Router> component."
|
|
468
468
|
);
|
|
469
|
-
let { basename: n, navigator: a } =
|
|
470
|
-
return n !== "/" && (u =
|
|
469
|
+
let { basename: n, navigator: a } = o.useContext(T), { hash: r, pathname: i, search: c } = W(e, { relative: t }), u = i;
|
|
470
|
+
return n !== "/" && (u = i === "/" ? n : A([n, i])), a.createHref({ pathname: u, search: c, hash: r });
|
|
471
471
|
}
|
|
472
|
-
function
|
|
473
|
-
return
|
|
472
|
+
function O() {
|
|
473
|
+
return o.useContext(K) != null;
|
|
474
474
|
}
|
|
475
475
|
function N() {
|
|
476
|
-
return
|
|
477
|
-
|
|
476
|
+
return R(
|
|
477
|
+
O(),
|
|
478
478
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
479
479
|
// router loaded. We can help them understand how to avoid that.
|
|
480
480
|
"useLocation() may be used only in the context of a <Router> component."
|
|
481
|
-
),
|
|
481
|
+
), o.useContext(K).location;
|
|
482
482
|
}
|
|
483
483
|
function on(e) {
|
|
484
|
-
|
|
485
|
-
|
|
484
|
+
R(
|
|
485
|
+
O(),
|
|
486
486
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
487
487
|
// router loaded. We can help them understand how to avoid that.
|
|
488
488
|
"useMatch() may be used only in the context of a <Router> component."
|
|
489
489
|
);
|
|
490
490
|
let { pathname: t } = N();
|
|
491
|
-
return
|
|
491
|
+
return o.useMemo(
|
|
492
492
|
() => H(e, ye(t)),
|
|
493
493
|
[t, e]
|
|
494
494
|
);
|
|
495
495
|
}
|
|
496
496
|
var xe = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
497
|
-
function
|
|
498
|
-
|
|
497
|
+
function be(e) {
|
|
498
|
+
o.useContext(T).static || o.useLayoutEffect(e);
|
|
499
499
|
}
|
|
500
500
|
function re() {
|
|
501
|
-
let { isDataRoute: e } =
|
|
501
|
+
let { isDataRoute: e } = o.useContext(k);
|
|
502
502
|
return e ? dt() : et();
|
|
503
503
|
}
|
|
504
504
|
function et() {
|
|
505
|
-
|
|
506
|
-
|
|
505
|
+
R(
|
|
506
|
+
O(),
|
|
507
507
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
508
508
|
// router loaded. We can help them understand how to avoid that.
|
|
509
509
|
"useNavigate() may be used only in the context of a <Router> component."
|
|
510
510
|
);
|
|
511
|
-
let e =
|
|
512
|
-
return
|
|
511
|
+
let e = o.useContext(I), { basename: t, navigator: n } = o.useContext(T), { matches: a } = o.useContext(k), { pathname: r } = N(), i = JSON.stringify(Z(a)), c = o.useRef(!1);
|
|
512
|
+
return be(() => {
|
|
513
513
|
c.current = !0;
|
|
514
|
-
}),
|
|
514
|
+
}), o.useCallback(
|
|
515
515
|
(l, s = {}) => {
|
|
516
516
|
if (L(c.current, xe), !c.current) return;
|
|
517
517
|
if (typeof l == "number") {
|
|
@@ -520,7 +520,7 @@ function et() {
|
|
|
520
520
|
}
|
|
521
521
|
let h = ee(
|
|
522
522
|
l,
|
|
523
|
-
JSON.parse(
|
|
523
|
+
JSON.parse(i),
|
|
524
524
|
r,
|
|
525
525
|
s.relative === "path"
|
|
526
526
|
);
|
|
@@ -533,24 +533,24 @@ function et() {
|
|
|
533
533
|
[
|
|
534
534
|
t,
|
|
535
535
|
n,
|
|
536
|
-
|
|
536
|
+
i,
|
|
537
537
|
r,
|
|
538
538
|
e
|
|
539
539
|
]
|
|
540
540
|
);
|
|
541
541
|
}
|
|
542
|
-
var tt =
|
|
542
|
+
var tt = o.createContext(null);
|
|
543
543
|
function nt(e) {
|
|
544
|
-
let t =
|
|
545
|
-
return t && /* @__PURE__ */
|
|
544
|
+
let t = o.useContext(k).outlet;
|
|
545
|
+
return t && /* @__PURE__ */ o.createElement(tt.Provider, { value: e }, t);
|
|
546
546
|
}
|
|
547
547
|
function ln() {
|
|
548
|
-
let { matches: e } =
|
|
548
|
+
let { matches: e } = o.useContext(k), t = e[e.length - 1];
|
|
549
549
|
return t ? t.params : {};
|
|
550
550
|
}
|
|
551
551
|
function W(e, { relative: t } = {}) {
|
|
552
|
-
let { matches: n } =
|
|
553
|
-
return
|
|
552
|
+
let { matches: n } = o.useContext(k), { pathname: a } = N(), r = JSON.stringify(Z(n));
|
|
553
|
+
return o.useMemo(
|
|
554
554
|
() => ee(
|
|
555
555
|
e,
|
|
556
556
|
JSON.parse(r),
|
|
@@ -560,14 +560,14 @@ function W(e, { relative: t } = {}) {
|
|
|
560
560
|
[e, r, a, t]
|
|
561
561
|
);
|
|
562
562
|
}
|
|
563
|
-
function
|
|
564
|
-
|
|
565
|
-
|
|
563
|
+
function Re(e, t, n, a) {
|
|
564
|
+
R(
|
|
565
|
+
O(),
|
|
566
566
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
567
567
|
// router loaded. We can help them understand how to avoid that.
|
|
568
568
|
"useRoutes() may be used only in the context of a <Router> component."
|
|
569
569
|
);
|
|
570
|
-
let { navigator: r, static:
|
|
570
|
+
let { navigator: r, static: i } = o.useContext(T), { matches: c } = o.useContext(k), u = c[c.length - 1], l = u ? u.params : {}, s = u ? u.pathname : "/", h = u ? u.pathnameBase : "/", p = u && u.route;
|
|
571
571
|
{
|
|
572
572
|
let y = p && p.path || "";
|
|
573
573
|
Pe(
|
|
@@ -585,7 +585,7 @@ Please change the parent <Route path="${y}"> to <Route path="${y === "/" ? "*" :
|
|
|
585
585
|
let y = h.replace(/^\//, "").split("/");
|
|
586
586
|
E = "/" + f.replace(/^\//, "").split("/").slice(y.length).join("/");
|
|
587
587
|
}
|
|
588
|
-
let g = !
|
|
588
|
+
let g = !i && n && n.matches && n.matches.length > 0 ? n.matches : pe(e, { pathname: E });
|
|
589
589
|
return L(
|
|
590
590
|
p || g != null,
|
|
591
591
|
`No routes matched location "${m.pathname}${m.search}${m.hash}" `
|
|
@@ -614,13 +614,13 @@ Please change the parent <Route path="${y}"> to <Route path="${y === "/" ? "*" :
|
|
|
614
614
|
);
|
|
615
615
|
}
|
|
616
616
|
function rt() {
|
|
617
|
-
let e = ft(), t = we(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null, a = "rgba(200,200,200, 0.5)", r = { padding: "0.5rem", backgroundColor: a },
|
|
617
|
+
let e = ft(), t = we(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null, a = "rgba(200,200,200, 0.5)", r = { padding: "0.5rem", backgroundColor: a }, i = { padding: "2px 4px", backgroundColor: a }, c = null;
|
|
618
618
|
return console.error(
|
|
619
619
|
"Error handled by React Router default ErrorBoundary:",
|
|
620
620
|
e
|
|
621
|
-
), c = /* @__PURE__ */
|
|
621
|
+
), c = /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ o.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ o.createElement("code", { style: i }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ o.createElement("code", { style: i }, "errorElement"), " prop on your route.")), /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ o.createElement("h3", { style: { fontStyle: "italic" } }, t), n ? /* @__PURE__ */ o.createElement("pre", { style: r }, n) : null, c);
|
|
622
622
|
}
|
|
623
|
-
var at = /* @__PURE__ */
|
|
623
|
+
var at = /* @__PURE__ */ o.createElement(rt, null), it = class extends o.Component {
|
|
624
624
|
constructor(e) {
|
|
625
625
|
super(e), this.state = {
|
|
626
626
|
location: e.location,
|
|
@@ -650,7 +650,7 @@ var at = /* @__PURE__ */ i.createElement(rt, null), it = class extends i.Compone
|
|
|
650
650
|
);
|
|
651
651
|
}
|
|
652
652
|
render() {
|
|
653
|
-
return this.state.error !== void 0 ? /* @__PURE__ */
|
|
653
|
+
return this.state.error !== void 0 ? /* @__PURE__ */ o.createElement(k.Provider, { value: this.props.routeContext }, /* @__PURE__ */ o.createElement(
|
|
654
654
|
ne.Provider,
|
|
655
655
|
{
|
|
656
656
|
value: this.state.error,
|
|
@@ -660,8 +660,8 @@ var at = /* @__PURE__ */ i.createElement(rt, null), it = class extends i.Compone
|
|
|
660
660
|
}
|
|
661
661
|
};
|
|
662
662
|
function ot({ routeContext: e, match: t, children: n }) {
|
|
663
|
-
let a =
|
|
664
|
-
return a && a.static && a.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (a.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */
|
|
663
|
+
let a = o.useContext(I);
|
|
664
|
+
return a && a.static && a.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (a.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ o.createElement(k.Provider, { value: e }, n);
|
|
665
665
|
}
|
|
666
666
|
function lt(e, t = [], n = null, a = null) {
|
|
667
667
|
if (e == null) {
|
|
@@ -674,15 +674,15 @@ function lt(e, t = [], n = null, a = null) {
|
|
|
674
674
|
else
|
|
675
675
|
return null;
|
|
676
676
|
}
|
|
677
|
-
let r = e,
|
|
678
|
-
if (
|
|
677
|
+
let r = e, i = n == null ? void 0 : n.errors;
|
|
678
|
+
if (i != null) {
|
|
679
679
|
let l = r.findIndex(
|
|
680
|
-
(s) => s.route.id && (
|
|
680
|
+
(s) => s.route.id && (i == null ? void 0 : i[s.route.id]) !== void 0
|
|
681
681
|
);
|
|
682
|
-
|
|
682
|
+
R(
|
|
683
683
|
l >= 0,
|
|
684
684
|
`Could not find a matching route for errors on route IDs: ${Object.keys(
|
|
685
|
-
|
|
685
|
+
i
|
|
686
686
|
).join(",")}`
|
|
687
687
|
), r = r.slice(
|
|
688
688
|
0,
|
|
@@ -703,14 +703,14 @@ function lt(e, t = [], n = null, a = null) {
|
|
|
703
703
|
}
|
|
704
704
|
return r.reduceRight((l, s, h) => {
|
|
705
705
|
let p, d = !1, m = null, f = null;
|
|
706
|
-
n && (p =
|
|
706
|
+
n && (p = i && s.route.id ? i[s.route.id] : void 0, m = s.route.errorElement || at, c && (u < 0 && h === 0 ? (Pe(
|
|
707
707
|
"route-fallback",
|
|
708
708
|
!1,
|
|
709
709
|
"No `HydrateFallback` element provided to render during initial hydration"
|
|
710
710
|
), d = !0, f = null) : u === h && (d = !0, f = s.route.hydrateFallbackElement || null)));
|
|
711
711
|
let E = t.concat(r.slice(0, h + 1)), g = () => {
|
|
712
712
|
let v;
|
|
713
|
-
return p ? v = m : d ? v = f : s.route.Component ? v = /* @__PURE__ */
|
|
713
|
+
return p ? v = m : d ? v = f : s.route.Component ? v = /* @__PURE__ */ o.createElement(s.route.Component, null) : s.route.element ? v = s.route.element : v = l, /* @__PURE__ */ o.createElement(
|
|
714
714
|
ot,
|
|
715
715
|
{
|
|
716
716
|
match: s,
|
|
@@ -723,7 +723,7 @@ function lt(e, t = [], n = null, a = null) {
|
|
|
723
723
|
}
|
|
724
724
|
);
|
|
725
725
|
};
|
|
726
|
-
return n && (s.route.ErrorBoundary || s.route.errorElement || h === 0) ? /* @__PURE__ */
|
|
726
|
+
return n && (s.route.ErrorBoundary || s.route.errorElement || h === 0) ? /* @__PURE__ */ o.createElement(
|
|
727
727
|
it,
|
|
728
728
|
{
|
|
729
729
|
location: n.location,
|
|
@@ -740,20 +740,20 @@ function ae(e) {
|
|
|
740
740
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
741
741
|
}
|
|
742
742
|
function st(e) {
|
|
743
|
-
let t =
|
|
744
|
-
return
|
|
743
|
+
let t = o.useContext(I);
|
|
744
|
+
return R(t, ae(e)), t;
|
|
745
745
|
}
|
|
746
746
|
function Ce(e) {
|
|
747
|
-
let t =
|
|
748
|
-
return
|
|
747
|
+
let t = o.useContext(F);
|
|
748
|
+
return R(t, ae(e)), t;
|
|
749
749
|
}
|
|
750
750
|
function ut(e) {
|
|
751
|
-
let t =
|
|
752
|
-
return
|
|
751
|
+
let t = o.useContext(k);
|
|
752
|
+
return R(t, ae(e)), t;
|
|
753
753
|
}
|
|
754
754
|
function ie(e) {
|
|
755
755
|
let t = ut(e), n = t.matches[t.matches.length - 1];
|
|
756
|
-
return
|
|
756
|
+
return R(
|
|
757
757
|
n.route.id,
|
|
758
758
|
`${e} can only be used on routes that contain a unique "id"`
|
|
759
759
|
), n.route.id;
|
|
@@ -772,7 +772,7 @@ function sn() {
|
|
|
772
772
|
}
|
|
773
773
|
function ft() {
|
|
774
774
|
var a;
|
|
775
|
-
let e =
|
|
775
|
+
let e = o.useContext(ne), t = Ce(
|
|
776
776
|
"useRouteError"
|
|
777
777
|
/* UseRouteError */
|
|
778
778
|
), n = ie(
|
|
@@ -788,12 +788,12 @@ function dt() {
|
|
|
788
788
|
), t = ie(
|
|
789
789
|
"useNavigate"
|
|
790
790
|
/* UseNavigateStable */
|
|
791
|
-
), n =
|
|
792
|
-
return
|
|
791
|
+
), n = o.useRef(!1);
|
|
792
|
+
return be(() => {
|
|
793
793
|
n.current = !0;
|
|
794
|
-
}),
|
|
795
|
-
async (r,
|
|
796
|
-
L(n.current, xe), n.current && (typeof r == "number" ? e.navigate(r) : await e.navigate(r, { fromRouteId: t, ...
|
|
794
|
+
}), o.useCallback(
|
|
795
|
+
async (r, i = {}) => {
|
|
796
|
+
L(n.current, xe), n.current && (typeof r == "number" ? e.navigate(r) : await e.navigate(r, { fromRouteId: t, ...i }));
|
|
797
797
|
},
|
|
798
798
|
[e, t]
|
|
799
799
|
);
|
|
@@ -821,13 +821,13 @@ function un({
|
|
|
821
821
|
router: e,
|
|
822
822
|
flushSync: t
|
|
823
823
|
}) {
|
|
824
|
-
let [n, a] =
|
|
824
|
+
let [n, a] = o.useState(e.state), [r, i] = o.useState(), [c, u] = o.useState({
|
|
825
825
|
isTransitioning: !1
|
|
826
|
-
}), [l, s] =
|
|
827
|
-
(w, { deletedFetchers:
|
|
826
|
+
}), [l, s] = o.useState(), [h, p] = o.useState(), [d, m] = o.useState(), f = o.useRef(/* @__PURE__ */ new Map()), E = o.useCallback(
|
|
827
|
+
(w, { deletedFetchers: b, flushSync: x, viewTransitionOpts: C }) => {
|
|
828
828
|
w.fetchers.forEach((P, S) => {
|
|
829
829
|
P.data !== void 0 && f.current.set(S, P.data);
|
|
830
|
-
}),
|
|
830
|
+
}), b.forEach((P) => f.current.delete(P)), he(
|
|
831
831
|
x === !1 || t != null,
|
|
832
832
|
'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.'
|
|
833
833
|
);
|
|
@@ -836,7 +836,7 @@ function un({
|
|
|
836
836
|
C == null || $,
|
|
837
837
|
"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."
|
|
838
838
|
), !C || !$) {
|
|
839
|
-
t && x ? t(() => a(w)) :
|
|
839
|
+
t && x ? t(() => a(w)) : o.startTransition(() => a(w));
|
|
840
840
|
return;
|
|
841
841
|
}
|
|
842
842
|
if (t && x) {
|
|
@@ -853,7 +853,7 @@ function un({
|
|
|
853
853
|
});
|
|
854
854
|
P.finished.finally(() => {
|
|
855
855
|
t(() => {
|
|
856
|
-
s(void 0), p(void 0),
|
|
856
|
+
s(void 0), p(void 0), i(void 0), u({ isTransitioning: !1 });
|
|
857
857
|
});
|
|
858
858
|
}), t(() => p(P));
|
|
859
859
|
return;
|
|
@@ -862,7 +862,7 @@ function un({
|
|
|
862
862
|
state: w,
|
|
863
863
|
currentLocation: C.currentLocation,
|
|
864
864
|
nextLocation: C.nextLocation
|
|
865
|
-
})) : (
|
|
865
|
+
})) : (i(w), u({
|
|
866
866
|
isTransitioning: !0,
|
|
867
867
|
flushSync: !1,
|
|
868
868
|
currentLocation: C.currentLocation,
|
|
@@ -871,41 +871,41 @@ function un({
|
|
|
871
871
|
},
|
|
872
872
|
[e.window, t, h, l]
|
|
873
873
|
);
|
|
874
|
-
|
|
874
|
+
o.useLayoutEffect(() => e.subscribe(E), [e, E]), o.useEffect(() => {
|
|
875
875
|
c.isTransitioning && !c.flushSync && s(new ht());
|
|
876
|
-
}, [c]),
|
|
876
|
+
}, [c]), o.useEffect(() => {
|
|
877
877
|
if (l && r && e.window) {
|
|
878
|
-
let w = r,
|
|
879
|
-
|
|
878
|
+
let w = r, b = l.promise, x = e.window.document.startViewTransition(async () => {
|
|
879
|
+
o.startTransition(() => a(w)), await b;
|
|
880
880
|
});
|
|
881
881
|
x.finished.finally(() => {
|
|
882
|
-
s(void 0), p(void 0),
|
|
882
|
+
s(void 0), p(void 0), i(void 0), u({ isTransitioning: !1 });
|
|
883
883
|
}), p(x);
|
|
884
884
|
}
|
|
885
|
-
}, [r, l, e.window]),
|
|
885
|
+
}, [r, l, e.window]), o.useEffect(() => {
|
|
886
886
|
l && r && n.location.key === r.location.key && l.resolve();
|
|
887
|
-
}, [l, h, n.location, r]),
|
|
888
|
-
!c.isTransitioning && d && (
|
|
887
|
+
}, [l, h, n.location, r]), o.useEffect(() => {
|
|
888
|
+
!c.isTransitioning && d && (i(d.state), u({
|
|
889
889
|
isTransitioning: !0,
|
|
890
890
|
flushSync: !1,
|
|
891
891
|
currentLocation: d.currentLocation,
|
|
892
892
|
nextLocation: d.nextLocation
|
|
893
893
|
}), m(void 0));
|
|
894
894
|
}, [c.isTransitioning, d]);
|
|
895
|
-
let g =
|
|
895
|
+
let g = o.useMemo(() => ({
|
|
896
896
|
createHref: e.createHref,
|
|
897
897
|
encodeLocation: e.encodeLocation,
|
|
898
898
|
go: (w) => e.navigate(w),
|
|
899
|
-
push: (w,
|
|
900
|
-
state:
|
|
899
|
+
push: (w, b, x) => e.navigate(w, {
|
|
900
|
+
state: b,
|
|
901
901
|
preventScrollReset: x == null ? void 0 : x.preventScrollReset
|
|
902
902
|
}),
|
|
903
|
-
replace: (w,
|
|
903
|
+
replace: (w, b, x) => e.navigate(w, {
|
|
904
904
|
replace: !0,
|
|
905
|
-
state:
|
|
905
|
+
state: b,
|
|
906
906
|
preventScrollReset: x == null ? void 0 : x.preventScrollReset
|
|
907
907
|
})
|
|
908
|
-
}), [e]), v = e.basename || "/", y =
|
|
908
|
+
}), [e]), v = e.basename || "/", y = o.useMemo(
|
|
909
909
|
() => ({
|
|
910
910
|
router: e,
|
|
911
911
|
navigator: g,
|
|
@@ -914,7 +914,7 @@ function un({
|
|
|
914
914
|
}),
|
|
915
915
|
[e, g, v]
|
|
916
916
|
);
|
|
917
|
-
return /* @__PURE__ */
|
|
917
|
+
return /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(I.Provider, { value: y }, /* @__PURE__ */ o.createElement(F.Provider, { value: n }, /* @__PURE__ */ o.createElement(te.Provider, { value: f.current }, /* @__PURE__ */ o.createElement(J.Provider, { value: c }, /* @__PURE__ */ o.createElement(
|
|
918
918
|
Se,
|
|
919
919
|
{
|
|
920
920
|
basename: v,
|
|
@@ -922,7 +922,7 @@ function un({
|
|
|
922
922
|
navigationType: n.historyAction,
|
|
923
923
|
navigator: g
|
|
924
924
|
},
|
|
925
|
-
/* @__PURE__ */
|
|
925
|
+
/* @__PURE__ */ o.createElement(
|
|
926
926
|
mt,
|
|
927
927
|
{
|
|
928
928
|
routes: e.routes,
|
|
@@ -932,13 +932,13 @@ function un({
|
|
|
932
932
|
)
|
|
933
933
|
))))), null);
|
|
934
934
|
}
|
|
935
|
-
var mt =
|
|
935
|
+
var mt = o.memo(pt);
|
|
936
936
|
function pt({
|
|
937
937
|
routes: e,
|
|
938
938
|
future: t,
|
|
939
939
|
state: n
|
|
940
940
|
}) {
|
|
941
|
-
return
|
|
941
|
+
return Re(e, void 0, n, t);
|
|
942
942
|
}
|
|
943
943
|
function cn({
|
|
944
944
|
to: e,
|
|
@@ -946,24 +946,24 @@ function cn({
|
|
|
946
946
|
state: n,
|
|
947
947
|
relative: a
|
|
948
948
|
}) {
|
|
949
|
-
|
|
950
|
-
|
|
949
|
+
R(
|
|
950
|
+
O(),
|
|
951
951
|
// TODO: This error is probably because they somehow have 2 versions of
|
|
952
952
|
// the router loaded. We can help them understand how to avoid that.
|
|
953
953
|
"<Navigate> may be used only in the context of a <Router> component."
|
|
954
954
|
);
|
|
955
|
-
let { static: r } =
|
|
955
|
+
let { static: r } = o.useContext(T);
|
|
956
956
|
L(
|
|
957
957
|
!r,
|
|
958
958
|
"<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."
|
|
959
959
|
);
|
|
960
|
-
let { matches:
|
|
960
|
+
let { matches: i } = o.useContext(k), { pathname: c } = N(), u = re(), l = ee(
|
|
961
961
|
e,
|
|
962
|
-
Z(
|
|
962
|
+
Z(i),
|
|
963
963
|
c,
|
|
964
964
|
a === "path"
|
|
965
965
|
), s = JSON.stringify(l);
|
|
966
|
-
return
|
|
966
|
+
return o.useEffect(() => {
|
|
967
967
|
u(JSON.parse(s), { replace: t, state: n, relative: a });
|
|
968
968
|
}, [u, s, a, t, n]), null;
|
|
969
969
|
}
|
|
@@ -976,20 +976,20 @@ function Se({
|
|
|
976
976
|
location: n,
|
|
977
977
|
navigationType: a = "POP",
|
|
978
978
|
navigator: r,
|
|
979
|
-
static:
|
|
979
|
+
static: i = !1
|
|
980
980
|
}) {
|
|
981
|
-
|
|
982
|
-
!
|
|
981
|
+
R(
|
|
982
|
+
!O(),
|
|
983
983
|
"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."
|
|
984
984
|
);
|
|
985
|
-
let c = e.replace(/^\/*/, "/"), u =
|
|
985
|
+
let c = e.replace(/^\/*/, "/"), u = o.useMemo(
|
|
986
986
|
() => ({
|
|
987
987
|
basename: c,
|
|
988
988
|
navigator: r,
|
|
989
|
-
static:
|
|
989
|
+
static: i,
|
|
990
990
|
future: {}
|
|
991
991
|
}),
|
|
992
|
-
[c, r,
|
|
992
|
+
[c, r, i]
|
|
993
993
|
);
|
|
994
994
|
typeof n == "string" && (n = Y(n));
|
|
995
995
|
let {
|
|
@@ -998,8 +998,8 @@ function Se({
|
|
|
998
998
|
hash: h = "",
|
|
999
999
|
state: p = null,
|
|
1000
1000
|
key: d = "default"
|
|
1001
|
-
} = n, m =
|
|
1002
|
-
let f =
|
|
1001
|
+
} = n, m = o.useMemo(() => {
|
|
1002
|
+
let f = D(l, c);
|
|
1003
1003
|
return f == null ? null : {
|
|
1004
1004
|
location: {
|
|
1005
1005
|
pathname: f,
|
|
@@ -1014,7 +1014,7 @@ function Se({
|
|
|
1014
1014
|
return L(
|
|
1015
1015
|
m != null,
|
|
1016
1016
|
`<Router basename="${c}"> is not able to match the URL "${l}${s}${h}" because it does not start with the basename, so the <Router> won't render anything.`
|
|
1017
|
-
), m == null ? null : /* @__PURE__ */
|
|
1017
|
+
), m == null ? null : /* @__PURE__ */ o.createElement(T.Provider, { value: u }, /* @__PURE__ */ o.createElement(K.Provider, { children: t, value: m }));
|
|
1018
1018
|
}
|
|
1019
1019
|
var V = "get", j = "application/x-www-form-urlencoded";
|
|
1020
1020
|
function q(e) {
|
|
@@ -1050,13 +1050,13 @@ function Q(e = "") {
|
|
|
1050
1050
|
function xt(e, t) {
|
|
1051
1051
|
let n = Q(e);
|
|
1052
1052
|
return t && t.forEach((a, r) => {
|
|
1053
|
-
n.has(r) || t.getAll(r).forEach((
|
|
1054
|
-
n.append(r,
|
|
1053
|
+
n.has(r) || t.getAll(r).forEach((i) => {
|
|
1054
|
+
n.append(r, i);
|
|
1055
1055
|
});
|
|
1056
1056
|
}), n;
|
|
1057
1057
|
}
|
|
1058
1058
|
var z = null;
|
|
1059
|
-
function
|
|
1059
|
+
function bt() {
|
|
1060
1060
|
if (z === null)
|
|
1061
1061
|
try {
|
|
1062
1062
|
new FormData(
|
|
@@ -1069,22 +1069,22 @@ function Rt() {
|
|
|
1069
1069
|
}
|
|
1070
1070
|
return z;
|
|
1071
1071
|
}
|
|
1072
|
-
var
|
|
1072
|
+
var Rt = /* @__PURE__ */ new Set([
|
|
1073
1073
|
"application/x-www-form-urlencoded",
|
|
1074
1074
|
"multipart/form-data",
|
|
1075
1075
|
"text/plain"
|
|
1076
1076
|
]);
|
|
1077
1077
|
function X(e) {
|
|
1078
|
-
return e != null && !
|
|
1078
|
+
return e != null && !Rt.has(e) ? (L(
|
|
1079
1079
|
!1,
|
|
1080
1080
|
`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${j}"`
|
|
1081
1081
|
), null) : e;
|
|
1082
1082
|
}
|
|
1083
1083
|
function Ct(e, t) {
|
|
1084
|
-
let n, a, r,
|
|
1084
|
+
let n, a, r, i, c;
|
|
1085
1085
|
if (gt(e)) {
|
|
1086
1086
|
let u = e.getAttribute("action");
|
|
1087
|
-
a = u ?
|
|
1087
|
+
a = u ? D(u, t) : null, n = e.getAttribute("method") || V, r = X(e.getAttribute("enctype")) || j, i = new FormData(e);
|
|
1088
1088
|
} else if (vt(e) || yt(e) && (e.type === "submit" || e.type === "image")) {
|
|
1089
1089
|
let u = e.form;
|
|
1090
1090
|
if (u == null)
|
|
@@ -1092,12 +1092,12 @@ function Ct(e, t) {
|
|
|
1092
1092
|
'Cannot submit a <button> or <input type="submit"> without a <form>'
|
|
1093
1093
|
);
|
|
1094
1094
|
let l = e.getAttribute("formaction") || u.getAttribute("action");
|
|
1095
|
-
if (a = l ?
|
|
1095
|
+
if (a = l ? D(l, t) : null, n = e.getAttribute("formmethod") || u.getAttribute("method") || V, r = X(e.getAttribute("formenctype")) || X(u.getAttribute("enctype")) || j, i = new FormData(u, e), !bt()) {
|
|
1096
1096
|
let { name: s, type: h, value: p } = e;
|
|
1097
1097
|
if (h === "image") {
|
|
1098
1098
|
let d = s ? `${s}.` : "";
|
|
1099
|
-
|
|
1100
|
-
} else s &&
|
|
1099
|
+
i.append(`${d}x`, "0"), i.append(`${d}y`, "0");
|
|
1100
|
+
} else s && i.append(s, p);
|
|
1101
1101
|
}
|
|
1102
1102
|
} else {
|
|
1103
1103
|
if (q(e))
|
|
@@ -1106,7 +1106,7 @@ function Ct(e, t) {
|
|
|
1106
1106
|
);
|
|
1107
1107
|
n = V, a = null, r = j, c = e;
|
|
1108
1108
|
}
|
|
1109
|
-
return
|
|
1109
|
+
return i && r === "text/plain" && (c = i, i = void 0), { action: a, method: n.toLowerCase(), encType: r, formData: i, body: c };
|
|
1110
1110
|
}
|
|
1111
1111
|
function oe(e, t) {
|
|
1112
1112
|
if (e === !1 || e === null || typeof e > "u")
|
|
@@ -1135,9 +1135,9 @@ function St(e) {
|
|
|
1135
1135
|
async function Lt(e, t, n) {
|
|
1136
1136
|
let a = await Promise.all(
|
|
1137
1137
|
e.map(async (r) => {
|
|
1138
|
-
let
|
|
1139
|
-
if (
|
|
1140
|
-
let c = await Pt(
|
|
1138
|
+
let i = t.routes[r.route.id];
|
|
1139
|
+
if (i) {
|
|
1140
|
+
let c = await Pt(i, n);
|
|
1141
1141
|
return c.links ? c.links() : [];
|
|
1142
1142
|
}
|
|
1143
1143
|
return [];
|
|
@@ -1149,7 +1149,7 @@ async function Lt(e, t, n) {
|
|
|
1149
1149
|
)
|
|
1150
1150
|
);
|
|
1151
1151
|
}
|
|
1152
|
-
function me(e, t, n, a, r,
|
|
1152
|
+
function me(e, t, n, a, r, i) {
|
|
1153
1153
|
let c = (l, s) => n[s] ? l.route.id !== n[s].route.id : !0, u = (l, s) => {
|
|
1154
1154
|
var h;
|
|
1155
1155
|
return (
|
|
@@ -1159,9 +1159,9 @@ function me(e, t, n, a, r, o) {
|
|
|
1159
1159
|
((h = n[s].route.path) == null ? void 0 : h.endsWith("*")) && n[s].params["*"] !== l.params["*"]
|
|
1160
1160
|
);
|
|
1161
1161
|
};
|
|
1162
|
-
return
|
|
1162
|
+
return i === "assets" ? t.filter(
|
|
1163
1163
|
(l, s) => c(l, s) || u(l, s)
|
|
1164
|
-
) :
|
|
1164
|
+
) : i === "data" ? t.filter((l, s) => {
|
|
1165
1165
|
var p;
|
|
1166
1166
|
let h = a.routes[l.route.id];
|
|
1167
1167
|
if (!h || !h.hasLoader)
|
|
@@ -1185,13 +1185,13 @@ function me(e, t, n, a, r, o) {
|
|
|
1185
1185
|
return !0;
|
|
1186
1186
|
}) : [];
|
|
1187
1187
|
}
|
|
1188
|
-
function kt(e, t) {
|
|
1188
|
+
function kt(e, t, { includeHydrateFallback: n } = {}) {
|
|
1189
1189
|
return $t(
|
|
1190
|
-
e.map((
|
|
1191
|
-
let
|
|
1192
|
-
if (!
|
|
1193
|
-
let
|
|
1194
|
-
return
|
|
1190
|
+
e.map((a) => {
|
|
1191
|
+
let r = t.routes[a.route.id];
|
|
1192
|
+
if (!r) return [];
|
|
1193
|
+
let i = [r.module];
|
|
1194
|
+
return r.clientActionModule && (i = i.concat(r.clientActionModule)), r.clientLoaderModule && (i = i.concat(r.clientLoaderModule)), n && r.hydrateFallbackModule && (i = i.concat(r.hydrateFallbackModule)), r.imports && (i = i.concat(r.imports)), i;
|
|
1195
1195
|
}).flat(1)
|
|
1196
1196
|
);
|
|
1197
1197
|
}
|
|
@@ -1207,8 +1207,8 @@ function Tt(e) {
|
|
|
1207
1207
|
function Nt(e, t) {
|
|
1208
1208
|
let n = /* @__PURE__ */ new Set();
|
|
1209
1209
|
return new Set(t), e.reduce((a, r) => {
|
|
1210
|
-
let
|
|
1211
|
-
return n.has(
|
|
1210
|
+
let i = JSON.stringify(Tt(r));
|
|
1211
|
+
return n.has(i) || (n.add(i), a.push({ key: i, link: r })), a;
|
|
1212
1212
|
}, []);
|
|
1213
1213
|
}
|
|
1214
1214
|
function At(e) {
|
|
@@ -1220,32 +1220,32 @@ function At(e) {
|
|
|
1220
1220
|
) : e;
|
|
1221
1221
|
return t.pathname === "/" ? t.pathname = "_root.data" : t.pathname = `${t.pathname.replace(/\/$/, "")}.data`, t;
|
|
1222
1222
|
}
|
|
1223
|
-
function
|
|
1224
|
-
let e =
|
|
1223
|
+
function Mt() {
|
|
1224
|
+
let e = o.useContext(I);
|
|
1225
1225
|
return oe(
|
|
1226
1226
|
e,
|
|
1227
1227
|
"You must render this element inside a <DataRouterContext.Provider> element"
|
|
1228
1228
|
), e;
|
|
1229
1229
|
}
|
|
1230
|
-
function
|
|
1231
|
-
let e =
|
|
1230
|
+
function Dt() {
|
|
1231
|
+
let e = o.useContext(F);
|
|
1232
1232
|
return oe(
|
|
1233
1233
|
e,
|
|
1234
1234
|
"You must render this element inside a <DataRouterStateContext.Provider> element"
|
|
1235
1235
|
), e;
|
|
1236
1236
|
}
|
|
1237
|
-
var le =
|
|
1237
|
+
var le = o.createContext(void 0);
|
|
1238
1238
|
le.displayName = "FrameworkContext";
|
|
1239
1239
|
function Le() {
|
|
1240
|
-
let e =
|
|
1240
|
+
let e = o.useContext(le);
|
|
1241
1241
|
return oe(
|
|
1242
1242
|
e,
|
|
1243
1243
|
"You must render this element inside a <HydratedRouter> element"
|
|
1244
1244
|
), e;
|
|
1245
1245
|
}
|
|
1246
|
-
function
|
|
1247
|
-
let n =
|
|
1248
|
-
|
|
1246
|
+
function It(e, t) {
|
|
1247
|
+
let n = o.useContext(le), [a, r] = o.useState(!1), [i, c] = o.useState(!1), { onFocus: u, onBlur: l, onMouseEnter: s, onMouseLeave: h, onTouchStart: p } = t, d = o.useRef(null);
|
|
1248
|
+
o.useEffect(() => {
|
|
1249
1249
|
if (e === "render" && c(!0), e === "viewport") {
|
|
1250
1250
|
let E = (v) => {
|
|
1251
1251
|
v.forEach((y) => {
|
|
@@ -1256,7 +1256,7 @@ function Ot(e, t) {
|
|
|
1256
1256
|
g.disconnect();
|
|
1257
1257
|
};
|
|
1258
1258
|
}
|
|
1259
|
-
}, [e]),
|
|
1259
|
+
}, [e]), o.useEffect(() => {
|
|
1260
1260
|
if (a) {
|
|
1261
1261
|
let E = setTimeout(() => {
|
|
1262
1262
|
c(!0);
|
|
@@ -1271,8 +1271,8 @@ function Ot(e, t) {
|
|
|
1271
1271
|
}, f = () => {
|
|
1272
1272
|
r(!1), c(!1);
|
|
1273
1273
|
};
|
|
1274
|
-
return n ? e !== "intent" ? [
|
|
1275
|
-
|
|
1274
|
+
return n ? e !== "intent" ? [i, d, {}] : [
|
|
1275
|
+
i,
|
|
1276
1276
|
d,
|
|
1277
1277
|
{
|
|
1278
1278
|
onFocus: U(u, m),
|
|
@@ -1288,26 +1288,26 @@ function U(e, t) {
|
|
|
1288
1288
|
e && e(n), n.defaultPrevented || t(n);
|
|
1289
1289
|
};
|
|
1290
1290
|
}
|
|
1291
|
-
function
|
|
1291
|
+
function Ot({
|
|
1292
1292
|
page: e,
|
|
1293
1293
|
...t
|
|
1294
1294
|
}) {
|
|
1295
|
-
let { router: n } =
|
|
1295
|
+
let { router: n } = Mt(), a = o.useMemo(
|
|
1296
1296
|
() => pe(n.routes, e, n.basename),
|
|
1297
1297
|
[n.routes, e, n.basename]
|
|
1298
1298
|
);
|
|
1299
|
-
return a ? /* @__PURE__ */
|
|
1299
|
+
return a ? /* @__PURE__ */ o.createElement(_t, { page: e, matches: a, ...t }) : null;
|
|
1300
1300
|
}
|
|
1301
1301
|
function Ft(e) {
|
|
1302
|
-
let { manifest: t, routeModules: n } = Le(), [a, r] =
|
|
1303
|
-
return
|
|
1304
|
-
let
|
|
1302
|
+
let { manifest: t, routeModules: n } = Le(), [a, r] = o.useState([]);
|
|
1303
|
+
return o.useEffect(() => {
|
|
1304
|
+
let i = !1;
|
|
1305
1305
|
return Lt(e, t, n).then(
|
|
1306
1306
|
(c) => {
|
|
1307
|
-
|
|
1307
|
+
i || r(c);
|
|
1308
1308
|
}
|
|
1309
1309
|
), () => {
|
|
1310
|
-
|
|
1310
|
+
i = !0;
|
|
1311
1311
|
};
|
|
1312
1312
|
}, [e, t, n]), a;
|
|
1313
1313
|
}
|
|
@@ -1316,7 +1316,7 @@ function _t({
|
|
|
1316
1316
|
matches: t,
|
|
1317
1317
|
...n
|
|
1318
1318
|
}) {
|
|
1319
|
-
let a = N(), { manifest: r, routeModules:
|
|
1319
|
+
let a = N(), { manifest: r, routeModules: i } = Le(), { loaderData: c, matches: u } = Dt(), l = o.useMemo(
|
|
1320
1320
|
() => me(
|
|
1321
1321
|
e,
|
|
1322
1322
|
t,
|
|
@@ -1326,7 +1326,7 @@ function _t({
|
|
|
1326
1326
|
"data"
|
|
1327
1327
|
),
|
|
1328
1328
|
[e, t, u, r, a]
|
|
1329
|
-
), s =
|
|
1329
|
+
), s = o.useMemo(
|
|
1330
1330
|
() => me(
|
|
1331
1331
|
e,
|
|
1332
1332
|
t,
|
|
@@ -1336,14 +1336,14 @@ function _t({
|
|
|
1336
1336
|
"assets"
|
|
1337
1337
|
),
|
|
1338
1338
|
[e, t, u, r, a]
|
|
1339
|
-
), h =
|
|
1339
|
+
), h = o.useMemo(() => {
|
|
1340
1340
|
if (e === a.pathname + a.search + a.hash)
|
|
1341
1341
|
return [];
|
|
1342
1342
|
let m = /* @__PURE__ */ new Set(), f = !1;
|
|
1343
1343
|
if (t.forEach((g) => {
|
|
1344
1344
|
var y;
|
|
1345
1345
|
let v = r.routes[g.route.id];
|
|
1346
|
-
!v || !v.hasLoader || (!l.some((w) => w.route.id === g.route.id) && g.route.id in c && ((y =
|
|
1346
|
+
!v || !v.hasLoader || (!l.some((w) => w.route.id === g.route.id) && g.route.id in c && ((y = i[g.route.id]) != null && y.shouldRevalidate) || v.hasClientLoader ? f = !0 : m.add(g.route.id));
|
|
1347
1347
|
}), m.size === 0)
|
|
1348
1348
|
return [];
|
|
1349
1349
|
let E = At(e);
|
|
@@ -1358,15 +1358,15 @@ function _t({
|
|
|
1358
1358
|
l,
|
|
1359
1359
|
t,
|
|
1360
1360
|
e,
|
|
1361
|
-
|
|
1362
|
-
]), p =
|
|
1361
|
+
i
|
|
1362
|
+
]), p = o.useMemo(
|
|
1363
1363
|
() => kt(s, r),
|
|
1364
1364
|
[s, r]
|
|
1365
1365
|
), d = Ft(s);
|
|
1366
|
-
return /* @__PURE__ */
|
|
1366
|
+
return /* @__PURE__ */ o.createElement(o.Fragment, null, h.map((m) => /* @__PURE__ */ o.createElement("link", { key: m, rel: "prefetch", as: "fetch", href: m, ...n })), p.map((m) => /* @__PURE__ */ o.createElement("link", { key: m, rel: "modulepreload", href: m, ...n })), d.map(({ key: m, link: f }) => (
|
|
1367
1367
|
// these don't spread `linkProps` because they are full link descriptors
|
|
1368
1368
|
// already with their own props
|
|
1369
|
-
/* @__PURE__ */
|
|
1369
|
+
/* @__PURE__ */ o.createElement("link", { key: m, ...f })
|
|
1370
1370
|
)));
|
|
1371
1371
|
}
|
|
1372
1372
|
function Ut(...e) {
|
|
@@ -1378,16 +1378,16 @@ function Ut(...e) {
|
|
|
1378
1378
|
}
|
|
1379
1379
|
var ke = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
1380
1380
|
try {
|
|
1381
|
-
ke && (window.__reactRouterVersion = "7.
|
|
1381
|
+
ke && (window.__reactRouterVersion = "7.2.0");
|
|
1382
1382
|
} catch {
|
|
1383
1383
|
}
|
|
1384
|
-
var $e = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Te =
|
|
1384
|
+
var $e = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Te = o.forwardRef(
|
|
1385
1385
|
function({
|
|
1386
1386
|
onClick: t,
|
|
1387
1387
|
discover: n = "render",
|
|
1388
1388
|
prefetch: a = "none",
|
|
1389
1389
|
relative: r,
|
|
1390
|
-
reloadDocument:
|
|
1390
|
+
reloadDocument: i,
|
|
1391
1391
|
replace: c,
|
|
1392
1392
|
state: u,
|
|
1393
1393
|
target: l,
|
|
@@ -1396,18 +1396,18 @@ var $e = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Te = i.forwardRef(
|
|
|
1396
1396
|
viewTransition: p,
|
|
1397
1397
|
...d
|
|
1398
1398
|
}, m) {
|
|
1399
|
-
let { basename: f } =
|
|
1399
|
+
let { basename: f } = o.useContext(T), E = typeof s == "string" && $e.test(s), g, v = !1;
|
|
1400
1400
|
if (typeof s == "string" && E && (g = s, ke))
|
|
1401
1401
|
try {
|
|
1402
|
-
let S = new URL(window.location.href),
|
|
1403
|
-
|
|
1402
|
+
let S = new URL(window.location.href), M = s.startsWith("//") ? new URL(S.protocol + s) : new URL(s), se = D(M.pathname, f);
|
|
1403
|
+
M.origin === S.origin && se != null ? s = se + M.search + M.hash : v = !0;
|
|
1404
1404
|
} catch {
|
|
1405
1405
|
L(
|
|
1406
1406
|
!1,
|
|
1407
1407
|
`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
|
|
1408
1408
|
);
|
|
1409
1409
|
}
|
|
1410
|
-
let y = Ze(s, { relative: r }), [w,
|
|
1410
|
+
let y = Ze(s, { relative: r }), [w, b, x] = It(
|
|
1411
1411
|
a,
|
|
1412
1412
|
d
|
|
1413
1413
|
), C = zt(s, {
|
|
@@ -1423,41 +1423,41 @@ var $e = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Te = i.forwardRef(
|
|
|
1423
1423
|
}
|
|
1424
1424
|
let P = (
|
|
1425
1425
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
1426
|
-
/* @__PURE__ */
|
|
1426
|
+
/* @__PURE__ */ o.createElement(
|
|
1427
1427
|
"a",
|
|
1428
1428
|
{
|
|
1429
1429
|
...d,
|
|
1430
1430
|
...x,
|
|
1431
1431
|
href: g || y,
|
|
1432
|
-
onClick: v ||
|
|
1433
|
-
ref: Ut(m,
|
|
1432
|
+
onClick: v || i ? t : $,
|
|
1433
|
+
ref: Ut(m, b),
|
|
1434
1434
|
target: l,
|
|
1435
1435
|
"data-discover": !E && n === "render" ? "true" : void 0
|
|
1436
1436
|
}
|
|
1437
1437
|
)
|
|
1438
1438
|
);
|
|
1439
|
-
return w && !E ? /* @__PURE__ */
|
|
1439
|
+
return w && !E ? /* @__PURE__ */ o.createElement(o.Fragment, null, P, /* @__PURE__ */ o.createElement(Ot, { page: y })) : P;
|
|
1440
1440
|
}
|
|
1441
1441
|
);
|
|
1442
1442
|
Te.displayName = "Link";
|
|
1443
|
-
var Bt =
|
|
1443
|
+
var Bt = o.forwardRef(
|
|
1444
1444
|
function({
|
|
1445
1445
|
"aria-current": t = "page",
|
|
1446
1446
|
caseSensitive: n = !1,
|
|
1447
1447
|
className: a = "",
|
|
1448
1448
|
end: r = !1,
|
|
1449
|
-
style:
|
|
1449
|
+
style: i,
|
|
1450
1450
|
to: c,
|
|
1451
1451
|
viewTransition: u,
|
|
1452
1452
|
children: l,
|
|
1453
1453
|
...s
|
|
1454
1454
|
}, h) {
|
|
1455
|
-
let p = W(c, { relative: s.relative }), d = N(), m =
|
|
1455
|
+
let p = W(c, { relative: s.relative }), d = N(), m = o.useContext(F), { navigator: f, basename: E } = o.useContext(T), g = m != null && // Conditional usage is OK here because the usage of a data router is static
|
|
1456
1456
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1457
1457
|
Kt(p) && u === !0, v = f.encodeLocation ? f.encodeLocation(p).pathname : p.pathname, y = d.pathname, w = m && m.navigation && m.navigation.location ? m.navigation.location.pathname : null;
|
|
1458
|
-
n || (y = y.toLowerCase(), w = w ? w.toLowerCase() : null, v = v.toLowerCase()), w && E && (w =
|
|
1459
|
-
const
|
|
1460
|
-
let x = y === v || !r && y.startsWith(v) && y.charAt(
|
|
1458
|
+
n || (y = y.toLowerCase(), w = w ? w.toLowerCase() : null, v = v.toLowerCase()), w && E && (w = D(w, E) || w);
|
|
1459
|
+
const b = v !== "/" && v.endsWith("/") ? v.length - 1 : v.length;
|
|
1460
|
+
let x = y === v || !r && y.startsWith(v) && y.charAt(b) === "/", C = w != null && (w === v || !r && w.startsWith(v) && w.charAt(v.length) === "/"), $ = {
|
|
1461
1461
|
isActive: x,
|
|
1462
1462
|
isPending: C,
|
|
1463
1463
|
isTransitioning: g
|
|
@@ -1468,15 +1468,15 @@ var Bt = i.forwardRef(
|
|
|
1468
1468
|
C ? "pending" : null,
|
|
1469
1469
|
g ? "transitioning" : null
|
|
1470
1470
|
].filter(Boolean).join(" ");
|
|
1471
|
-
let
|
|
1472
|
-
return /* @__PURE__ */
|
|
1471
|
+
let M = typeof i == "function" ? i($) : i;
|
|
1472
|
+
return /* @__PURE__ */ o.createElement(
|
|
1473
1473
|
Te,
|
|
1474
1474
|
{
|
|
1475
1475
|
...s,
|
|
1476
1476
|
"aria-current": P,
|
|
1477
1477
|
className: S,
|
|
1478
1478
|
ref: h,
|
|
1479
|
-
style:
|
|
1479
|
+
style: M,
|
|
1480
1480
|
to: c,
|
|
1481
1481
|
viewTransition: u
|
|
1482
1482
|
},
|
|
@@ -1485,14 +1485,14 @@ var Bt = i.forwardRef(
|
|
|
1485
1485
|
}
|
|
1486
1486
|
);
|
|
1487
1487
|
Bt.displayName = "NavLink";
|
|
1488
|
-
var Ht =
|
|
1488
|
+
var Ht = o.forwardRef(
|
|
1489
1489
|
({
|
|
1490
1490
|
discover: e = "render",
|
|
1491
1491
|
fetcherKey: t,
|
|
1492
1492
|
navigate: n,
|
|
1493
1493
|
reloadDocument: a,
|
|
1494
1494
|
replace: r,
|
|
1495
|
-
state:
|
|
1495
|
+
state: i,
|
|
1496
1496
|
method: c = V,
|
|
1497
1497
|
action: u,
|
|
1498
1498
|
onSubmit: l,
|
|
@@ -1504,19 +1504,19 @@ var Ht = i.forwardRef(
|
|
|
1504
1504
|
let f = Yt(), E = Jt(u, { relative: s }), g = c.toLowerCase() === "get" ? "get" : "post", v = typeof u == "string" && $e.test(u), y = (w) => {
|
|
1505
1505
|
if (l && l(w), w.defaultPrevented) return;
|
|
1506
1506
|
w.preventDefault();
|
|
1507
|
-
let
|
|
1508
|
-
f(
|
|
1507
|
+
let b = w.nativeEvent.submitter, x = (b == null ? void 0 : b.getAttribute("formmethod")) || c;
|
|
1508
|
+
f(b || w.currentTarget, {
|
|
1509
1509
|
fetcherKey: t,
|
|
1510
1510
|
method: x,
|
|
1511
1511
|
navigate: n,
|
|
1512
1512
|
replace: r,
|
|
1513
|
-
state:
|
|
1513
|
+
state: i,
|
|
1514
1514
|
relative: s,
|
|
1515
1515
|
preventScrollReset: h,
|
|
1516
1516
|
viewTransition: p
|
|
1517
1517
|
});
|
|
1518
1518
|
};
|
|
1519
|
-
return /* @__PURE__ */
|
|
1519
|
+
return /* @__PURE__ */ o.createElement(
|
|
1520
1520
|
"form",
|
|
1521
1521
|
{
|
|
1522
1522
|
ref: m,
|
|
@@ -1534,19 +1534,19 @@ function Wt(e) {
|
|
|
1534
1534
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1535
1535
|
}
|
|
1536
1536
|
function Ne(e) {
|
|
1537
|
-
let t =
|
|
1538
|
-
return
|
|
1537
|
+
let t = o.useContext(I);
|
|
1538
|
+
return R(t, Wt(e)), t;
|
|
1539
1539
|
}
|
|
1540
1540
|
function zt(e, {
|
|
1541
1541
|
target: t,
|
|
1542
1542
|
replace: n,
|
|
1543
1543
|
state: a,
|
|
1544
1544
|
preventScrollReset: r,
|
|
1545
|
-
relative:
|
|
1545
|
+
relative: i,
|
|
1546
1546
|
viewTransition: c
|
|
1547
1547
|
} = {}) {
|
|
1548
|
-
let u = re(), l = N(), s = W(e, { relative:
|
|
1549
|
-
return
|
|
1548
|
+
let u = re(), l = N(), s = W(e, { relative: i });
|
|
1549
|
+
return o.useCallback(
|
|
1550
1550
|
(h) => {
|
|
1551
1551
|
if (Et(h, t)) {
|
|
1552
1552
|
h.preventDefault();
|
|
@@ -1555,7 +1555,7 @@ function zt(e, {
|
|
|
1555
1555
|
replace: p,
|
|
1556
1556
|
state: a,
|
|
1557
1557
|
preventScrollReset: r,
|
|
1558
|
-
relative:
|
|
1558
|
+
relative: i,
|
|
1559
1559
|
viewTransition: c
|
|
1560
1560
|
});
|
|
1561
1561
|
}
|
|
@@ -1569,7 +1569,7 @@ function zt(e, {
|
|
|
1569
1569
|
t,
|
|
1570
1570
|
e,
|
|
1571
1571
|
r,
|
|
1572
|
-
|
|
1572
|
+
i,
|
|
1573
1573
|
c
|
|
1574
1574
|
]
|
|
1575
1575
|
);
|
|
@@ -1579,7 +1579,7 @@ function dn(e) {
|
|
|
1579
1579
|
typeof URLSearchParams < "u",
|
|
1580
1580
|
"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params."
|
|
1581
1581
|
);
|
|
1582
|
-
let t =
|
|
1582
|
+
let t = o.useRef(Q(e)), n = o.useRef(!1), a = N(), r = o.useMemo(
|
|
1583
1583
|
() => (
|
|
1584
1584
|
// Only merge in the defaults if we haven't yet called setSearchParams.
|
|
1585
1585
|
// Once we call that we want those to take precedence, otherwise you can't
|
|
@@ -1590,14 +1590,14 @@ function dn(e) {
|
|
|
1590
1590
|
)
|
|
1591
1591
|
),
|
|
1592
1592
|
[a.search]
|
|
1593
|
-
),
|
|
1593
|
+
), i = re(), c = o.useCallback(
|
|
1594
1594
|
(u, l) => {
|
|
1595
1595
|
const s = Q(
|
|
1596
1596
|
typeof u == "function" ? u(r) : u
|
|
1597
1597
|
);
|
|
1598
|
-
n.current = !0,
|
|
1598
|
+
n.current = !0, i("?" + s, l);
|
|
1599
1599
|
},
|
|
1600
|
-
[
|
|
1600
|
+
[i, r]
|
|
1601
1601
|
);
|
|
1602
1602
|
return [r, c];
|
|
1603
1603
|
}
|
|
@@ -1606,16 +1606,16 @@ function Yt() {
|
|
|
1606
1606
|
let { router: e } = Ne(
|
|
1607
1607
|
"useSubmit"
|
|
1608
1608
|
/* UseSubmit */
|
|
1609
|
-
), { basename: t } =
|
|
1610
|
-
return
|
|
1609
|
+
), { basename: t } = o.useContext(T), n = ct();
|
|
1610
|
+
return o.useCallback(
|
|
1611
1611
|
async (a, r = {}) => {
|
|
1612
|
-
let { action:
|
|
1612
|
+
let { action: i, method: c, encType: u, formData: l, body: s } = Ct(
|
|
1613
1613
|
a,
|
|
1614
1614
|
t
|
|
1615
1615
|
);
|
|
1616
1616
|
if (r.navigate === !1) {
|
|
1617
1617
|
let h = r.fetcherKey || jt();
|
|
1618
|
-
await e.fetch(h, n, r.action ||
|
|
1618
|
+
await e.fetch(h, n, r.action || i, {
|
|
1619
1619
|
preventScrollReset: r.preventScrollReset,
|
|
1620
1620
|
formData: l,
|
|
1621
1621
|
body: s,
|
|
@@ -1624,7 +1624,7 @@ function Yt() {
|
|
|
1624
1624
|
flushSync: r.flushSync
|
|
1625
1625
|
});
|
|
1626
1626
|
} else
|
|
1627
|
-
await e.navigate(r.action ||
|
|
1627
|
+
await e.navigate(r.action || i, {
|
|
1628
1628
|
preventScrollReset: r.preventScrollReset,
|
|
1629
1629
|
formData: l,
|
|
1630
1630
|
body: s,
|
|
@@ -1641,23 +1641,23 @@ function Yt() {
|
|
|
1641
1641
|
);
|
|
1642
1642
|
}
|
|
1643
1643
|
function Jt(e, { relative: t } = {}) {
|
|
1644
|
-
let { basename: n } =
|
|
1645
|
-
|
|
1646
|
-
let [r] = a.matches.slice(-1),
|
|
1644
|
+
let { basename: n } = o.useContext(T), a = o.useContext(k);
|
|
1645
|
+
R(a, "useFormAction must be used inside a RouteContext");
|
|
1646
|
+
let [r] = a.matches.slice(-1), i = { ...W(e || ".", { relative: t }) }, c = N();
|
|
1647
1647
|
if (e == null) {
|
|
1648
|
-
|
|
1649
|
-
let u = new URLSearchParams(
|
|
1648
|
+
i.search = c.search;
|
|
1649
|
+
let u = new URLSearchParams(i.search), l = u.getAll("index");
|
|
1650
1650
|
if (l.some((h) => h === "")) {
|
|
1651
1651
|
u.delete("index"), l.filter((p) => p).forEach((p) => u.append("index", p));
|
|
1652
1652
|
let h = u.toString();
|
|
1653
|
-
|
|
1653
|
+
i.search = h ? `?${h}` : "";
|
|
1654
1654
|
}
|
|
1655
1655
|
}
|
|
1656
|
-
return (!e || e === ".") && r.route.index && (
|
|
1656
|
+
return (!e || e === ".") && r.route.index && (i.search = i.search ? i.search.replace(/^\?/, "?index&") : "?index"), n !== "/" && (i.pathname = i.pathname === "/" ? n : A([n, i.pathname])), B(i);
|
|
1657
1657
|
}
|
|
1658
1658
|
function Kt(e, t = {}) {
|
|
1659
|
-
let n =
|
|
1660
|
-
|
|
1659
|
+
let n = o.useContext(J);
|
|
1660
|
+
R(
|
|
1661
1661
|
n != null,
|
|
1662
1662
|
"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
|
|
1663
1663
|
);
|
|
@@ -1667,8 +1667,8 @@ function Kt(e, t = {}) {
|
|
|
1667
1667
|
), r = W(e, { relative: t.relative });
|
|
1668
1668
|
if (!n.isTransitioning)
|
|
1669
1669
|
return !1;
|
|
1670
|
-
let
|
|
1671
|
-
return H(r.pathname, c) != null || H(r.pathname,
|
|
1670
|
+
let i = D(n.currentLocation.pathname, a) || n.currentLocation.pathname, c = D(n.nextLocation.pathname, a) || n.nextLocation.pathname;
|
|
1671
|
+
return H(r.pathname, c) != null || H(r.pathname, i) != null;
|
|
1672
1672
|
}
|
|
1673
1673
|
function hn({
|
|
1674
1674
|
context: e,
|
|
@@ -1676,7 +1676,7 @@ function hn({
|
|
|
1676
1676
|
hydrate: n = !0,
|
|
1677
1677
|
nonce: a
|
|
1678
1678
|
}) {
|
|
1679
|
-
|
|
1679
|
+
R(
|
|
1680
1680
|
t && e,
|
|
1681
1681
|
"You must provide `router` and `context` to <StaticRouterProvider>"
|
|
1682
1682
|
);
|
|
@@ -1686,7 +1686,7 @@ function hn({
|
|
|
1686
1686
|
static: !0,
|
|
1687
1687
|
staticContext: e,
|
|
1688
1688
|
basename: e.basename || "/"
|
|
1689
|
-
},
|
|
1689
|
+
}, i = /* @__PURE__ */ new Map(), c = "";
|
|
1690
1690
|
if (n !== !1) {
|
|
1691
1691
|
let l = {
|
|
1692
1692
|
loaderData: e.loaderData,
|
|
@@ -1696,7 +1696,7 @@ function hn({
|
|
|
1696
1696
|
c = `window.__staticRouterHydrationData = JSON.parse(${rn(JSON.stringify(JSON.stringify(l)))});`;
|
|
1697
1697
|
}
|
|
1698
1698
|
let { state: u } = r.router;
|
|
1699
|
-
return /* @__PURE__ */
|
|
1699
|
+
return /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(I.Provider, { value: r }, /* @__PURE__ */ o.createElement(F.Provider, { value: u }, /* @__PURE__ */ o.createElement(te.Provider, { value: i }, /* @__PURE__ */ o.createElement(J.Provider, { value: { isTransitioning: !1 } }, /* @__PURE__ */ o.createElement(
|
|
1700
1700
|
Se,
|
|
1701
1701
|
{
|
|
1702
1702
|
basename: r.basename,
|
|
@@ -1705,7 +1705,7 @@ function hn({
|
|
|
1705
1705
|
navigator: r.navigator,
|
|
1706
1706
|
static: r.static
|
|
1707
1707
|
},
|
|
1708
|
-
/* @__PURE__ */
|
|
1708
|
+
/* @__PURE__ */ o.createElement(
|
|
1709
1709
|
qt,
|
|
1710
1710
|
{
|
|
1711
1711
|
routes: t.routes,
|
|
@@ -1713,7 +1713,7 @@ function hn({
|
|
|
1713
1713
|
state: u
|
|
1714
1714
|
}
|
|
1715
1715
|
)
|
|
1716
|
-
))))), c ? /* @__PURE__ */
|
|
1716
|
+
))))), c ? /* @__PURE__ */ o.createElement(
|
|
1717
1717
|
"script",
|
|
1718
1718
|
{
|
|
1719
1719
|
suppressHydrationWarning: !0,
|
|
@@ -1727,7 +1727,7 @@ function qt({
|
|
|
1727
1727
|
future: t,
|
|
1728
1728
|
state: n
|
|
1729
1729
|
}) {
|
|
1730
|
-
return
|
|
1730
|
+
return Re(e, void 0, n, t);
|
|
1731
1731
|
}
|
|
1732
1732
|
function Gt(e) {
|
|
1733
1733
|
if (!e) return null;
|
|
@@ -1811,11 +1811,11 @@ export {
|
|
|
1811
1811
|
on as d,
|
|
1812
1812
|
Ze as e,
|
|
1813
1813
|
ft as f,
|
|
1814
|
-
|
|
1815
|
-
|
|
1814
|
+
sn as g,
|
|
1815
|
+
Bt as h,
|
|
1816
1816
|
we as i,
|
|
1817
1817
|
H as m,
|
|
1818
1818
|
an as r,
|
|
1819
1819
|
N as u
|
|
1820
1820
|
};
|
|
1821
|
-
//# sourceMappingURL=chunk-
|
|
1821
|
+
//# sourceMappingURL=chunk-HA7DTUK3-ZGg2W6yV.js.map
|