@burdenoff/microfe-devportal 2026.728.2 → 2026.801.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/dist/__tests__/utils/renderWithProviders.d.ts +1 -1
- package/dist/__tests__/utils/renderWithProviders.d.ts.map +1 -1
- package/dist/devportal/AdminDevportalRoutes.js +14 -14
- package/dist/devportal/AdminDevportalRoutes.js.map +1 -1
- package/dist/devportal/DevportalRoutes.js +115 -115
- package/dist/devportal/DevportalRoutes.js.map +1 -1
- package/dist/devportal/components/SectionNav.js +0 -1
- package/dist/devportal/components/SectionNav.js.map +1 -1
- package/dist/devportal/components/TelemetryErrorBoundary.js +7 -7
- package/dist/devportal/components/TelemetryErrorBoundary.js.map +1 -1
- package/dist/devportal/pages/AnalyticsDashboardPage.js +41 -41
- package/dist/devportal/pages/AnalyticsDashboardPage.js.map +1 -1
- package/dist/devportal/pages/AppLogsPage.js +27 -27
- package/dist/devportal/pages/AppLogsPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationDetailPage.js +929 -929
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationVersionsPage.js +39 -39
- package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
- package/dist/devportal/pages/CreateWebhookPage.js +55 -55
- package/dist/devportal/pages/CreateWebhookPage.js.map +1 -1
- package/dist/devportal/pages/EditApplicationPage.js +36 -36
- package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
- package/dist/devportal/pages/EditPhysicalItemPage.js +40 -40
- package/dist/devportal/pages/EditPhysicalItemPage.js.map +1 -1
- package/dist/devportal/pages/InvitationDecisionPage.js +25 -25
- package/dist/devportal/pages/InvitationDecisionPage.js.map +1 -1
- package/dist/devportal/pages/ListingPreviewPage.js +36 -36
- package/dist/devportal/pages/ListingPreviewPage.js.map +1 -1
- package/dist/devportal/pages/OAuthCallbackPage.js +10 -10
- package/dist/devportal/pages/OAuthCallbackPage.js.map +1 -1
- package/dist/devportal/pages/OAuthClientDetailPage.js +27 -27
- package/dist/devportal/pages/OAuthClientDetailPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationDetailPage.js +329 -329
- package/dist/devportal/pages/OrganizationDetailPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationMembersPage.js +181 -181
- package/dist/devportal/pages/OrganizationMembersPage.js.map +1 -1
- package/dist/devportal/pages/PublishPage.js +43 -43
- package/dist/devportal/pages/PublishPage.js.map +1 -1
- package/dist/devportal/pages/RevenueDashboardPage.js +65 -65
- package/dist/devportal/pages/RevenueDashboardPage.js.map +1 -1
- package/dist/devportal/pages/StoreSubmissionPage.js +126 -126
- package/dist/devportal/pages/StoreSubmissionPage.js.map +1 -1
- package/dist/devportal/pages/WebhookDetailPage.js +28 -28
- package/dist/devportal/pages/WebhookDetailPage.js.map +1 -1
- package/dist/devportal/pages/WebhooksPage.js +47 -47
- package/dist/devportal/pages/WebhooksPage.js.map +1 -1
- package/dist/devportal/providers/DevportalProvider.js +12 -12
- package/dist/devportal/providers/DevportalProvider.js.map +1 -1
- package/dist/node_modules/react-router/dist/production/lib/components.js +124 -0
- package/dist/node_modules/react-router/dist/production/lib/components.js.map +1 -0
- package/dist/node_modules/react-router/dist/production/lib/context.js +32 -0
- package/dist/node_modules/react-router/dist/production/lib/context.js.map +1 -0
- package/dist/node_modules/react-router/dist/production/lib/dom/dom.js +83 -0
- package/dist/node_modules/react-router/dist/production/lib/dom/dom.js.map +1 -0
- package/dist/node_modules/react-router/dist/production/lib/dom/lib.js +358 -0
- package/dist/node_modules/react-router/dist/production/lib/dom/lib.js.map +1 -0
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/components.js +188 -0
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/components.js.map +1 -0
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/invariant.js +8 -0
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/invariant.js.map +1 -0
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/links.js +75 -0
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/links.js.map +1 -0
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/markup.js +15 -0
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/markup.js.map +1 -0
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/routeModules.js +18 -0
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/routeModules.js.map +1 -0
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/single-fetch.js +10 -0
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/single-fetch.js.map +1 -0
- package/dist/node_modules/react-router/dist/production/lib/errors.js +19 -0
- package/dist/node_modules/react-router/dist/production/lib/errors.js.map +1 -0
- package/dist/node_modules/react-router/dist/production/lib/hooks.js +296 -0
- package/dist/node_modules/react-router/dist/production/lib/hooks.js.map +1 -0
- package/dist/node_modules/react-router/dist/production/lib/router/history.js +166 -0
- package/dist/node_modules/react-router/dist/production/lib/router/history.js.map +1 -0
- package/dist/node_modules/react-router/dist/production/lib/router/router.js +33 -0
- package/dist/node_modules/react-router/dist/production/lib/router/router.js.map +1 -0
- package/dist/node_modules/react-router/dist/production/lib/router/url.js +9 -0
- package/dist/node_modules/react-router/dist/production/lib/router/url.js.map +1 -0
- package/dist/node_modules/react-router/dist/production/lib/router/utils.js +236 -0
- package/dist/node_modules/react-router/dist/production/lib/router/utils.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import { ABSOLUTE_URL_REGEX as e } from "../router/url.js";
|
|
2
|
+
import { createBrowserHistory as t, createPath as n, invariant as r, warning as i } from "../router/history.js";
|
|
3
|
+
import { joinPaths as a, matchPath as o, parseToInfo as s, resolveTo as c, stripBasename as l } from "../router/utils.js";
|
|
4
|
+
import { DataRouterContext as u, DataRouterStateContext as d, NavigationContext as f, RouteContext as p, ViewTransitionContext as m } from "../context.js";
|
|
5
|
+
import { useHref as h, useLocation as g, useMatches as _, useNavigate as v, useNavigation as y, useResolvedPath as b, useRouteId as x } from "../hooks.js";
|
|
6
|
+
import { Router as S } from "../components.js";
|
|
7
|
+
import { createSearchParams as C, getFormSubmissionInfo as w, getSearchParamsForLocation as T, shouldProcessLinkClick as E } from "./dom.js";
|
|
8
|
+
import { escapeHtml as D } from "./ssr/markup.js";
|
|
9
|
+
import { FrameworkContext as O, PrefetchPageLinks as k, mergeRefs as A, usePrefetchBehavior as j } from "./ssr/components.js";
|
|
10
|
+
import * as M from "react";
|
|
11
|
+
//#region node_modules/react-router/dist/production/lib/dom/lib.js
|
|
12
|
+
var N = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
|
|
13
|
+
try {
|
|
14
|
+
N && (window.__reactRouterVersion = "8.3.0");
|
|
15
|
+
} catch {}
|
|
16
|
+
function P({ basename: e, children: n, useTransitions: r, window: i }) {
|
|
17
|
+
let a = M.useRef(null);
|
|
18
|
+
a.current ??= t({
|
|
19
|
+
window: i,
|
|
20
|
+
v5Compat: !0
|
|
21
|
+
});
|
|
22
|
+
let o = a.current, [s, c] = M.useState({
|
|
23
|
+
action: o.action,
|
|
24
|
+
location: o.location
|
|
25
|
+
}), l = M.useCallback((e) => {
|
|
26
|
+
r === !1 ? c(e) : M.startTransition(() => c(e));
|
|
27
|
+
}, [r]);
|
|
28
|
+
return M.useLayoutEffect(() => o.listen(l), [o, l]), /* @__PURE__ */ M.createElement(S, {
|
|
29
|
+
basename: e,
|
|
30
|
+
children: n,
|
|
31
|
+
location: s.location,
|
|
32
|
+
navigationType: s.action,
|
|
33
|
+
navigator: o,
|
|
34
|
+
useTransitions: r
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function F({ basename: e, children: t, history: n, useTransitions: r }) {
|
|
38
|
+
let [i, a] = M.useState({
|
|
39
|
+
action: n.action,
|
|
40
|
+
location: n.location
|
|
41
|
+
}), o = M.useCallback((e) => {
|
|
42
|
+
r === !1 ? a(e) : M.startTransition(() => a(e));
|
|
43
|
+
}, [r]);
|
|
44
|
+
return M.useLayoutEffect(() => n.listen(o), [n, o]), /* @__PURE__ */ M.createElement(S, {
|
|
45
|
+
basename: e,
|
|
46
|
+
children: t,
|
|
47
|
+
location: i.location,
|
|
48
|
+
navigationType: i.action,
|
|
49
|
+
navigator: n,
|
|
50
|
+
useTransitions: r
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
F.displayName = "unstable_HistoryRouter";
|
|
54
|
+
var I = M.forwardRef(function({ onClick: t, discover: n = "render", prefetch: r = "none", relative: i, reloadDocument: o, replace: l, mask: u, state: d, target: p, to: m, preventScrollReset: _, viewTransition: v, defaultShouldRevalidate: y, ...b }, x) {
|
|
55
|
+
let { basename: S, navigator: C, useTransitions: w } = M.useContext(f), T = typeof m == "string" && e.test(m), E = s(m, S);
|
|
56
|
+
m = E.to;
|
|
57
|
+
let D = h(m, { relative: i }), O = g(), N = null;
|
|
58
|
+
if (u) {
|
|
59
|
+
let e = c(u, [], O.mask ? O.mask.pathname : "/", !0);
|
|
60
|
+
S !== "/" && (e.pathname = e.pathname === "/" ? S : a([S, e.pathname])), N = C.createHref(e);
|
|
61
|
+
}
|
|
62
|
+
let [P, F, I] = j(r, b), L = U(m, {
|
|
63
|
+
replace: l,
|
|
64
|
+
mask: u,
|
|
65
|
+
state: d,
|
|
66
|
+
target: p,
|
|
67
|
+
preventScrollReset: _,
|
|
68
|
+
relative: i,
|
|
69
|
+
viewTransition: v,
|
|
70
|
+
defaultShouldRevalidate: y,
|
|
71
|
+
useTransitions: w
|
|
72
|
+
});
|
|
73
|
+
function R(e) {
|
|
74
|
+
t && t(e), e.defaultPrevented || L(e);
|
|
75
|
+
}
|
|
76
|
+
let z = !(E.isExternal || o), B = /* @__PURE__ */ M.createElement("a", {
|
|
77
|
+
...b,
|
|
78
|
+
...I,
|
|
79
|
+
href: (z ? N : void 0) || E.absoluteURL || D,
|
|
80
|
+
onClick: z ? R : t,
|
|
81
|
+
ref: A(x, F),
|
|
82
|
+
target: p,
|
|
83
|
+
"data-discover": !T && n === "render" ? "true" : void 0
|
|
84
|
+
});
|
|
85
|
+
return P && !T ? /* @__PURE__ */ M.createElement(M.Fragment, null, B, /* @__PURE__ */ M.createElement(k, { page: D })) : B;
|
|
86
|
+
});
|
|
87
|
+
I.displayName = "Link";
|
|
88
|
+
var L = M.forwardRef(function({ "aria-current": e = "page", caseSensitive: t = !1, className: n = "", end: r = !1, style: i, to: a, viewTransition: o, children: s, ...c }, u) {
|
|
89
|
+
let p = b(a, { relative: c.relative }), m = g(), h = M.useContext(d), { navigator: _, basename: v } = M.useContext(f), y = h != null && ee(p) && o === !0, x = _.encodeLocation ? _.encodeLocation(p).pathname : p.pathname, S = m.pathname, C = h && h.navigation && h.navigation.location ? h.navigation.location.pathname : null;
|
|
90
|
+
t || (S = S.toLowerCase(), C = C ? C.toLowerCase() : null, x = x.toLowerCase()), C && v && (C = l(C, v) || C);
|
|
91
|
+
let w = x !== "/" && x.endsWith("/") ? x.length - 1 : x.length, T = S === x || !r && S.startsWith(x) && S.charAt(w) === "/", E = C != null && (C === x || !r && C.startsWith(x) && C.charAt(w) === "/"), D = {
|
|
92
|
+
isActive: T,
|
|
93
|
+
isPending: E,
|
|
94
|
+
isTransitioning: y
|
|
95
|
+
}, O = T ? e : void 0, k;
|
|
96
|
+
k = typeof n == "function" ? n(D) : [
|
|
97
|
+
n,
|
|
98
|
+
T ? "active" : null,
|
|
99
|
+
E ? "pending" : null,
|
|
100
|
+
y ? "transitioning" : null
|
|
101
|
+
].filter(Boolean).join(" ");
|
|
102
|
+
let A = typeof i == "function" ? i(D) : i;
|
|
103
|
+
return /* @__PURE__ */ M.createElement(I, {
|
|
104
|
+
...c,
|
|
105
|
+
"aria-current": O,
|
|
106
|
+
className: k,
|
|
107
|
+
ref: u,
|
|
108
|
+
style: A,
|
|
109
|
+
to: a,
|
|
110
|
+
viewTransition: o
|
|
111
|
+
}, typeof s == "function" ? s(D) : s);
|
|
112
|
+
});
|
|
113
|
+
L.displayName = "NavLink";
|
|
114
|
+
var R = M.forwardRef(({ discover: t = "render", fetcherKey: n, navigate: r, reloadDocument: i, replace: a, state: o, method: s = "get", action: c, onSubmit: l, relative: u, preventScrollReset: d, viewTransition: p, defaultShouldRevalidate: m, ...h }, g) => {
|
|
115
|
+
let { useTransitions: _ } = M.useContext(f), v = q(), y = J(c, { relative: u }), b = s.toLowerCase() === "get" ? "get" : "post", x = typeof c == "string" && e.test(c);
|
|
116
|
+
return /* @__PURE__ */ M.createElement("form", {
|
|
117
|
+
ref: g,
|
|
118
|
+
method: b,
|
|
119
|
+
action: y,
|
|
120
|
+
onSubmit: i ? l : (e) => {
|
|
121
|
+
if (l && l(e), e.defaultPrevented) return;
|
|
122
|
+
e.preventDefault();
|
|
123
|
+
let t = e.nativeEvent.submitter, i = t?.getAttribute("formmethod") || s, c = () => v(t || e.currentTarget, {
|
|
124
|
+
fetcherKey: n,
|
|
125
|
+
method: i,
|
|
126
|
+
navigate: r,
|
|
127
|
+
replace: a,
|
|
128
|
+
state: o,
|
|
129
|
+
relative: u,
|
|
130
|
+
preventScrollReset: d,
|
|
131
|
+
viewTransition: p,
|
|
132
|
+
defaultShouldRevalidate: m
|
|
133
|
+
});
|
|
134
|
+
_ && r !== !1 ? M.startTransition(() => c()) : c();
|
|
135
|
+
},
|
|
136
|
+
...h,
|
|
137
|
+
"data-discover": !x && t === "render" ? "true" : void 0
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
R.displayName = "Form";
|
|
141
|
+
function z({ getKey: e, storageKey: t, ...n }) {
|
|
142
|
+
let r = M.useContext(O), { basename: i } = M.useContext(f), a = g(), o = _();
|
|
143
|
+
Q({
|
|
144
|
+
getKey: e,
|
|
145
|
+
storageKey: t
|
|
146
|
+
});
|
|
147
|
+
let s = M.useMemo(() => {
|
|
148
|
+
if (!r || !e) return null;
|
|
149
|
+
let t = Z(a, o, i, e);
|
|
150
|
+
return t === a.key ? null : t;
|
|
151
|
+
}, []);
|
|
152
|
+
if (!r || r.isSpaMode) return null;
|
|
153
|
+
let c = ((e, t) => {
|
|
154
|
+
if (!window.history.state || !window.history.state.key) {
|
|
155
|
+
let e = Math.random().toString(32).slice(2);
|
|
156
|
+
window.history.replaceState({ key: e }, "");
|
|
157
|
+
}
|
|
158
|
+
try {
|
|
159
|
+
let n = JSON.parse(sessionStorage.getItem(e) || "{}")[t || window.history.state.key];
|
|
160
|
+
typeof n == "number" && window.scrollTo(0, n);
|
|
161
|
+
} catch (t) {
|
|
162
|
+
console.error(t), sessionStorage.removeItem(e);
|
|
163
|
+
}
|
|
164
|
+
}).toString();
|
|
165
|
+
return n.nonce == null && r?.nonce && (n.nonce = r.nonce), /* @__PURE__ */ M.createElement("script", {
|
|
166
|
+
...n,
|
|
167
|
+
suppressHydrationWarning: !0,
|
|
168
|
+
dangerouslySetInnerHTML: { __html: `(${c})(${D(JSON.stringify(t || Y))}, ${D(JSON.stringify(s))})` }
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
z.displayName = "ScrollRestoration";
|
|
172
|
+
function B(e) {
|
|
173
|
+
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
174
|
+
}
|
|
175
|
+
function V(e) {
|
|
176
|
+
let t = M.useContext(u);
|
|
177
|
+
return r(t, B(e)), t;
|
|
178
|
+
}
|
|
179
|
+
function H(e) {
|
|
180
|
+
let t = M.useContext(d);
|
|
181
|
+
return r(t, B(e)), t;
|
|
182
|
+
}
|
|
183
|
+
function U(e, { target: t, replace: r, mask: i, state: a, preventScrollReset: o, relative: s, viewTransition: c, defaultShouldRevalidate: l, useTransitions: u } = {}) {
|
|
184
|
+
let d = v(), f = g(), p = b(e, { relative: s });
|
|
185
|
+
return M.useCallback((m) => {
|
|
186
|
+
if (E(m, t)) {
|
|
187
|
+
m.preventDefault();
|
|
188
|
+
let t = r === void 0 ? n(f) === n(p) : r, h = () => d(e, {
|
|
189
|
+
replace: t,
|
|
190
|
+
mask: i,
|
|
191
|
+
state: a,
|
|
192
|
+
preventScrollReset: o,
|
|
193
|
+
relative: s,
|
|
194
|
+
viewTransition: c,
|
|
195
|
+
defaultShouldRevalidate: l
|
|
196
|
+
});
|
|
197
|
+
u ? M.startTransition(() => h()) : h();
|
|
198
|
+
}
|
|
199
|
+
}, [
|
|
200
|
+
f,
|
|
201
|
+
d,
|
|
202
|
+
p,
|
|
203
|
+
r,
|
|
204
|
+
i,
|
|
205
|
+
a,
|
|
206
|
+
t,
|
|
207
|
+
e,
|
|
208
|
+
o,
|
|
209
|
+
s,
|
|
210
|
+
c,
|
|
211
|
+
l,
|
|
212
|
+
u
|
|
213
|
+
]);
|
|
214
|
+
}
|
|
215
|
+
function W(e) {
|
|
216
|
+
i(typeof URLSearchParams < "u", "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.");
|
|
217
|
+
let t = M.useRef(C(e)), n = M.useRef(!1), r = g(), a = M.useMemo(() => T(r.search, n.current ? null : t.current), [r.search]), o = v();
|
|
218
|
+
return [a, M.useCallback((e, t) => {
|
|
219
|
+
let r = C(typeof e == "function" ? e(new URLSearchParams(a)) : e);
|
|
220
|
+
n.current = !0, o("?" + r, t);
|
|
221
|
+
}, [o, a])];
|
|
222
|
+
}
|
|
223
|
+
var G = 0, K = () => `__${String(++G)}__`;
|
|
224
|
+
function q() {
|
|
225
|
+
let { router: e } = V("useSubmit"), { basename: t } = M.useContext(f), n = x(), r = e.fetch, i = e.navigate;
|
|
226
|
+
return M.useCallback(async (e, a = {}) => {
|
|
227
|
+
let { action: o, method: s, encType: c, formData: l, body: u } = w(e, t);
|
|
228
|
+
a.navigate === !1 ? await r(a.fetcherKey || K(), n, a.action || o, {
|
|
229
|
+
defaultShouldRevalidate: a.defaultShouldRevalidate,
|
|
230
|
+
preventScrollReset: a.preventScrollReset,
|
|
231
|
+
formData: l,
|
|
232
|
+
body: u,
|
|
233
|
+
formMethod: a.method || s,
|
|
234
|
+
formEncType: a.encType || c,
|
|
235
|
+
flushSync: a.flushSync
|
|
236
|
+
}) : await i(a.action || o, {
|
|
237
|
+
defaultShouldRevalidate: a.defaultShouldRevalidate,
|
|
238
|
+
preventScrollReset: a.preventScrollReset,
|
|
239
|
+
formData: l,
|
|
240
|
+
body: u,
|
|
241
|
+
formMethod: a.method || s,
|
|
242
|
+
formEncType: a.encType || c,
|
|
243
|
+
replace: a.replace,
|
|
244
|
+
state: a.state,
|
|
245
|
+
fromRouteId: n,
|
|
246
|
+
flushSync: a.flushSync,
|
|
247
|
+
viewTransition: a.viewTransition
|
|
248
|
+
});
|
|
249
|
+
}, [
|
|
250
|
+
r,
|
|
251
|
+
i,
|
|
252
|
+
t,
|
|
253
|
+
n
|
|
254
|
+
]);
|
|
255
|
+
}
|
|
256
|
+
function J(e, { relative: t } = {}) {
|
|
257
|
+
let { basename: i } = M.useContext(f), o = M.useContext(p);
|
|
258
|
+
r(o, "useFormAction must be used inside a RouteContext");
|
|
259
|
+
let [s] = o.matches.slice(-1), c = { ...b(e || ".", { relative: t }) }, l = g();
|
|
260
|
+
if (e == null) {
|
|
261
|
+
c.search = l.search;
|
|
262
|
+
let e = new URLSearchParams(c.search), t = e.getAll("index");
|
|
263
|
+
if (t.some((e) => e === "")) {
|
|
264
|
+
e.delete("index"), t.filter((e) => e).forEach((t) => e.append("index", t));
|
|
265
|
+
let n = e.toString();
|
|
266
|
+
c.search = n ? `?${n}` : "";
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
return (!e || e === ".") && s.route.index && (c.search = c.search ? c.search.replace(/^\?/, "?index&") : "?index"), i !== "/" && (c.pathname = c.pathname === "/" ? i : a([i, c.pathname])), n(c);
|
|
270
|
+
}
|
|
271
|
+
var Y = "react-router-scroll-positions", X = {};
|
|
272
|
+
function Z(e, t, n, r) {
|
|
273
|
+
let i = null;
|
|
274
|
+
return r && (i = r(n === "/" ? e : {
|
|
275
|
+
...e,
|
|
276
|
+
pathname: l(e.pathname, n) || e.pathname
|
|
277
|
+
}, t)), i ??= e.key, i;
|
|
278
|
+
}
|
|
279
|
+
function Q({ getKey: e, storageKey: t } = {}) {
|
|
280
|
+
let { router: n } = V("useScrollRestoration"), { restoreScrollPosition: r, preventScrollReset: a } = H("useScrollRestoration"), { basename: o } = M.useContext(f), s = g(), c = _(), l = y();
|
|
281
|
+
M.useEffect(() => (window.history.scrollRestoration = "manual", () => {
|
|
282
|
+
window.history.scrollRestoration = "auto";
|
|
283
|
+
}), []), $(M.useCallback(() => {
|
|
284
|
+
if (l.state === "idle") {
|
|
285
|
+
let t = Z(s, c, o, e);
|
|
286
|
+
X[t] = window.scrollY;
|
|
287
|
+
}
|
|
288
|
+
try {
|
|
289
|
+
sessionStorage.setItem(t || Y, JSON.stringify(X));
|
|
290
|
+
} catch (e) {
|
|
291
|
+
i(!1, `Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`);
|
|
292
|
+
}
|
|
293
|
+
window.history.scrollRestoration = "auto";
|
|
294
|
+
}, [
|
|
295
|
+
l.state,
|
|
296
|
+
e,
|
|
297
|
+
o,
|
|
298
|
+
s,
|
|
299
|
+
c,
|
|
300
|
+
t
|
|
301
|
+
])), typeof document < "u" && (M.useLayoutEffect(() => {
|
|
302
|
+
try {
|
|
303
|
+
let e = sessionStorage.getItem(t || Y);
|
|
304
|
+
e && (X = JSON.parse(e));
|
|
305
|
+
} catch {}
|
|
306
|
+
}, [t]), M.useLayoutEffect(() => {
|
|
307
|
+
let t = n?.enableScrollRestoration(X, () => window.scrollY, e ? (t, n) => Z(t, n, o, e) : void 0);
|
|
308
|
+
return () => t && t();
|
|
309
|
+
}, [
|
|
310
|
+
n,
|
|
311
|
+
o,
|
|
312
|
+
e
|
|
313
|
+
]), M.useLayoutEffect(() => {
|
|
314
|
+
if (r !== !1) {
|
|
315
|
+
if (typeof r == "number") {
|
|
316
|
+
window.scrollTo(0, r);
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
try {
|
|
320
|
+
if (s.hash) {
|
|
321
|
+
let e = document.getElementById(decodeURIComponent(s.hash.slice(1)));
|
|
322
|
+
if (e) {
|
|
323
|
+
e.scrollIntoView();
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
} catch {
|
|
328
|
+
i(!1, `"${s.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`);
|
|
329
|
+
}
|
|
330
|
+
a !== !0 && window.scrollTo(0, 0);
|
|
331
|
+
}
|
|
332
|
+
}, [
|
|
333
|
+
s,
|
|
334
|
+
r,
|
|
335
|
+
a
|
|
336
|
+
]));
|
|
337
|
+
}
|
|
338
|
+
function $(e, t) {
|
|
339
|
+
let { capture: n } = t || {};
|
|
340
|
+
M.useEffect(() => {
|
|
341
|
+
let t = n == null ? void 0 : { capture: n };
|
|
342
|
+
return window.addEventListener("pagehide", e, t), () => {
|
|
343
|
+
window.removeEventListener("pagehide", e, t);
|
|
344
|
+
};
|
|
345
|
+
}, [e, n]);
|
|
346
|
+
}
|
|
347
|
+
function ee(e, { relative: t } = {}) {
|
|
348
|
+
let n = M.useContext(m);
|
|
349
|
+
r(n != null, "`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");
|
|
350
|
+
let { basename: i } = V("useViewTransitionState"), a = b(e, { relative: t });
|
|
351
|
+
if (!n.isTransitioning) return !1;
|
|
352
|
+
let s = l(n.currentLocation.pathname, i) || n.currentLocation.pathname, c = l(n.nextLocation.pathname, i) || n.nextLocation.pathname;
|
|
353
|
+
return o(a.pathname, c) != null || o(a.pathname, s) != null;
|
|
354
|
+
}
|
|
355
|
+
//#endregion
|
|
356
|
+
export { P as BrowserRouter, W as useSearchParams };
|
|
357
|
+
|
|
358
|
+
//# sourceMappingURL=lib.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lib.js","names":[],"sources":["../../../../../../../node_modules/react-router/dist/production/lib/dom/lib.js"],"sourcesContent":["/**\n * react-router v8.3.0\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport { ABSOLUTE_URL_REGEX } from \"../router/url.js\";\nimport { createBrowserHistory, createHashHistory, createPath, invariant, warning } from \"../router/history.js\";\nimport { ErrorResponseImpl, SUPPORTED_ERROR_TYPES, defaultMapRouteProperties, joinPaths, matchPath, parseToInfo, resolveTo, stripBasename } from \"../router/utils.js\";\nimport { IDLE_FETCHER, createRouter } from \"../router/router.js\";\nimport { DataRouterContext, DataRouterStateContext, FetchersContext, NavigationContext, RouteContext, ViewTransitionContext } from \"../context.js\";\nimport { useBlocker, useHref, useLocation, useMatches, useNavigate, useNavigation, useResolvedPath, useRouteId } from \"../hooks.js\";\nimport { Router, hydrationRouteProperties } from \"../components.js\";\nimport { createSearchParams, getFormSubmissionInfo, getSearchParamsForLocation, shouldProcessLinkClick } from \"./dom.js\";\nimport { escapeHtml } from \"./ssr/markup.js\";\nimport { FrameworkContext, PrefetchPageLinks, mergeRefs, usePrefetchBehavior } from \"./ssr/components.js\";\nimport * as React$1 from \"react\";\n//#region lib/dom/lib.tsx\nconst isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.document.createElement !== \"undefined\";\ntry {\n\tif (isBrowser) window.__reactRouterVersion = \"8.3.0\";\n} catch (e) {}\n/**\n* Create a new {@link DataRouter| data router} that manages the application\n* path via [`history.pushState`](https://developer.mozilla.org/en-US/docs/Web/API/History/pushState)\n* and [`history.replaceState`](https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState).\n*\n* Data Routers should not be held in React state. You should create your router\n* once outside of the React tree and pass it to {@link RouterProvider | `<RouterProvider>`}.\n* You can use `patchRoutesOnNavigation` to add additional routes programmatically.\n*\n* @public\n* @category Data Routers\n* @mode data\n* @param routes Application routes\n* @param opts Options\n* @param {DOMRouterOpts.basename} opts.basename n/a\n* @param {DOMRouterOpts.dataStrategy} opts.dataStrategy n/a\n* @param {DOMRouterOpts.future} opts.future n/a\n* @param {DOMRouterOpts.getContext} opts.getContext n/a\n* @param {DOMRouterOpts.hydrationData} opts.hydrationData n/a\n* @param {DOMRouterOpts.instrumentations} opts.instrumentations n/a\n* @param {DOMRouterOpts.patchRoutesOnNavigation} opts.patchRoutesOnNavigation n/a\n* @param {DOMRouterOpts.window} opts.window n/a\n* @returns An initialized {@link DataRouter| data router} to pass to {@link RouterProvider | `<RouterProvider>`}\n*/\nfunction createBrowserRouter(routes, opts) {\n\treturn createRouter({\n\t\tbasename: opts?.basename,\n\t\tgetContext: opts?.getContext,\n\t\tfuture: opts?.future,\n\t\thistory: createBrowserHistory({ window: opts?.window }),\n\t\thydrationData: opts?.hydrationData || parseHydrationData(),\n\t\troutes,\n\t\tmapRouteProperties: defaultMapRouteProperties,\n\t\thydrationRouteProperties,\n\t\tdataStrategy: opts?.dataStrategy,\n\t\tpatchRoutesOnNavigation: opts?.patchRoutesOnNavigation,\n\t\twindow: opts?.window,\n\t\tinstrumentations: opts?.instrumentations\n\t}).initialize();\n}\n/**\n* Create a new {@link DataRouter| data router} that manages the application\n* path via the URL [`hash`](https://developer.mozilla.org/en-US/docs/Web/API/URL/hash).\n*\n* Data Routers should not be held in React state. You should create your router\n* once outside of the React tree and pass it to {@link RouterProvider | `<RouterProvider>`}.\n* You can use `patchRoutesOnNavigation` to add additional routes programmatically.\n*\n* @public\n* @category Data Routers\n* @mode data\n* @param routes Application routes\n* @param opts Options\n* @param {DOMRouterOpts.basename} opts.basename n/a\n* @param {DOMRouterOpts.future} opts.future n/a\n* @param {DOMRouterOpts.getContext} opts.getContext n/a\n* @param {DOMRouterOpts.hydrationData} opts.hydrationData n/a\n* @param {DOMRouterOpts.instrumentations} opts.instrumentations n/a\n* @param {DOMRouterOpts.dataStrategy} opts.dataStrategy n/a\n* @param {DOMRouterOpts.patchRoutesOnNavigation} opts.patchRoutesOnNavigation n/a\n* @param {DOMRouterOpts.window} opts.window n/a\n* @returns An initialized {@link DataRouter| data router} to pass to {@link RouterProvider | `<RouterProvider>`}\n*/\nfunction createHashRouter(routes, opts) {\n\treturn createRouter({\n\t\tbasename: opts?.basename,\n\t\tgetContext: opts?.getContext,\n\t\tfuture: opts?.future,\n\t\thistory: createHashHistory({ window: opts?.window }),\n\t\thydrationData: opts?.hydrationData || parseHydrationData(),\n\t\troutes,\n\t\tmapRouteProperties: defaultMapRouteProperties,\n\t\thydrationRouteProperties,\n\t\tdataStrategy: opts?.dataStrategy,\n\t\tpatchRoutesOnNavigation: opts?.patchRoutesOnNavigation,\n\t\twindow: opts?.window,\n\t\tinstrumentations: opts?.instrumentations\n\t}).initialize();\n}\nfunction parseHydrationData() {\n\tlet state = window?.__staticRouterHydrationData;\n\tif (state && state.errors) state = {\n\t\t...state,\n\t\terrors: deserializeErrors(state.errors)\n\t};\n\treturn state;\n}\nfunction deserializeErrors(errors) {\n\tif (!errors) return null;\n\tlet entries = Object.entries(errors);\n\tlet serialized = {};\n\tfor (let [key, val] of entries) if (val && val.__type === \"RouteErrorResponse\") serialized[key] = new ErrorResponseImpl(val.status, val.statusText, val.data, val.internal === true);\n\telse if (val && val.__type === \"Error\") {\n\t\tif (typeof val.__subType === \"string\" && SUPPORTED_ERROR_TYPES.includes(val.__subType)) {\n\t\t\tlet ErrorConstructor = window[val.__subType];\n\t\t\tif (typeof ErrorConstructor === \"function\") try {\n\t\t\t\tlet error = new ErrorConstructor(val.message);\n\t\t\t\terror.stack = \"\";\n\t\t\t\tserialized[key] = error;\n\t\t\t} catch (e) {}\n\t\t}\n\t\tif (serialized[key] == null) {\n\t\t\tlet error = new Error(val.message);\n\t\t\terror.stack = \"\";\n\t\t\tserialized[key] = error;\n\t\t}\n\t} else serialized[key] = val;\n\treturn serialized;\n}\n/**\n* A declarative {@link Router | `<Router>`} using the browser [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)\n* API for client-side routing.\n*\n* @public\n* @category Declarative Routers\n* @mode declarative\n* @param props Props\n* @param {BrowserRouterProps.basename} props.basename n/a\n* @param {BrowserRouterProps.children} props.children n/a\n* @param {BrowserRouterProps.useTransitions} props.useTransitions n/a\n* @param {BrowserRouterProps.window} props.window n/a\n* @returns A declarative {@link Router | `<Router>`} using the browser [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)\n* API for client-side routing.\n*/\nfunction BrowserRouter({ basename, children, useTransitions, window }) {\n\tlet historyRef = React$1.useRef(null);\n\tif (historyRef.current == null) historyRef.current = createBrowserHistory({\n\t\twindow,\n\t\tv5Compat: true\n\t});\n\tlet history = historyRef.current;\n\tlet [state, setStateImpl] = React$1.useState({\n\t\taction: history.action,\n\t\tlocation: history.location\n\t});\n\tlet setState = React$1.useCallback((newState) => {\n\t\tif (useTransitions === false) setStateImpl(newState);\n\t\telse React$1.startTransition(() => setStateImpl(newState));\n\t}, [useTransitions]);\n\tReact$1.useLayoutEffect(() => history.listen(setState), [history, setState]);\n\treturn /* @__PURE__ */ React$1.createElement(Router, {\n\t\tbasename,\n\t\tchildren,\n\t\tlocation: state.location,\n\t\tnavigationType: state.action,\n\t\tnavigator: history,\n\t\tuseTransitions\n\t});\n}\n/**\n* A declarative {@link Router | `<Router>`} that stores the location in the\n* [`hash`](https://developer.mozilla.org/en-US/docs/Web/API/URL/hash) portion\n* of the URL so it is not sent to the server.\n*\n* @public\n* @category Declarative Routers\n* @mode declarative\n* @param props Props\n* @param {HashRouterProps.basename} props.basename n/a\n* @param {HashRouterProps.children} props.children n/a\n* @param {HashRouterProps.useTransitions} props.useTransitions n/a\n* @param {HashRouterProps.window} props.window n/a\n* @returns A declarative {@link Router | `<Router>`} using the URL [`hash`](https://developer.mozilla.org/en-US/docs/Web/API/URL/hash)\n* for client-side routing.\n*/\nfunction HashRouter({ basename, children, useTransitions, window }) {\n\tlet historyRef = React$1.useRef(null);\n\tif (historyRef.current == null) historyRef.current = createHashHistory({\n\t\twindow,\n\t\tv5Compat: true\n\t});\n\tlet history = historyRef.current;\n\tlet [state, setStateImpl] = React$1.useState({\n\t\taction: history.action,\n\t\tlocation: history.location\n\t});\n\tlet setState = React$1.useCallback((newState) => {\n\t\tif (useTransitions === false) setStateImpl(newState);\n\t\telse React$1.startTransition(() => setStateImpl(newState));\n\t}, [useTransitions]);\n\tReact$1.useLayoutEffect(() => history.listen(setState), [history, setState]);\n\treturn /* @__PURE__ */ React$1.createElement(Router, {\n\t\tbasename,\n\t\tchildren,\n\t\tlocation: state.location,\n\t\tnavigationType: state.action,\n\t\tnavigator: history,\n\t\tuseTransitions\n\t});\n}\n/**\n* A declarative {@link Router | `<Router>`} that accepts a pre-instantiated\n* `history` object.\n* It's important to note that using your own `history` object is highly discouraged\n* and may add two versions of the `history` library to your bundles unless you use\n* the same version of the `history` library that React Router uses internally.\n*\n* @name unstable_HistoryRouter\n* @public\n* @category Declarative Routers\n* @mode declarative\n* @param props Props\n* @param {HistoryRouterProps.basename} props.basename n/a\n* @param {HistoryRouterProps.children} props.children n/a\n* @param {HistoryRouterProps.history} props.history n/a\n* @param {HistoryRouterProps.useTransitions} props.useTransitions n/a\n* @returns A declarative {@link Router | `<Router>`} using the provided history\n* implementation for client-side routing.\n*/\nfunction HistoryRouter({ basename, children, history, useTransitions }) {\n\tlet [state, setStateImpl] = React$1.useState({\n\t\taction: history.action,\n\t\tlocation: history.location\n\t});\n\tlet setState = React$1.useCallback((newState) => {\n\t\tif (useTransitions === false) setStateImpl(newState);\n\t\telse React$1.startTransition(() => setStateImpl(newState));\n\t}, [useTransitions]);\n\tReact$1.useLayoutEffect(() => history.listen(setState), [history, setState]);\n\treturn /* @__PURE__ */ React$1.createElement(Router, {\n\t\tbasename,\n\t\tchildren,\n\t\tlocation: state.location,\n\t\tnavigationType: state.action,\n\t\tnavigator: history,\n\t\tuseTransitions\n\t});\n}\nHistoryRouter.displayName = \"unstable_HistoryRouter\";\n/**\n* A progressively enhanced [`<a href>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)\n* wrapper to enable navigation with client-side routing.\n*\n* @example\n* import { Link } from \"react-router\";\n*\n* <Link to=\"/dashboard\">Dashboard</Link>;\n*\n* <Link\n* to={{\n* pathname: \"/some/path\",\n* search: \"?query=string\",\n* hash: \"#hash\",\n* }}\n* />;\n*\n* @public\n* @category Components\n* @param {LinkProps.discover} props.discover [modes: framework] n/a\n* @param {LinkProps.prefetch} props.prefetch [modes: framework] n/a\n* @param {LinkProps.preventScrollReset} props.preventScrollReset [modes: framework, data] n/a\n* @param {LinkProps.relative} props.relative n/a\n* @param {LinkProps.reloadDocument} props.reloadDocument n/a\n* @param {LinkProps.replace} props.replace n/a\n* @param {LinkProps.state} props.state n/a\n* @param {LinkProps.to} props.to n/a\n* @param {LinkProps.viewTransition} props.viewTransition [modes: framework, data] n/a\n* @param {LinkProps.defaultShouldRevalidate} props.defaultShouldRevalidate n/a\n* @param {LinkProps.mask} props.mask [modes: framework, data] n/a\n*/\nconst Link = React$1.forwardRef(function LinkWithRef({ onClick, discover = \"render\", prefetch = \"none\", relative, reloadDocument, replace, mask, state, target, to, preventScrollReset, viewTransition, defaultShouldRevalidate, ...rest }, forwardedRef) {\n\tlet { basename, navigator, useTransitions } = React$1.useContext(NavigationContext);\n\tlet isAbsolute = typeof to === \"string\" && ABSOLUTE_URL_REGEX.test(to);\n\tlet parsed = parseToInfo(to, basename);\n\tto = parsed.to;\n\tlet href = useHref(to, { relative });\n\tlet location = useLocation();\n\tlet maskedHref = null;\n\tif (mask) {\n\t\tlet resolved = resolveTo(mask, [], location.mask ? location.mask.pathname : \"/\", true);\n\t\tif (basename !== \"/\") resolved.pathname = resolved.pathname === \"/\" ? basename : joinPaths([basename, resolved.pathname]);\n\t\tmaskedHref = navigator.createHref(resolved);\n\t}\n\tlet [shouldPrefetch, prefetchRef, prefetchHandlers] = usePrefetchBehavior(prefetch, rest);\n\tlet internalOnClick = useLinkClickHandler(to, {\n\t\treplace,\n\t\tmask,\n\t\tstate,\n\t\ttarget,\n\t\tpreventScrollReset,\n\t\trelative,\n\t\tviewTransition,\n\t\tdefaultShouldRevalidate,\n\t\tuseTransitions\n\t});\n\tfunction handleClick(event) {\n\t\tif (onClick) onClick(event);\n\t\tif (!event.defaultPrevented) internalOnClick(event);\n\t}\n\tlet isSpaLink = !(parsed.isExternal || reloadDocument);\n\tlet link = /* @__PURE__ */ React$1.createElement(\"a\", {\n\t\t...rest,\n\t\t...prefetchHandlers,\n\t\thref: (isSpaLink ? maskedHref : void 0) || parsed.absoluteURL || href,\n\t\tonClick: isSpaLink ? handleClick : onClick,\n\t\tref: mergeRefs(forwardedRef, prefetchRef),\n\t\ttarget,\n\t\t\"data-discover\": !isAbsolute && discover === \"render\" ? \"true\" : void 0\n\t});\n\treturn shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, link, /* @__PURE__ */ React$1.createElement(PrefetchPageLinks, { page: href })) : link;\n});\nLink.displayName = \"Link\";\n/**\n* Wraps {@link Link | `<Link>`} with additional props for styling active and\n* pending states.\n*\n* - Automatically applies classes to the link based on its `active` and `pending`\n* states, see {@link NavLinkProps.className}\n* - Note that `pending` is only available with Framework and Data modes.\n* - Automatically applies `aria-current=\"page\"` to the link when the link is active.\n* See [`aria-current`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n* on MDN.\n* - States are additionally available through the className, style, and children\n* render props. See {@link NavLinkRenderProps}.\n*\n* @example\n* <NavLink to=\"/message\">Messages</NavLink>\n*\n* // Using render props\n* <NavLink\n* to=\"/messages\"\n* className={({ isActive, isPending }) =>\n* isPending ? \"pending\" : isActive ? \"active\" : \"\"\n* }\n* >\n* Messages\n* </NavLink>\n*\n* @public\n* @category Components\n* @param {NavLinkProps.caseSensitive} props.caseSensitive n/a\n* @param {NavLinkProps.children} props.children n/a\n* @param {NavLinkProps.className} props.className n/a\n* @param {NavLinkProps.discover} props.discover [modes: framework] n/a\n* @param {NavLinkProps.end} props.end n/a\n* @param {NavLinkProps.prefetch} props.prefetch [modes: framework] n/a\n* @param {NavLinkProps.preventScrollReset} props.preventScrollReset [modes: framework, data] n/a\n* @param {NavLinkProps.relative} props.relative n/a\n* @param {NavLinkProps.reloadDocument} props.reloadDocument n/a\n* @param {NavLinkProps.replace} props.replace n/a\n* @param {NavLinkProps.state} props.state n/a\n* @param {NavLinkProps.style} props.style n/a\n* @param {NavLinkProps.to} props.to n/a\n* @param {NavLinkProps.viewTransition} props.viewTransition [modes: framework, data] n/a\n*/\nconst NavLink = React$1.forwardRef(function NavLinkWithRef({ \"aria-current\": ariaCurrentProp = \"page\", caseSensitive = false, className: classNameProp = \"\", end = false, style: styleProp, to, viewTransition, children, ...rest }, ref) {\n\tlet path = useResolvedPath(to, { relative: rest.relative });\n\tlet location = useLocation();\n\tlet routerState = React$1.useContext(DataRouterStateContext);\n\tlet { navigator, basename } = React$1.useContext(NavigationContext);\n\tlet isTransitioning = routerState != null && useViewTransitionState(path) && viewTransition === true;\n\tlet toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname;\n\tlet locationPathname = location.pathname;\n\tlet nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;\n\tif (!caseSensitive) {\n\t\tlocationPathname = locationPathname.toLowerCase();\n\t\tnextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;\n\t\ttoPathname = toPathname.toLowerCase();\n\t}\n\tif (nextLocationPathname && basename) nextLocationPathname = stripBasename(nextLocationPathname, basename) || nextLocationPathname;\n\tconst endSlashPosition = toPathname !== \"/\" && toPathname.endsWith(\"/\") ? toPathname.length - 1 : toPathname.length;\n\tlet isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === \"/\";\n\tlet isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(endSlashPosition) === \"/\");\n\tlet renderProps = {\n\t\tisActive,\n\t\tisPending,\n\t\tisTransitioning\n\t};\n\tlet ariaCurrent = isActive ? ariaCurrentProp : void 0;\n\tlet className;\n\tif (typeof classNameProp === \"function\") className = classNameProp(renderProps);\n\telse className = [\n\t\tclassNameProp,\n\t\tisActive ? \"active\" : null,\n\t\tisPending ? \"pending\" : null,\n\t\tisTransitioning ? \"transitioning\" : null\n\t].filter(Boolean).join(\" \");\n\tlet style = typeof styleProp === \"function\" ? styleProp(renderProps) : styleProp;\n\treturn /* @__PURE__ */ React$1.createElement(Link, {\n\t\t...rest,\n\t\t\"aria-current\": ariaCurrent,\n\t\tclassName,\n\t\tref,\n\t\tstyle,\n\t\tto,\n\t\tviewTransition\n\t}, typeof children === \"function\" ? children(renderProps) : children);\n});\nNavLink.displayName = \"NavLink\";\n/**\n* A progressively enhanced HTML [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form)\n* that submits data to actions via [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch),\n* activating pending states in {@link useNavigation} which enables advanced\n* user interfaces beyond a basic HTML [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form).\n* After a form's `action` completes, all data on the page is automatically\n* revalidated to keep the UI in sync with the data.\n*\n* Because it uses the HTML form API, server rendered pages are interactive at a\n* basic level before JavaScript loads. Instead of React Router managing the\n* submission, the browser manages the submission as well as the pending states\n* (like the spinning favicon). After JavaScript loads, React Router takes over\n* enabling web application user experiences.\n*\n* `Form` is most useful for submissions that should also change the URL or\n* otherwise add an entry to the browser history stack. For forms that shouldn't\n* manipulate the browser [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)\n* stack, use {@link FetcherWithComponents.Form | `<fetcher.Form>`}.\n*\n* @example\n* import { Form } from \"react-router\";\n*\n* function NewEvent() {\n* return (\n* <Form action=\"/events\" method=\"post\">\n* <input name=\"title\" type=\"text\" />\n* <input name=\"description\" type=\"text\" />\n* </Form>\n* );\n* }\n*\n* @public\n* @category Components\n* @mode framework\n* @mode data\n* @param {FormProps.action} action n/a\n* @param {FormProps.discover} discover n/a\n* @param {FormProps.encType} encType n/a\n* @param {FormProps.fetcherKey} fetcherKey n/a\n* @param {FormProps.method} method n/a\n* @param {FormProps.navigate} navigate n/a\n* @param {FormProps.preventScrollReset} preventScrollReset n/a\n* @param {FormProps.relative} relative n/a\n* @param {FormProps.reloadDocument} reloadDocument n/a\n* @param {FormProps.replace} replace n/a\n* @param {FormProps.state} state n/a\n* @param {FormProps.viewTransition} viewTransition n/a\n* @param {FormProps.defaultShouldRevalidate} defaultShouldRevalidate n/a\n* @returns A progressively enhanced [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) component\n*/\nconst Form = React$1.forwardRef(({ discover = \"render\", fetcherKey, navigate, reloadDocument, replace, state, method = \"get\", action, onSubmit, relative, preventScrollReset, viewTransition, defaultShouldRevalidate, ...props }, forwardedRef) => {\n\tlet { useTransitions } = React$1.useContext(NavigationContext);\n\tlet submit = useSubmit();\n\tlet formAction = useFormAction(action, { relative });\n\tlet formMethod = method.toLowerCase() === \"get\" ? \"get\" : \"post\";\n\tlet isAbsolute = typeof action === \"string\" && ABSOLUTE_URL_REGEX.test(action);\n\tlet submitHandler = (event) => {\n\t\tonSubmit && onSubmit(event);\n\t\tif (event.defaultPrevented) return;\n\t\tevent.preventDefault();\n\t\tlet submitter = event.nativeEvent.submitter;\n\t\tlet submitMethod = submitter?.getAttribute(\"formmethod\") || method;\n\t\tlet doSubmit = () => submit(submitter || event.currentTarget, {\n\t\t\tfetcherKey,\n\t\t\tmethod: submitMethod,\n\t\t\tnavigate,\n\t\t\treplace,\n\t\t\tstate,\n\t\t\trelative,\n\t\t\tpreventScrollReset,\n\t\t\tviewTransition,\n\t\t\tdefaultShouldRevalidate\n\t\t});\n\t\tif (useTransitions && navigate !== false) React$1.startTransition(() => doSubmit());\n\t\telse doSubmit();\n\t};\n\treturn /* @__PURE__ */ React$1.createElement(\"form\", {\n\t\tref: forwardedRef,\n\t\tmethod: formMethod,\n\t\taction: formAction,\n\t\tonSubmit: reloadDocument ? onSubmit : submitHandler,\n\t\t...props,\n\t\t\"data-discover\": !isAbsolute && discover === \"render\" ? \"true\" : void 0\n\t});\n});\nForm.displayName = \"Form\";\n/**\n* Emulates the browser's scroll restoration on location changes. Apps should only render one of these, right before the {@link Scripts} component.\n*\n* ```tsx\n* import { ScrollRestoration } from \"react-router\";\n*\n* export default function Root() {\n* return (\n* <html>\n* <body>\n* <ScrollRestoration />\n* <Scripts />\n* </body>\n* </html>\n* );\n* }\n* ```\n*\n* This component renders an inline `<script>` to prevent scroll flashing. The\n* `nonce` prop will be passed down to the script tag to allow CSP nonce usage.\n* If not provided in Framework Mode, it will default to any\n* {@link ServerRouter | `<ServerRouter nonce>`} prop.\n*\n* ```tsx\n* <ScrollRestoration nonce={cspNonce} />\n* ```\n*\n* @public\n* @category Components\n* @mode framework\n* @mode data\n* @param props Props\n* @param {ScrollRestorationProps.getKey} props.getKey n/a\n* @param {ScriptsProps.nonce} props.nonce n/a\n* @param {ScrollRestorationProps.storageKey} props.storageKey n/a\n* @returns A [`<script>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script)\n* tag that restores scroll positions on navigation.\n*/\nfunction ScrollRestoration({ getKey, storageKey, ...props }) {\n\tlet remixContext = React$1.useContext(FrameworkContext);\n\tlet { basename } = React$1.useContext(NavigationContext);\n\tlet location = useLocation();\n\tlet matches = useMatches();\n\tuseScrollRestoration({\n\t\tgetKey,\n\t\tstorageKey\n\t});\n\tlet ssrKey = React$1.useMemo(() => {\n\t\tif (!remixContext || !getKey) return null;\n\t\tlet userKey = getScrollRestorationKey(location, matches, basename, getKey);\n\t\treturn userKey !== location.key ? userKey : null;\n\t}, []);\n\tif (!remixContext || remixContext.isSpaMode) return null;\n\tlet restoreScroll = ((storageKey, restoreKey) => {\n\t\tif (!window.history.state || !window.history.state.key) {\n\t\t\tlet key = Math.random().toString(32).slice(2);\n\t\t\twindow.history.replaceState({ key }, \"\");\n\t\t}\n\t\ttry {\n\t\t\tlet storedY = JSON.parse(sessionStorage.getItem(storageKey) || \"{}\")[restoreKey || window.history.state.key];\n\t\t\tif (typeof storedY === \"number\") window.scrollTo(0, storedY);\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t\tsessionStorage.removeItem(storageKey);\n\t\t}\n\t}).toString();\n\tif (props.nonce == null && remixContext?.nonce) props.nonce = remixContext.nonce;\n\treturn /* @__PURE__ */ React$1.createElement(\"script\", {\n\t\t...props,\n\t\tsuppressHydrationWarning: true,\n\t\tdangerouslySetInnerHTML: { __html: `(${restoreScroll})(${escapeHtml(JSON.stringify(storageKey || SCROLL_RESTORATION_STORAGE_KEY))}, ${escapeHtml(JSON.stringify(ssrKey))})` }\n\t});\n}\nScrollRestoration.displayName = \"ScrollRestoration\";\nfunction getDataRouterConsoleError(hookName) {\n\treturn `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;\n}\nfunction useDataRouterContext(hookName) {\n\tlet ctx = React$1.useContext(DataRouterContext);\n\tinvariant(ctx, getDataRouterConsoleError(hookName));\n\treturn ctx;\n}\nfunction useDataRouterState(hookName) {\n\tlet state = React$1.useContext(DataRouterStateContext);\n\tinvariant(state, getDataRouterConsoleError(hookName));\n\treturn state;\n}\n/**\n* Handles the click behavior for router {@link Link | `<Link>`} components.This\n* is useful if you need to create custom {@link Link | `<Link>`} components with\n* the same click behavior we use in our exported {@link Link | `<Link>`}.\n*\n* @public\n* @category Hooks\n* @param to The URL to navigate to, can be a string or a partial {@link Path}.\n* @param options Options\n* @param options.preventScrollReset Whether to prevent the scroll position from\n* being reset to the top of the viewport on completion of the navigation when\n* using the {@link ScrollRestoration} component. Defaults to `false`.\n* @param options.relative The {@link RelativeRoutingType | relative routing type}\n* to use for the link. Defaults to `\"route\"`.\n* @param options.replace Whether to replace the current [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)\n* entry instead of pushing a new one. Defaults to `false`.\n* @param options.state The state to add to the [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)\n* entry for this navigation. Defaults to `undefined`.\n* @param options.target The target attribute for the link. Defaults to `undefined`.\n* @param options.viewTransition Enables a [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API)\n* for this navigation. To apply specific styles during the transition, see\n* {@link useViewTransitionState}. Defaults to `false`.\n* @param options.defaultShouldRevalidate Specify the default revalidation\n* behavior for the navigation. When not specified, loaders revalidate\n* according to the router's standard revalidation behavior.\n* @param options.mask Masked location to display in the browser instead\n* of the router location. Defaults to `undefined`.\n* @param options.useTransitions Wraps the navigation in\n* [`React.startTransition`](https://react.dev/reference/react/startTransition)\n* for concurrent rendering. Defaults to `false`.\n* @returns A click handler function that can be used in a custom {@link Link} component.\n*/\nfunction useLinkClickHandler(to, { target, replace: replaceProp, mask, state, preventScrollReset, relative, viewTransition, defaultShouldRevalidate, useTransitions } = {}) {\n\tlet navigate = useNavigate();\n\tlet location = useLocation();\n\tlet path = useResolvedPath(to, { relative });\n\treturn React$1.useCallback((event) => {\n\t\tif (shouldProcessLinkClick(event, target)) {\n\t\t\tevent.preventDefault();\n\t\t\tlet replace = replaceProp !== void 0 ? replaceProp : createPath(location) === createPath(path);\n\t\t\tlet doNavigate = () => navigate(to, {\n\t\t\t\treplace,\n\t\t\t\tmask,\n\t\t\t\tstate,\n\t\t\t\tpreventScrollReset,\n\t\t\t\trelative,\n\t\t\t\tviewTransition,\n\t\t\t\tdefaultShouldRevalidate\n\t\t\t});\n\t\t\tif (useTransitions) React$1.startTransition(() => doNavigate());\n\t\t\telse doNavigate();\n\t\t}\n\t}, [\n\t\tlocation,\n\t\tnavigate,\n\t\tpath,\n\t\treplaceProp,\n\t\tmask,\n\t\tstate,\n\t\ttarget,\n\t\tto,\n\t\tpreventScrollReset,\n\t\trelative,\n\t\tviewTransition,\n\t\tdefaultShouldRevalidate,\n\t\tuseTransitions\n\t]);\n}\n/**\n* Returns a tuple of the current URL's [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)\n* and a function to update them. Setting the search params causes a navigation.\n*\n* ```tsx\n* import { useSearchParams } from \"react-router\";\n*\n* export function SomeComponent() {\n* const [searchParams, setSearchParams] = useSearchParams();\n* // ...\n* }\n* ```\n*\n* ### `setSearchParams` function\n*\n* The second element of the tuple is a function that can be used to update the\n* search params. It accepts the same types as `defaultInit` and will cause a\n* navigation to the new URL.\n*\n* ```tsx\n* let [searchParams, setSearchParams] = useSearchParams();\n*\n* // a search param string\n* setSearchParams(\"?tab=1\");\n*\n* // a shorthand object\n* setSearchParams({ tab: \"1\" });\n*\n* // object keys can be arrays for multiple values on the key\n* setSearchParams({ brand: [\"nike\", \"reebok\"] });\n*\n* // an array of tuples\n* setSearchParams([[\"tab\", \"1\"]]);\n*\n* // a `URLSearchParams` object\n* setSearchParams(new URLSearchParams(\"?tab=1\"));\n* ```\n*\n* It also supports a function callback like React's\n* [`setState`](https://react.dev/reference/react/useState#setstate):\n*\n* ```tsx\n* setSearchParams((searchParams) => {\n* searchParams.set(\"tab\", \"2\");\n* return searchParams;\n* });\n* ```\n*\n* <docs-warning>The function callback version of `setSearchParams` does not support\n* the [queueing](https://react.dev/reference/react/useState#setstate-parameters)\n* logic that React's `setState` implements. Multiple calls to `setSearchParams`\n* in the same tick will not build on the prior value. If you need this behavior,\n* you can use `setState` manually.</docs-warning>\n*\n* ### Notes\n*\n* Note that `searchParams` is a stable reference, so you can reliably use it\n* as a dependency in React's [`useEffect`](https://react.dev/reference/react/useEffect)\n* hooks.\n*\n* ```tsx\n* useEffect(() => {\n* console.log(searchParams.get(\"tab\"));\n* }, [searchParams]);\n* ```\n*\n* However, this also means it's mutable. If you change the object without\n* calling `setSearchParams`, its values will change between renders if some\n* other state causes the component to re-render and URL will not reflect the\n* values.\n*\n* @public\n* @category Hooks\n* @param defaultInit\n* You can initialize the search params with a default value, though it **will\n* not** change the URL on the first render.\n*\n* ```tsx\n* // a search param string\n* useSearchParams(\"?tab=1\");\n*\n* // a shorthand object\n* useSearchParams({ tab: \"1\" });\n*\n* // object keys can be arrays for multiple values on the key\n* useSearchParams({ brand: [\"nike\", \"reebok\"] });\n*\n* // an array of tuples\n* useSearchParams([[\"tab\", \"1\"]]);\n*\n* // a `URLSearchParams` object\n* useSearchParams(new URLSearchParams(\"?tab=1\"));\n* ```\n* @returns A tuple of the current [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)\n* and a function to update them.\n*/\nfunction useSearchParams(defaultInit) {\n\twarning(typeof URLSearchParams !== \"undefined\", \"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.\");\n\tlet defaultSearchParamsRef = React$1.useRef(createSearchParams(defaultInit));\n\tlet hasSetSearchParamsRef = React$1.useRef(false);\n\tlet location = useLocation();\n\tlet searchParams = React$1.useMemo(() => getSearchParamsForLocation(location.search, hasSetSearchParamsRef.current ? null : defaultSearchParamsRef.current), [location.search]);\n\tlet navigate = useNavigate();\n\treturn [searchParams, React$1.useCallback((nextInit, navigateOptions) => {\n\t\tconst newSearchParams = createSearchParams(typeof nextInit === \"function\" ? nextInit(new URLSearchParams(searchParams)) : nextInit);\n\t\thasSetSearchParamsRef.current = true;\n\t\tnavigate(\"?\" + newSearchParams, navigateOptions);\n\t}, [navigate, searchParams])];\n}\nlet fetcherId = 0;\nlet getUniqueFetcherId = () => `__${String(++fetcherId)}__`;\n/**\n* The imperative version of {@link Form | `<Form>`} that lets you submit a form\n* from code instead of a user interaction.\n*\n* @example\n* import { useSubmit } from \"react-router\";\n*\n* function SomeComponent() {\n* const submit = useSubmit();\n* return (\n* <Form onChange={(event) => submit(event.currentTarget)} />\n* );\n* }\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns A function that can be called to submit a {@link Form} imperatively.\n*/\nfunction useSubmit() {\n\tlet { router } = useDataRouterContext(\"useSubmit\");\n\tlet { basename } = React$1.useContext(NavigationContext);\n\tlet currentRouteId = useRouteId();\n\tlet routerFetch = router.fetch;\n\tlet routerNavigate = router.navigate;\n\treturn React$1.useCallback(async (target, options = {}) => {\n\t\tlet { action, method, encType, formData, body } = getFormSubmissionInfo(target, basename);\n\t\tif (options.navigate === false) await routerFetch(options.fetcherKey || getUniqueFetcherId(), currentRouteId, options.action || action, {\n\t\t\tdefaultShouldRevalidate: options.defaultShouldRevalidate,\n\t\t\tpreventScrollReset: options.preventScrollReset,\n\t\t\tformData,\n\t\t\tbody,\n\t\t\tformMethod: options.method || method,\n\t\t\tformEncType: options.encType || encType,\n\t\t\tflushSync: options.flushSync\n\t\t});\n\t\telse await routerNavigate(options.action || action, {\n\t\t\tdefaultShouldRevalidate: options.defaultShouldRevalidate,\n\t\t\tpreventScrollReset: options.preventScrollReset,\n\t\t\tformData,\n\t\t\tbody,\n\t\t\tformMethod: options.method || method,\n\t\t\tformEncType: options.encType || encType,\n\t\t\treplace: options.replace,\n\t\t\tstate: options.state,\n\t\t\tfromRouteId: currentRouteId,\n\t\t\tflushSync: options.flushSync,\n\t\t\tviewTransition: options.viewTransition\n\t\t});\n\t}, [\n\t\trouterFetch,\n\t\trouterNavigate,\n\t\tbasename,\n\t\tcurrentRouteId\n\t]);\n}\n/**\n* Resolves the URL to the closest route in the component hierarchy instead of\n* the current URL of the app.\n*\n* This is used internally by {@link Form} to resolve the `action` to the closest\n* route, but can be used generically as well.\n*\n* ```ts\n* import { useFormAction } from \"react-router\";\n*\n* function SomeComponent() {\n* // closest route URL\n* let action = useFormAction();\n*\n* // closest route URL + \"destroy\"\n* let destroyAction = useFormAction(\"destroy\");\n* }\n* ```\n*\n* <docs-info>This hook adds a `basename` if your app specifies one, so that it\n* can be used with raw `<form>` elements in a progressively enhanced way. If\n* you are using this to provide an `action` to `<Form>` or `fetcher.submit`, you\n* will need to remove the `basename` since both of those will prepend it\n* internally.</docs-info>\n*\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @param action The action to append to the closest route URL. Defaults to the\n* closest route URL.\n* @param options Options\n* @param options.relative The relative routing type to use when resolving the\n* action. Defaults to `\"route\"`.\n* @returns The resolved action URL.\n*/\nfunction useFormAction(action, { relative } = {}) {\n\tlet { basename } = React$1.useContext(NavigationContext);\n\tlet routeContext = React$1.useContext(RouteContext);\n\tinvariant(routeContext, \"useFormAction must be used inside a RouteContext\");\n\tlet [match] = routeContext.matches.slice(-1);\n\tlet path = { ...useResolvedPath(action ? action : \".\", { relative }) };\n\tlet location = useLocation();\n\tif (action == null) {\n\t\tpath.search = location.search;\n\t\tlet params = new URLSearchParams(path.search);\n\t\tlet indexValues = params.getAll(\"index\");\n\t\tif (indexValues.some((v) => v === \"\")) {\n\t\t\tparams.delete(\"index\");\n\t\t\tindexValues.filter((v) => v).forEach((v) => params.append(\"index\", v));\n\t\t\tlet qs = params.toString();\n\t\t\tpath.search = qs ? `?${qs}` : \"\";\n\t\t}\n\t}\n\tif ((!action || action === \".\") && match.route.index) path.search = path.search ? path.search.replace(/^\\?/, \"?index&\") : \"?index\";\n\tif (basename !== \"/\") path.pathname = path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n\treturn createPath(path);\n}\n/**\n* Useful for creating complex, dynamic user interfaces that require multiple,\n* concurrent data interactions without causing a navigation.\n*\n* Fetchers track their own, independent state and can be used to load data, submit\n* forms, and generally interact with [`action`](../../start/framework/route-module#action)\n* and [`loader`](../../start/framework/route-module#loader) functions.\n*\n* @example\n* import { useFetcher } from \"react-router\"\n*\n* function SomeComponent() {\n* let fetcher = useFetcher()\n*\n* // states are available on the fetcher\n* fetcher.state // \"idle\" | \"loading\" | \"submitting\"\n* fetcher.data // the data returned from the action or loader\n*\n* // render a form\n* <fetcher.Form method=\"post\" />\n*\n* // load data\n* fetcher.load(\"/some/route\")\n*\n* // submit data\n* fetcher.submit(someFormRef, { method: \"post\" })\n* fetcher.submit(someData, {\n* method: \"post\",\n* encType: \"application/json\"\n* })\n*\n* // reset fetcher\n* fetcher.reset()\n* }\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @param options Options\n* @param options.key A unique key to identify the fetcher.\n*\n*\n* By default, `useFetcher` generates a unique fetcher scoped to that component.\n* If you want to identify a fetcher with your own key such that you can access\n* it from elsewhere in your app, you can do that with the `key` option:\n*\n* ```tsx\n* function SomeComp() {\n* let fetcher = useFetcher({ key: \"my-key\" })\n* // ...\n* }\n*\n* // Somewhere else\n* function AnotherComp() {\n* // this will be the same fetcher, sharing the state across the app\n* let fetcher = useFetcher({ key: \"my-key\" });\n* // ...\n* }\n* ```\n* @returns A {@link FetcherWithComponents} object that contains the fetcher's state, data, and components for submitting forms and loading data.\n*/\nfunction useFetcher({ key } = {}) {\n\tlet { router } = useDataRouterContext(\"useFetcher\");\n\tlet state = useDataRouterState(\"useFetcher\");\n\tlet fetcherData = React$1.useContext(FetchersContext);\n\tlet route = React$1.useContext(RouteContext);\n\tlet routeId = route.matches[route.matches.length - 1]?.route.id;\n\tinvariant(fetcherData, `useFetcher must be used inside a FetchersContext`);\n\tinvariant(route, `useFetcher must be used inside a RouteContext`);\n\tinvariant(routeId != null, `useFetcher can only be used on routes that contain a unique \"id\"`);\n\tlet defaultKey = React$1.useId();\n\tlet [fetcherKey, setFetcherKey] = React$1.useState(key || defaultKey);\n\tif (key && key !== fetcherKey) setFetcherKey(key);\n\tlet { deleteFetcher, getFetcher, resetFetcher, fetch: routerFetch } = router;\n\tReact$1.useEffect(() => {\n\t\tgetFetcher(fetcherKey);\n\t\treturn () => deleteFetcher(fetcherKey);\n\t}, [\n\t\tdeleteFetcher,\n\t\tgetFetcher,\n\t\tfetcherKey\n\t]);\n\tlet load = React$1.useCallback(async (href, opts) => {\n\t\tinvariant(routeId, \"No routeId available for fetcher.load()\");\n\t\tawait routerFetch(fetcherKey, routeId, href, opts);\n\t}, [\n\t\tfetcherKey,\n\t\trouteId,\n\t\trouterFetch\n\t]);\n\tlet submitImpl = useSubmit();\n\tlet submit = React$1.useCallback(async (target, opts) => {\n\t\tawait submitImpl(target, {\n\t\t\t...opts,\n\t\t\tnavigate: false,\n\t\t\tfetcherKey\n\t\t});\n\t}, [fetcherKey, submitImpl]);\n\tlet reset = React$1.useCallback((opts) => resetFetcher(fetcherKey, opts), [resetFetcher, fetcherKey]);\n\tlet FetcherForm = React$1.useMemo(() => {\n\t\tlet FetcherForm = React$1.forwardRef((props, ref) => {\n\t\t\treturn /* @__PURE__ */ React$1.createElement(Form, {\n\t\t\t\t...props,\n\t\t\t\tnavigate: false,\n\t\t\t\tfetcherKey,\n\t\t\t\tref\n\t\t\t});\n\t\t});\n\t\tFetcherForm.displayName = \"fetcher.Form\";\n\t\treturn FetcherForm;\n\t}, [fetcherKey]);\n\tlet fetcher = state.fetchers.get(fetcherKey) || IDLE_FETCHER;\n\tlet data = fetcherData.get(fetcherKey);\n\treturn React$1.useMemo(() => ({\n\t\tForm: FetcherForm,\n\t\tsubmit,\n\t\tload,\n\t\treset,\n\t\t...fetcher,\n\t\tdata\n\t}), [\n\t\tFetcherForm,\n\t\tsubmit,\n\t\tload,\n\t\treset,\n\t\tfetcher,\n\t\tdata\n\t]);\n}\n/**\n* Returns an array of all in-flight {@link Fetcher}s. This is useful for components\n* throughout the app that didn't create the fetchers but want to use their submissions\n* to participate in optimistic UI.\n*\n* @example\n* import { useFetchers } from \"react-router\";\n*\n* function SomeComponent() {\n* const fetchers = useFetchers();\n* fetchers[0].formData; // FormData\n* fetchers[0].state; // etc.\n* // ...\n* }\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns An array of all in-flight {@link Fetcher}s, each with a unique `key`\n* property.\n*/\nfunction useFetchers() {\n\tlet state = useDataRouterState(\"useFetchers\");\n\treturn React$1.useMemo(() => Array.from(state.fetchers.entries()).map(([key, fetcher]) => ({\n\t\t...fetcher,\n\t\tkey\n\t})), [state.fetchers]);\n}\nconst SCROLL_RESTORATION_STORAGE_KEY = \"react-router-scroll-positions\";\nlet savedScrollPositions = {};\nfunction getScrollRestorationKey(location, matches, basename, getKey) {\n\tlet key = null;\n\tif (getKey) if (basename !== \"/\") key = getKey({\n\t\t...location,\n\t\tpathname: stripBasename(location.pathname, basename) || location.pathname\n\t}, matches);\n\telse key = getKey(location, matches);\n\tif (key == null) key = location.key;\n\treturn key;\n}\n/**\n* When rendered inside a {@link RouterProvider}, will restore scroll positions\n* on navigations\n*\n* <!--\n* Not marked `@public` because we only export as UNSAFE_ and therefore we don't\n* maintain an .md file for this hook\n* -->\n*\n* @name UNSAFE_useScrollRestoration\n* @category Hooks\n* @mode framework\n* @mode data\n* @param options Options\n* @param options.getKey A function that returns a key to use for scroll restoration.\n* This is useful for custom scroll restoration logic, such as using only the pathname\n* so that subsequent navigations to prior paths will restore the scroll. Defaults\n* to `location.key`.\n* @param options.storageKey The key to use for storing scroll positions in\n* `sessionStorage`. Defaults to `\"react-router-scroll-positions\"`.\n* @returns {void}\n*/\nfunction useScrollRestoration({ getKey, storageKey } = {}) {\n\tlet { router } = useDataRouterContext(\"useScrollRestoration\");\n\tlet { restoreScrollPosition, preventScrollReset } = useDataRouterState(\"useScrollRestoration\");\n\tlet { basename } = React$1.useContext(NavigationContext);\n\tlet location = useLocation();\n\tlet matches = useMatches();\n\tlet navigation = useNavigation();\n\tReact$1.useEffect(() => {\n\t\twindow.history.scrollRestoration = \"manual\";\n\t\treturn () => {\n\t\t\twindow.history.scrollRestoration = \"auto\";\n\t\t};\n\t}, []);\n\tusePageHide(React$1.useCallback(() => {\n\t\tif (navigation.state === \"idle\") {\n\t\t\tlet key = getScrollRestorationKey(location, matches, basename, getKey);\n\t\t\tsavedScrollPositions[key] = window.scrollY;\n\t\t}\n\t\ttry {\n\t\t\tsessionStorage.setItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY, JSON.stringify(savedScrollPositions));\n\t\t} catch (error) {\n\t\t\twarning(false, `Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${error}).`);\n\t\t}\n\t\twindow.history.scrollRestoration = \"auto\";\n\t}, [\n\t\tnavigation.state,\n\t\tgetKey,\n\t\tbasename,\n\t\tlocation,\n\t\tmatches,\n\t\tstorageKey\n\t]));\n\tif (typeof document !== \"undefined\") {\n\t\tReact$1.useLayoutEffect(() => {\n\t\t\ttry {\n\t\t\t\tlet sessionPositions = sessionStorage.getItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY);\n\t\t\t\tif (sessionPositions) savedScrollPositions = JSON.parse(sessionPositions);\n\t\t\t} catch (e) {}\n\t\t}, [storageKey]);\n\t\tReact$1.useLayoutEffect(() => {\n\t\t\tlet disableScrollRestoration = router?.enableScrollRestoration(savedScrollPositions, () => window.scrollY, getKey ? (location, matches) => getScrollRestorationKey(location, matches, basename, getKey) : void 0);\n\t\t\treturn () => disableScrollRestoration && disableScrollRestoration();\n\t\t}, [\n\t\t\trouter,\n\t\t\tbasename,\n\t\t\tgetKey\n\t\t]);\n\t\tReact$1.useLayoutEffect(() => {\n\t\t\tif (restoreScrollPosition === false) return;\n\t\t\tif (typeof restoreScrollPosition === \"number\") {\n\t\t\t\twindow.scrollTo(0, restoreScrollPosition);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (location.hash) {\n\t\t\t\t\tlet el = document.getElementById(decodeURIComponent(location.hash.slice(1)));\n\t\t\t\t\tif (el) {\n\t\t\t\t\t\tel.scrollIntoView();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\twarning(false, `\"${location.hash.slice(1)}\" is not a decodable element ID. The view will not scroll to it.`);\n\t\t\t}\n\t\t\tif (preventScrollReset === true) return;\n\t\t\twindow.scrollTo(0, 0);\n\t\t}, [\n\t\t\tlocation,\n\t\t\trestoreScrollPosition,\n\t\t\tpreventScrollReset\n\t\t]);\n\t}\n}\n/**\n* Set up a callback to be fired on [Window's `beforeunload` event](https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event).\n*\n* @public\n* @category Hooks\n* @param callback The callback to be called when the [`beforeunload` event](https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event)\n* is fired.\n* @param options Options\n* @param options.capture If `true`, the event will be captured during the capture\n* phase. Defaults to `false`.\n* @returns {void}\n*/\nfunction useBeforeUnload(callback, options) {\n\tlet { capture } = options || {};\n\tReact$1.useEffect(() => {\n\t\tlet opts = capture != null ? { capture } : void 0;\n\t\twindow.addEventListener(\"beforeunload\", callback, opts);\n\t\treturn () => {\n\t\t\twindow.removeEventListener(\"beforeunload\", callback, opts);\n\t\t};\n\t}, [callback, capture]);\n}\nfunction usePageHide(callback, options) {\n\tlet { capture } = options || {};\n\tReact$1.useEffect(() => {\n\t\tlet opts = capture != null ? { capture } : void 0;\n\t\twindow.addEventListener(\"pagehide\", callback, opts);\n\t\treturn () => {\n\t\t\twindow.removeEventListener(\"pagehide\", callback, opts);\n\t\t};\n\t}, [callback, capture]);\n}\n/**\n* Wrapper around {@link useBlocker} to show a [`window.confirm`](https://developer.mozilla.org/en-US/docs/Web/API/Window/confirm)\n* prompt to users instead of building a custom UI with {@link useBlocker}.\n*\n* The `unstable_` flag will not be removed because this technique has a lot of\n* rough edges and behaves very differently (and incorrectly sometimes) across\n* browsers if users click addition back/forward navigations while the\n* confirmation is open. Use at your own risk.\n*\n* @example\n* function ImportantForm() {\n* let [value, setValue] = React.useState(\"\");\n*\n* // Block navigating elsewhere when data has been entered into the input\n* unstable_usePrompt({\n* message: \"Are you sure?\",\n* when: ({ currentLocation, nextLocation }) =>\n* value !== \"\" &&\n* currentLocation.pathname !== nextLocation.pathname,\n* });\n*\n* return (\n* <Form method=\"post\">\n* <label>\n* Enter some important data:\n* <input\n* name=\"data\"\n* value={value}\n* onChange={(e) => setValue(e.target.value)}\n* />\n* </label>\n* <button type=\"submit\">Save</button>\n* </Form>\n* );\n* }\n*\n* @name unstable_usePrompt\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @param options Options\n* @param options.message The message to show in the confirmation dialog.\n* @param options.when A boolean or a function that returns a boolean indicating\n* whether to block the navigation. If a function is provided, it will receive an\n* object with `currentLocation` and `nextLocation` properties.\n* @returns {void}\n*/\nfunction usePrompt({ when, message }) {\n\tlet blocker = useBlocker(when);\n\tReact$1.useEffect(() => {\n\t\tif (blocker.state === \"blocked\") if (window.confirm(message)) setTimeout(blocker.proceed, 0);\n\t\telse blocker.reset();\n\t}, [blocker, message]);\n\tReact$1.useEffect(() => {\n\t\tif (blocker.state === \"blocked\" && !when) blocker.reset();\n\t}, [blocker, when]);\n}\n/**\n* This hook returns `true` when there is an active [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API)\n* and the specified location matches either side of the navigation (the URL you are\n* navigating **to** or the URL you are navigating **from**). This can be used to apply finer-grained styles to\n* elements to further customize the view transition. This requires that view\n* transitions have been enabled for the given navigation via {@link LinkProps.viewTransition}\n* (or the `Form`, `submit`, or `navigate` call)\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @param to The {@link To} location to compare against the active transition's current\n* and next URLs.\n* @param options Options\n* @param options.relative The relative routing type to use when resolving the\n* `to` location, defaults to `\"route\"`. See {@link RelativeRoutingType} for\n* more details.\n* @returns `true` if there is an active [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API)\n* and the resolved path matches the transition's destination or source pathname, otherwise `false`.\n*/\nfunction useViewTransitionState(to, { relative } = {}) {\n\tlet vtContext = React$1.useContext(ViewTransitionContext);\n\tinvariant(vtContext != null, \"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?\");\n\tlet { basename } = useDataRouterContext(\"useViewTransitionState\");\n\tlet path = useResolvedPath(to, { relative });\n\tif (!vtContext.isTransitioning) return false;\n\tlet currentPath = stripBasename(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;\n\tlet nextPath = stripBasename(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;\n\treturn matchPath(path.pathname, nextPath) != null || matchPath(path.pathname, currentPath) != null;\n}\n//#endregion\nexport { BrowserRouter, Form, HashRouter, HistoryRouter, Link, NavLink, ScrollRestoration, createBrowserRouter, createHashRouter, useBeforeUnload, useFetcher, useFetchers, useFormAction, useLinkClickHandler, usePrompt, useScrollRestoration, useSearchParams, useSubmit, useViewTransitionState };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;AAsBA,IAAM,IAAY,OAAO,SAAW,OAAsB,OAAO,aAAa,UAAsB,OAAO,SAAS,kBAAkB;AACtI,IAAI;AACH,CAAI,MAAW,OAAO,uBAAuB;QAClC;AA6HZ,SAAS,EAAc,EAAE,aAAU,aAAU,mBAAgB,aAAU;CACtE,IAAI,IAAa,EAAQ,OAAO,KAAK;AACrC,CAAgC,EAAW,YAAU,EAAqB;EACzE;EACA,UAAU;EACV,CAAC;CACF,IAAI,IAAU,EAAW,SACrB,CAAC,GAAO,KAAgB,EAAQ,SAAS;EAC5C,QAAQ,EAAQ;EAChB,UAAU,EAAQ;EAClB,CAAC,EACE,IAAW,EAAQ,aAAa,MAAa;AAChD,EAAI,MAAmB,KAAO,EAAa,EAAS,GAC/C,EAAQ,sBAAsB,EAAa,EAAS,CAAC;IACxD,CAAC,EAAe,CAAC;AAEpB,QADA,EAAQ,sBAAsB,EAAQ,OAAO,EAAS,EAAE,CAAC,GAAS,EAAS,CAAC,EACrD,kBAAQ,cAAc,GAAQ;EACpD;EACA;EACA,UAAU,EAAM;EAChB,gBAAgB,EAAM;EACtB,WAAW;EACX;EACA,CAAC;;AA8DH,SAAS,EAAc,EAAE,aAAU,aAAU,YAAS,qBAAkB;CACvE,IAAI,CAAC,GAAO,KAAgB,EAAQ,SAAS;EAC5C,QAAQ,EAAQ;EAChB,UAAU,EAAQ;EAClB,CAAC,EACE,IAAW,EAAQ,aAAa,MAAa;AAChD,EAAI,MAAmB,KAAO,EAAa,EAAS,GAC/C,EAAQ,sBAAsB,EAAa,EAAS,CAAC;IACxD,CAAC,EAAe,CAAC;AAEpB,QADA,EAAQ,sBAAsB,E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