react-router 7.11.0-pre.0 → 7.11.0

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +20 -3
  2. package/dist/{production/chunk-M5W3Q3T5.js → development/chunk-2JY4UAJA.js} +93 -93
  3. package/dist/{production/chunk-YGB3JEIP.js → development/chunk-GNDLROV6.js} +7 -7
  4. package/dist/development/{chunk-KRMLYMWA.mjs → chunk-JMJ3UQ3L.mjs} +2 -2
  5. package/dist/development/{chunk-UO7KGW2U.js → chunk-SZQUWNVJ.js} +1 -1
  6. package/dist/{production/chunk-J4JITZ76.mjs → development/chunk-YNUBSHFH.mjs} +2 -2
  7. package/dist/development/dom-export.js +27 -27
  8. package/dist/development/dom-export.mjs +3 -3
  9. package/dist/development/index-react-server-client.js +4 -4
  10. package/dist/development/index-react-server-client.mjs +2 -2
  11. package/dist/development/index-react-server.js +1 -1
  12. package/dist/development/index-react-server.mjs +1 -1
  13. package/dist/development/index.js +82 -82
  14. package/dist/development/index.mjs +3 -3
  15. package/dist/development/lib/types/internal.js +1 -1
  16. package/dist/development/lib/types/internal.mjs +1 -1
  17. package/dist/production/{chunk-AO22ZXHI.js → chunk-2HFJAX7U.js} +1 -1
  18. package/dist/{development/chunk-OVG6YSZ5.js → production/chunk-BEXOWXJO.js} +7 -7
  19. package/dist/{development/chunk-QMKP6CC3.mjs → production/chunk-E6GYEQUT.mjs} +2 -2
  20. package/dist/production/{chunk-IDHO4Q57.mjs → chunk-TINMVEA2.mjs} +2 -2
  21. package/dist/{development/chunk-JKMHOZYW.js → production/chunk-ZMYPVUNZ.js} +93 -93
  22. package/dist/production/dom-export.js +27 -27
  23. package/dist/production/dom-export.mjs +3 -3
  24. package/dist/production/index-react-server-client.js +4 -4
  25. package/dist/production/index-react-server-client.mjs +2 -2
  26. package/dist/production/index-react-server.js +1 -1
  27. package/dist/production/index-react-server.mjs +1 -1
  28. package/dist/production/index.js +82 -82
  29. package/dist/production/index.mjs +3 -3
  30. package/dist/production/lib/types/internal.js +1 -1
  31. package/dist/production/lib/types/internal.mjs +1 -1
  32. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
2
- * react-router v7.11.0-pre.0
2
+ * react-router v7.11.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -49,7 +49,7 @@
49
49
 
50
50
 
51
51
 
52
- var _chunkAO22ZXHIjs = require('./chunk-AO22ZXHI.js');
52
+ var _chunkSZQUWNVJjs = require('./chunk-SZQUWNVJ.js');
53
53
 
54
54
  // lib/dom/dom.ts
55
55
  var defaultMethod = "get";
@@ -120,7 +120,7 @@ var supportedFormEncTypes = /* @__PURE__ */ new Set([
120
120
  ]);
121
121
  function getFormEncType(encType) {
122
122
  if (encType != null && !supportedFormEncTypes.has(encType)) {
123
- _chunkAO22ZXHIjs.warning.call(void 0,
123
+ _chunkSZQUWNVJjs.warning.call(void 0,
124
124
  false,
125
125
  `"${encType}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`
126
126
  );
@@ -136,7 +136,7 @@ function getFormSubmissionInfo(target, basename) {
136
136
  let body;
137
137
  if (isFormElement(target)) {
138
138
  let attr = target.getAttribute("action");
139
- action = attr ? _chunkAO22ZXHIjs.stripBasename.call(void 0, attr, basename) : null;
139
+ action = attr ? _chunkSZQUWNVJjs.stripBasename.call(void 0, attr, basename) : null;
140
140
  method = target.getAttribute("method") || defaultMethod;
141
141
  encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType;
142
142
  formData = new FormData(target);
@@ -148,7 +148,7 @@ function getFormSubmissionInfo(target, basename) {
148
148
  );
149
149
  }
150
150
  let attr = target.getAttribute("formaction") || form.getAttribute("action");
151
- action = attr ? _chunkAO22ZXHIjs.stripBasename.call(void 0, attr, basename) : null;
151
+ action = attr ? _chunkSZQUWNVJjs.stripBasename.call(void 0, attr, basename) : null;
152
152
  method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod;
153
153
  encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType;
154
154
  formData = new FormData(form, target);
@@ -185,20 +185,20 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
185
185
  try {
186
186
  if (isBrowser) {
187
187
  window.__reactRouterVersion = // @ts-expect-error
188
- "7.11.0-pre.0";
188
+ "7.11.0";
189
189
  }
190
190
  } catch (e) {
191
191
  }
192
192
  function createBrowserRouter(routes, opts) {
193
- return _chunkAO22ZXHIjs.createRouter.call(void 0, {
193
+ return _chunkSZQUWNVJjs.createRouter.call(void 0, {
194
194
  basename: _optionalChain([opts, 'optionalAccess', _2 => _2.basename]),
195
195
  getContext: _optionalChain([opts, 'optionalAccess', _3 => _3.getContext]),
196
196
  future: _optionalChain([opts, 'optionalAccess', _4 => _4.future]),
197
- history: _chunkAO22ZXHIjs.createBrowserHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _5 => _5.window]) }),
197
+ history: _chunkSZQUWNVJjs.createBrowserHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _5 => _5.window]) }),
198
198
  hydrationData: _optionalChain([opts, 'optionalAccess', _6 => _6.hydrationData]) || parseHydrationData(),
199
199
  routes,
200
- mapRouteProperties: _chunkAO22ZXHIjs.mapRouteProperties,
201
- hydrationRouteProperties: _chunkAO22ZXHIjs.hydrationRouteProperties,
200
+ mapRouteProperties: _chunkSZQUWNVJjs.mapRouteProperties,
201
+ hydrationRouteProperties: _chunkSZQUWNVJjs.hydrationRouteProperties,
202
202
  dataStrategy: _optionalChain([opts, 'optionalAccess', _7 => _7.dataStrategy]),
203
203
  patchRoutesOnNavigation: _optionalChain([opts, 'optionalAccess', _8 => _8.patchRoutesOnNavigation]),
204
204
  window: _optionalChain([opts, 'optionalAccess', _9 => _9.window]),
@@ -206,15 +206,15 @@ function createBrowserRouter(routes, opts) {
206
206
  }).initialize();
207
207
  }
208
208
  function createHashRouter(routes, opts) {
209
- return _chunkAO22ZXHIjs.createRouter.call(void 0, {
209
+ return _chunkSZQUWNVJjs.createRouter.call(void 0, {
210
210
  basename: _optionalChain([opts, 'optionalAccess', _11 => _11.basename]),
211
211
  getContext: _optionalChain([opts, 'optionalAccess', _12 => _12.getContext]),
212
212
  future: _optionalChain([opts, 'optionalAccess', _13 => _13.future]),
213
- history: _chunkAO22ZXHIjs.createHashHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _14 => _14.window]) }),
213
+ history: _chunkSZQUWNVJjs.createHashHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _14 => _14.window]) }),
214
214
  hydrationData: _optionalChain([opts, 'optionalAccess', _15 => _15.hydrationData]) || parseHydrationData(),
215
215
  routes,
216
- mapRouteProperties: _chunkAO22ZXHIjs.mapRouteProperties,
217
- hydrationRouteProperties: _chunkAO22ZXHIjs.hydrationRouteProperties,
216
+ mapRouteProperties: _chunkSZQUWNVJjs.mapRouteProperties,
217
+ hydrationRouteProperties: _chunkSZQUWNVJjs.hydrationRouteProperties,
218
218
  dataStrategy: _optionalChain([opts, 'optionalAccess', _16 => _16.dataStrategy]),
219
219
  patchRoutesOnNavigation: _optionalChain([opts, 'optionalAccess', _17 => _17.patchRoutesOnNavigation]),
220
220
  window: _optionalChain([opts, 'optionalAccess', _18 => _18.window]),
@@ -237,7 +237,7 @@ function deserializeErrors(errors) {
237
237
  let serialized = {};
238
238
  for (let [key, val] of entries) {
239
239
  if (val && val.__type === "RouteErrorResponse") {
240
- serialized[key] = new (0, _chunkAO22ZXHIjs.ErrorResponseImpl)(
240
+ serialized[key] = new (0, _chunkSZQUWNVJjs.ErrorResponseImpl)(
241
241
  val.status,
242
242
  val.statusText,
243
243
  val.data,
@@ -274,7 +274,7 @@ function BrowserRouter({
274
274
  }) {
275
275
  let historyRef = React.useRef();
276
276
  if (historyRef.current == null) {
277
- historyRef.current = _chunkAO22ZXHIjs.createBrowserHistory.call(void 0, { window: window2, v5Compat: true });
277
+ historyRef.current = _chunkSZQUWNVJjs.createBrowserHistory.call(void 0, { window: window2, v5Compat: true });
278
278
  }
279
279
  let history = historyRef.current;
280
280
  let [state, setStateImpl] = React.useState({
@@ -293,7 +293,7 @@ function BrowserRouter({
293
293
  );
294
294
  React.useLayoutEffect(() => history.listen(setState), [history, setState]);
295
295
  return /* @__PURE__ */ React.createElement(
296
- _chunkAO22ZXHIjs.Router,
296
+ _chunkSZQUWNVJjs.Router,
297
297
  {
298
298
  basename,
299
299
  children,
@@ -312,7 +312,7 @@ function HashRouter({
312
312
  }) {
313
313
  let historyRef = React.useRef();
314
314
  if (historyRef.current == null) {
315
- historyRef.current = _chunkAO22ZXHIjs.createHashHistory.call(void 0, { window: window2, v5Compat: true });
315
+ historyRef.current = _chunkSZQUWNVJjs.createHashHistory.call(void 0, { window: window2, v5Compat: true });
316
316
  }
317
317
  let history = historyRef.current;
318
318
  let [state, setStateImpl] = React.useState({
@@ -331,7 +331,7 @@ function HashRouter({
331
331
  );
332
332
  React.useLayoutEffect(() => history.listen(setState), [history, setState]);
333
333
  return /* @__PURE__ */ React.createElement(
334
- _chunkAO22ZXHIjs.Router,
334
+ _chunkSZQUWNVJjs.Router,
335
335
  {
336
336
  basename,
337
337
  children,
@@ -364,7 +364,7 @@ function HistoryRouter({
364
364
  );
365
365
  React.useLayoutEffect(() => history.listen(setState), [history, setState]);
366
366
  return /* @__PURE__ */ React.createElement(
367
- _chunkAO22ZXHIjs.Router,
367
+ _chunkSZQUWNVJjs.Router,
368
368
  {
369
369
  basename,
370
370
  children,
@@ -393,12 +393,12 @@ var Link = React.forwardRef(
393
393
  unstable_defaultShouldRevalidate,
394
394
  ...rest
395
395
  }, forwardedRef) {
396
- let { basename, unstable_useTransitions } = React.useContext(_chunkAO22ZXHIjs.NavigationContext);
396
+ let { basename, unstable_useTransitions } = React.useContext(_chunkSZQUWNVJjs.NavigationContext);
397
397
  let isAbsolute = typeof to === "string" && ABSOLUTE_URL_REGEX.test(to);
398
- let parsed = _chunkAO22ZXHIjs.parseToInfo.call(void 0, to, basename);
398
+ let parsed = _chunkSZQUWNVJjs.parseToInfo.call(void 0, to, basename);
399
399
  to = parsed.to;
400
- let href = _chunkAO22ZXHIjs.useHref.call(void 0, to, { relative });
401
- let [shouldPrefetch, prefetchRef, prefetchHandlers] = _chunkAO22ZXHIjs.usePrefetchBehavior.call(void 0,
400
+ let href = _chunkSZQUWNVJjs.useHref.call(void 0, to, { relative });
401
+ let [shouldPrefetch, prefetchRef, prefetchHandlers] = _chunkSZQUWNVJjs.usePrefetchBehavior.call(void 0,
402
402
  prefetch,
403
403
  rest
404
404
  );
@@ -427,13 +427,13 @@ var Link = React.forwardRef(
427
427
  ...prefetchHandlers,
428
428
  href: parsed.absoluteURL || href,
429
429
  onClick: parsed.isExternal || reloadDocument ? onClick : handleClick,
430
- ref: _chunkAO22ZXHIjs.mergeRefs.call(void 0, forwardedRef, prefetchRef),
430
+ ref: _chunkSZQUWNVJjs.mergeRefs.call(void 0, forwardedRef, prefetchRef),
431
431
  target,
432
432
  "data-discover": !isAbsolute && discover === "render" ? "true" : void 0
433
433
  }
434
434
  )
435
435
  );
436
- return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React.createElement(React.Fragment, null, link, /* @__PURE__ */ React.createElement(_chunkAO22ZXHIjs.PrefetchPageLinks, { page: href })) : link;
436
+ return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React.createElement(React.Fragment, null, link, /* @__PURE__ */ React.createElement(_chunkSZQUWNVJjs.PrefetchPageLinks, { page: href })) : link;
437
437
  }
438
438
  );
439
439
  Link.displayName = "Link";
@@ -449,10 +449,10 @@ var NavLink = React.forwardRef(
449
449
  children,
450
450
  ...rest
451
451
  }, ref) {
452
- let path = _chunkAO22ZXHIjs.useResolvedPath.call(void 0, to, { relative: rest.relative });
453
- let location = _chunkAO22ZXHIjs.useLocation.call(void 0, );
454
- let routerState = React.useContext(_chunkAO22ZXHIjs.DataRouterStateContext);
455
- let { navigator, basename } = React.useContext(_chunkAO22ZXHIjs.NavigationContext);
452
+ let path = _chunkSZQUWNVJjs.useResolvedPath.call(void 0, to, { relative: rest.relative });
453
+ let location = _chunkSZQUWNVJjs.useLocation.call(void 0, );
454
+ let routerState = React.useContext(_chunkSZQUWNVJjs.DataRouterStateContext);
455
+ let { navigator, basename } = React.useContext(_chunkSZQUWNVJjs.NavigationContext);
456
456
  let isTransitioning = routerState != null && // Conditional usage is OK here because the usage of a data router is static
457
457
  // eslint-disable-next-line react-hooks/rules-of-hooks
458
458
  useViewTransitionState(path) && viewTransition === true;
@@ -465,7 +465,7 @@ var NavLink = React.forwardRef(
465
465
  toPathname = toPathname.toLowerCase();
466
466
  }
467
467
  if (nextLocationPathname && basename) {
468
- nextLocationPathname = _chunkAO22ZXHIjs.stripBasename.call(void 0, nextLocationPathname, basename) || nextLocationPathname;
468
+ nextLocationPathname = _chunkSZQUWNVJjs.stripBasename.call(void 0, nextLocationPathname, basename) || nextLocationPathname;
469
469
  }
470
470
  const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length;
471
471
  let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/";
@@ -521,7 +521,7 @@ var Form = React.forwardRef(
521
521
  unstable_defaultShouldRevalidate,
522
522
  ...props
523
523
  }, forwardedRef) => {
524
- let { unstable_useTransitions } = React.useContext(_chunkAO22ZXHIjs.NavigationContext);
524
+ let { unstable_useTransitions } = React.useContext(_chunkSZQUWNVJjs.NavigationContext);
525
525
  let submit = useSubmit();
526
526
  let formAction = useFormAction(action, { relative });
527
527
  let formMethod = method.toLowerCase() === "get" ? "get" : "post";
@@ -568,10 +568,10 @@ function ScrollRestoration({
568
568
  storageKey,
569
569
  ...props
570
570
  }) {
571
- let remixContext = React.useContext(_chunkAO22ZXHIjs.FrameworkContext);
572
- let { basename } = React.useContext(_chunkAO22ZXHIjs.NavigationContext);
573
- let location = _chunkAO22ZXHIjs.useLocation.call(void 0, );
574
- let matches = _chunkAO22ZXHIjs.useMatches.call(void 0, );
571
+ let remixContext = React.useContext(_chunkSZQUWNVJjs.FrameworkContext);
572
+ let { basename } = React.useContext(_chunkSZQUWNVJjs.NavigationContext);
573
+ let location = _chunkSZQUWNVJjs.useLocation.call(void 0, );
574
+ let matches = _chunkSZQUWNVJjs.useMatches.call(void 0, );
575
575
  useScrollRestoration({ getKey, storageKey });
576
576
  let ssrKey = React.useMemo(
577
577
  () => {
@@ -625,13 +625,13 @@ function getDataRouterConsoleError(hookName) {
625
625
  return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
626
626
  }
627
627
  function useDataRouterContext(hookName) {
628
- let ctx = React.useContext(_chunkAO22ZXHIjs.DataRouterContext);
629
- _chunkAO22ZXHIjs.invariant.call(void 0, ctx, getDataRouterConsoleError(hookName));
628
+ let ctx = React.useContext(_chunkSZQUWNVJjs.DataRouterContext);
629
+ _chunkSZQUWNVJjs.invariant.call(void 0, ctx, getDataRouterConsoleError(hookName));
630
630
  return ctx;
631
631
  }
632
632
  function useDataRouterState(hookName) {
633
- let state = React.useContext(_chunkAO22ZXHIjs.DataRouterStateContext);
634
- _chunkAO22ZXHIjs.invariant.call(void 0, state, getDataRouterConsoleError(hookName));
633
+ let state = React.useContext(_chunkSZQUWNVJjs.DataRouterStateContext);
634
+ _chunkSZQUWNVJjs.invariant.call(void 0, state, getDataRouterConsoleError(hookName));
635
635
  return state;
636
636
  }
637
637
  function useLinkClickHandler(to, {
@@ -644,14 +644,14 @@ function useLinkClickHandler(to, {
644
644
  unstable_defaultShouldRevalidate,
645
645
  unstable_useTransitions
646
646
  } = {}) {
647
- let navigate = _chunkAO22ZXHIjs.useNavigate.call(void 0, );
648
- let location = _chunkAO22ZXHIjs.useLocation.call(void 0, );
649
- let path = _chunkAO22ZXHIjs.useResolvedPath.call(void 0, to, { relative });
647
+ let navigate = _chunkSZQUWNVJjs.useNavigate.call(void 0, );
648
+ let location = _chunkSZQUWNVJjs.useLocation.call(void 0, );
649
+ let path = _chunkSZQUWNVJjs.useResolvedPath.call(void 0, to, { relative });
650
650
  return React.useCallback(
651
651
  (event) => {
652
652
  if (shouldProcessLinkClick(event, target)) {
653
653
  event.preventDefault();
654
- let replace = replaceProp !== void 0 ? replaceProp : _chunkAO22ZXHIjs.createPath.call(void 0, location) === _chunkAO22ZXHIjs.createPath.call(void 0, path);
654
+ let replace = replaceProp !== void 0 ? replaceProp : _chunkSZQUWNVJjs.createPath.call(void 0, location) === _chunkSZQUWNVJjs.createPath.call(void 0, path);
655
655
  let doNavigate = () => navigate(to, {
656
656
  replace,
657
657
  state,
@@ -684,13 +684,13 @@ function useLinkClickHandler(to, {
684
684
  );
685
685
  }
686
686
  function useSearchParams(defaultInit) {
687
- _chunkAO22ZXHIjs.warning.call(void 0,
687
+ _chunkSZQUWNVJjs.warning.call(void 0,
688
688
  typeof URLSearchParams !== "undefined",
689
689
  `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.`
690
690
  );
691
691
  let defaultSearchParamsRef = React.useRef(createSearchParams(defaultInit));
692
692
  let hasSetSearchParamsRef = React.useRef(false);
693
- let location = _chunkAO22ZXHIjs.useLocation.call(void 0, );
693
+ let location = _chunkSZQUWNVJjs.useLocation.call(void 0, );
694
694
  let searchParams = React.useMemo(
695
695
  () => (
696
696
  // Only merge in the defaults if we haven't yet called setSearchParams.
@@ -703,7 +703,7 @@ function useSearchParams(defaultInit) {
703
703
  ),
704
704
  [location.search]
705
705
  );
706
- let navigate = _chunkAO22ZXHIjs.useNavigate.call(void 0, );
706
+ let navigate = _chunkSZQUWNVJjs.useNavigate.call(void 0, );
707
707
  let setSearchParams = React.useCallback(
708
708
  (nextInit, navigateOptions) => {
709
709
  const newSearchParams = createSearchParams(
@@ -720,8 +720,8 @@ var fetcherId = 0;
720
720
  var getUniqueFetcherId = () => `__${String(++fetcherId)}__`;
721
721
  function useSubmit() {
722
722
  let { router } = useDataRouterContext("useSubmit" /* UseSubmit */);
723
- let { basename } = React.useContext(_chunkAO22ZXHIjs.NavigationContext);
724
- let currentRouteId = _chunkAO22ZXHIjs.useRouteId.call(void 0, );
723
+ let { basename } = React.useContext(_chunkSZQUWNVJjs.NavigationContext);
724
+ let currentRouteId = _chunkSZQUWNVJjs.useRouteId.call(void 0, );
725
725
  let routerFetch = router.fetch;
726
726
  let routerNavigate = router.navigate;
727
727
  return React.useCallback(
@@ -761,12 +761,12 @@ function useSubmit() {
761
761
  );
762
762
  }
763
763
  function useFormAction(action, { relative } = {}) {
764
- let { basename } = React.useContext(_chunkAO22ZXHIjs.NavigationContext);
765
- let routeContext = React.useContext(_chunkAO22ZXHIjs.RouteContext);
766
- _chunkAO22ZXHIjs.invariant.call(void 0, routeContext, "useFormAction must be used inside a RouteContext");
764
+ let { basename } = React.useContext(_chunkSZQUWNVJjs.NavigationContext);
765
+ let routeContext = React.useContext(_chunkSZQUWNVJjs.RouteContext);
766
+ _chunkSZQUWNVJjs.invariant.call(void 0, routeContext, "useFormAction must be used inside a RouteContext");
767
767
  let [match] = routeContext.matches.slice(-1);
768
- let path = { ..._chunkAO22ZXHIjs.useResolvedPath.call(void 0, action ? action : ".", { relative }) };
769
- let location = _chunkAO22ZXHIjs.useLocation.call(void 0, );
768
+ let path = { ..._chunkSZQUWNVJjs.useResolvedPath.call(void 0, action ? action : ".", { relative }) };
769
+ let location = _chunkSZQUWNVJjs.useLocation.call(void 0, );
770
770
  if (action == null) {
771
771
  path.search = location.search;
772
772
  let params = new URLSearchParams(path.search);
@@ -783,21 +783,21 @@ function useFormAction(action, { relative } = {}) {
783
783
  path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
784
784
  }
785
785
  if (basename !== "/") {
786
- path.pathname = path.pathname === "/" ? basename : _chunkAO22ZXHIjs.joinPaths.call(void 0, [basename, path.pathname]);
786
+ path.pathname = path.pathname === "/" ? basename : _chunkSZQUWNVJjs.joinPaths.call(void 0, [basename, path.pathname]);
787
787
  }
788
- return _chunkAO22ZXHIjs.createPath.call(void 0, path);
788
+ return _chunkSZQUWNVJjs.createPath.call(void 0, path);
789
789
  }
790
790
  function useFetcher({
791
791
  key
792
792
  } = {}) {
793
793
  let { router } = useDataRouterContext("useFetcher" /* UseFetcher */);
794
794
  let state = useDataRouterState("useFetcher" /* UseFetcher */);
795
- let fetcherData = React.useContext(_chunkAO22ZXHIjs.FetchersContext);
796
- let route = React.useContext(_chunkAO22ZXHIjs.RouteContext);
795
+ let fetcherData = React.useContext(_chunkSZQUWNVJjs.FetchersContext);
796
+ let route = React.useContext(_chunkSZQUWNVJjs.RouteContext);
797
797
  let routeId = _optionalChain([route, 'access', _23 => _23.matches, 'access', _24 => _24[route.matches.length - 1], 'optionalAccess', _25 => _25.route, 'access', _26 => _26.id]);
798
- _chunkAO22ZXHIjs.invariant.call(void 0, fetcherData, `useFetcher must be used inside a FetchersContext`);
799
- _chunkAO22ZXHIjs.invariant.call(void 0, route, `useFetcher must be used inside a RouteContext`);
800
- _chunkAO22ZXHIjs.invariant.call(void 0,
798
+ _chunkSZQUWNVJjs.invariant.call(void 0, fetcherData, `useFetcher must be used inside a FetchersContext`);
799
+ _chunkSZQUWNVJjs.invariant.call(void 0, route, `useFetcher must be used inside a RouteContext`);
800
+ _chunkSZQUWNVJjs.invariant.call(void 0,
801
801
  routeId != null,
802
802
  `useFetcher can only be used on routes that contain a unique "id"`
803
803
  );
@@ -813,7 +813,7 @@ function useFetcher({
813
813
  }, [deleteFetcher, getFetcher, fetcherKey]);
814
814
  let load = React.useCallback(
815
815
  async (href, opts) => {
816
- _chunkAO22ZXHIjs.invariant.call(void 0, routeId, "No routeId available for fetcher.load()");
816
+ _chunkSZQUWNVJjs.invariant.call(void 0, routeId, "No routeId available for fetcher.load()");
817
817
  await routerFetch(fetcherKey, routeId, href, opts);
818
818
  },
819
819
  [fetcherKey, routeId, routerFetch]
@@ -842,7 +842,7 @@ function useFetcher({
842
842
  FetcherForm2.displayName = "fetcher.Form";
843
843
  return FetcherForm2;
844
844
  }, [fetcherKey]);
845
- let fetcher = state.fetchers.get(fetcherKey) || _chunkAO22ZXHIjs.IDLE_FETCHER;
845
+ let fetcher = state.fetchers.get(fetcherKey) || _chunkSZQUWNVJjs.IDLE_FETCHER;
846
846
  let data = fetcherData.get(fetcherKey);
847
847
  let fetcherWithComponents = React.useMemo(
848
848
  () => ({
@@ -873,7 +873,7 @@ function getScrollRestorationKey(location, matches, basename, getKey) {
873
873
  key = getKey(
874
874
  {
875
875
  ...location,
876
- pathname: _chunkAO22ZXHIjs.stripBasename.call(void 0, location.pathname, basename) || location.pathname
876
+ pathname: _chunkSZQUWNVJjs.stripBasename.call(void 0, location.pathname, basename) || location.pathname
877
877
  },
878
878
  matches
879
879
  );
@@ -894,10 +894,10 @@ function useScrollRestoration({
894
894
  let { restoreScrollPosition, preventScrollReset } = useDataRouterState(
895
895
  "useScrollRestoration" /* UseScrollRestoration */
896
896
  );
897
- let { basename } = React.useContext(_chunkAO22ZXHIjs.NavigationContext);
898
- let location = _chunkAO22ZXHIjs.useLocation.call(void 0, );
899
- let matches = _chunkAO22ZXHIjs.useMatches.call(void 0, );
900
- let navigation = _chunkAO22ZXHIjs.useNavigation.call(void 0, );
897
+ let { basename } = React.useContext(_chunkSZQUWNVJjs.NavigationContext);
898
+ let location = _chunkSZQUWNVJjs.useLocation.call(void 0, );
899
+ let matches = _chunkSZQUWNVJjs.useMatches.call(void 0, );
900
+ let navigation = _chunkSZQUWNVJjs.useNavigation.call(void 0, );
901
901
  React.useEffect(() => {
902
902
  window.history.scrollRestoration = "manual";
903
903
  return () => {
@@ -916,7 +916,7 @@ function useScrollRestoration({
916
916
  JSON.stringify(savedScrollPositions)
917
917
  );
918
918
  } catch (error) {
919
- _chunkAO22ZXHIjs.warning.call(void 0,
919
+ _chunkSZQUWNVJjs.warning.call(void 0,
920
920
  false,
921
921
  `Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${error}).`
922
922
  );
@@ -963,7 +963,7 @@ function useScrollRestoration({
963
963
  }
964
964
  }
965
965
  } catch (e2) {
966
- _chunkAO22ZXHIjs.warning.call(void 0,
966
+ _chunkSZQUWNVJjs.warning.call(void 0,
967
967
  false,
968
968
  `"${location.hash.slice(
969
969
  1
@@ -1001,7 +1001,7 @@ function usePrompt({
1001
1001
  when,
1002
1002
  message
1003
1003
  }) {
1004
- let blocker = _chunkAO22ZXHIjs.useBlocker.call(void 0, when);
1004
+ let blocker = _chunkSZQUWNVJjs.useBlocker.call(void 0, when);
1005
1005
  React.useEffect(() => {
1006
1006
  if (blocker.state === "blocked") {
1007
1007
  let proceed = window.confirm(message);
@@ -1019,21 +1019,21 @@ function usePrompt({
1019
1019
  }, [blocker, when]);
1020
1020
  }
1021
1021
  function useViewTransitionState(to, { relative } = {}) {
1022
- let vtContext = React.useContext(_chunkAO22ZXHIjs.ViewTransitionContext);
1023
- _chunkAO22ZXHIjs.invariant.call(void 0,
1022
+ let vtContext = React.useContext(_chunkSZQUWNVJjs.ViewTransitionContext);
1023
+ _chunkSZQUWNVJjs.invariant.call(void 0,
1024
1024
  vtContext != null,
1025
1025
  "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
1026
1026
  );
1027
1027
  let { basename } = useDataRouterContext(
1028
1028
  "useViewTransitionState" /* useViewTransitionState */
1029
1029
  );
1030
- let path = _chunkAO22ZXHIjs.useResolvedPath.call(void 0, to, { relative });
1030
+ let path = _chunkSZQUWNVJjs.useResolvedPath.call(void 0, to, { relative });
1031
1031
  if (!vtContext.isTransitioning) {
1032
1032
  return false;
1033
1033
  }
1034
- let currentPath = _chunkAO22ZXHIjs.stripBasename.call(void 0, vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
1035
- let nextPath = _chunkAO22ZXHIjs.stripBasename.call(void 0, vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
1036
- return _chunkAO22ZXHIjs.matchPath.call(void 0, path.pathname, nextPath) != null || _chunkAO22ZXHIjs.matchPath.call(void 0, path.pathname, currentPath) != null;
1034
+ let currentPath = _chunkSZQUWNVJjs.stripBasename.call(void 0, vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
1035
+ let nextPath = _chunkSZQUWNVJjs.stripBasename.call(void 0, vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
1036
+ return _chunkSZQUWNVJjs.matchPath.call(void 0, path.pathname, nextPath) != null || _chunkSZQUWNVJjs.matchPath.call(void 0, path.pathname, currentPath) != null;
1037
1037
  }
1038
1038
 
1039
1039
  // lib/dom/server.tsx
@@ -1044,7 +1044,7 @@ function StaticRouter({
1044
1044
  location: locationProp = "/"
1045
1045
  }) {
1046
1046
  if (typeof locationProp === "string") {
1047
- locationProp = _chunkAO22ZXHIjs.parsePath.call(void 0, locationProp);
1047
+ locationProp = _chunkSZQUWNVJjs.parsePath.call(void 0, locationProp);
1048
1048
  }
1049
1049
  let action = "POP" /* Pop */;
1050
1050
  let location = {
@@ -1056,7 +1056,7 @@ function StaticRouter({
1056
1056
  };
1057
1057
  let staticNavigator = getStatelessNavigator();
1058
1058
  return /* @__PURE__ */ React2.createElement(
1059
- _chunkAO22ZXHIjs.Router,
1059
+ _chunkSZQUWNVJjs.Router,
1060
1060
  {
1061
1061
  basename,
1062
1062
  children,
@@ -1074,7 +1074,7 @@ function StaticRouterProvider({
1074
1074
  hydrate = true,
1075
1075
  nonce
1076
1076
  }) {
1077
- _chunkAO22ZXHIjs.invariant.call(void 0,
1077
+ _chunkSZQUWNVJjs.invariant.call(void 0,
1078
1078
  router && context,
1079
1079
  "You must provide `router` and `context` to <StaticRouterProvider>"
1080
1080
  );
@@ -1097,8 +1097,8 @@ function StaticRouterProvider({
1097
1097
  hydrateScript = `window.__staticRouterHydrationData = JSON.parse(${json});`;
1098
1098
  }
1099
1099
  let { state } = dataRouterContext.router;
1100
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(_chunkAO22ZXHIjs.DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React2.createElement(_chunkAO22ZXHIjs.DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React2.createElement(_chunkAO22ZXHIjs.FetchersContext.Provider, { value: fetchersContext }, /* @__PURE__ */ React2.createElement(_chunkAO22ZXHIjs.ViewTransitionContext.Provider, { value: { isTransitioning: false } }, /* @__PURE__ */ React2.createElement(
1101
- _chunkAO22ZXHIjs.Router,
1100
+ return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(_chunkSZQUWNVJjs.DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React2.createElement(_chunkSZQUWNVJjs.DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React2.createElement(_chunkSZQUWNVJjs.FetchersContext.Provider, { value: fetchersContext }, /* @__PURE__ */ React2.createElement(_chunkSZQUWNVJjs.ViewTransitionContext.Provider, { value: { isTransitioning: false } }, /* @__PURE__ */ React2.createElement(
1101
+ _chunkSZQUWNVJjs.Router,
1102
1102
  {
1103
1103
  basename: dataRouterContext.basename,
1104
1104
  location: state.location,
@@ -1129,14 +1129,14 @@ function DataRoutes({
1129
1129
  future,
1130
1130
  state
1131
1131
  }) {
1132
- return _chunkAO22ZXHIjs.useRoutesImpl.call(void 0, routes, void 0, state, void 0, future);
1132
+ return _chunkSZQUWNVJjs.useRoutesImpl.call(void 0, routes, void 0, state, void 0, future);
1133
1133
  }
1134
1134
  function serializeErrors(errors) {
1135
1135
  if (!errors) return null;
1136
1136
  let entries = Object.entries(errors);
1137
1137
  let serialized = {};
1138
1138
  for (let [key, val] of entries) {
1139
- if (_chunkAO22ZXHIjs.isRouteErrorResponse.call(void 0, val)) {
1139
+ if (_chunkSZQUWNVJjs.isRouteErrorResponse.call(void 0, val)) {
1140
1140
  serialized[key] = { ...val, __type: "RouteErrorResponse" };
1141
1141
  } else if (val instanceof Error) {
1142
1142
  serialized[key] = {
@@ -1186,16 +1186,16 @@ function getStatelessNavigator() {
1186
1186
  };
1187
1187
  }
1188
1188
  function createStaticHandler2(routes, opts) {
1189
- return _chunkAO22ZXHIjs.createStaticHandler.call(void 0, routes, {
1189
+ return _chunkSZQUWNVJjs.createStaticHandler.call(void 0, routes, {
1190
1190
  ...opts,
1191
- mapRouteProperties: _chunkAO22ZXHIjs.mapRouteProperties
1191
+ mapRouteProperties: _chunkSZQUWNVJjs.mapRouteProperties
1192
1192
  });
1193
1193
  }
1194
1194
  function createStaticRouter(routes, context, opts = {}) {
1195
1195
  let manifest = {};
1196
- let dataRoutes = _chunkAO22ZXHIjs.convertRoutesToDataRoutes.call(void 0,
1196
+ let dataRoutes = _chunkSZQUWNVJjs.convertRoutesToDataRoutes.call(void 0,
1197
1197
  routes,
1198
- _chunkAO22ZXHIjs.mapRouteProperties,
1198
+ _chunkSZQUWNVJjs.mapRouteProperties,
1199
1199
  void 0,
1200
1200
  manifest
1201
1201
  );
@@ -1226,7 +1226,7 @@ function createStaticRouter(routes, context, opts = {}) {
1226
1226
  actionData: context.actionData,
1227
1227
  errors: context.errors,
1228
1228
  initialized: true,
1229
- navigation: _chunkAO22ZXHIjs.IDLE_NAVIGATION,
1229
+ navigation: _chunkSZQUWNVJjs.IDLE_NAVIGATION,
1230
1230
  restoreScrollPosition: null,
1231
1231
  preventScrollReset: false,
1232
1232
  revalidation: "idle",
@@ -1261,7 +1261,7 @@ function createStaticRouter(routes, context, opts = {}) {
1261
1261
  createHref,
1262
1262
  encodeLocation,
1263
1263
  getFetcher() {
1264
- return _chunkAO22ZXHIjs.IDLE_FETCHER;
1264
+ return _chunkSZQUWNVJjs.IDLE_FETCHER;
1265
1265
  },
1266
1266
  deleteFetcher() {
1267
1267
  throw msg("deleteFetcher");
@@ -1273,7 +1273,7 @@ function createStaticRouter(routes, context, opts = {}) {
1273
1273
  throw msg("dispose");
1274
1274
  },
1275
1275
  getBlocker() {
1276
- return _chunkAO22ZXHIjs.IDLE_BLOCKER;
1276
+ return _chunkSZQUWNVJjs.IDLE_BLOCKER;
1277
1277
  },
1278
1278
  deleteBlocker() {
1279
1279
  throw msg("deleteBlocker");
@@ -1291,10 +1291,10 @@ function createStaticRouter(routes, context, opts = {}) {
1291
1291
  };
1292
1292
  }
1293
1293
  function createHref(to) {
1294
- return typeof to === "string" ? to : _chunkAO22ZXHIjs.createPath.call(void 0, to);
1294
+ return typeof to === "string" ? to : _chunkSZQUWNVJjs.createPath.call(void 0, to);
1295
1295
  }
1296
1296
  function encodeLocation(to) {
1297
- let href = typeof to === "string" ? to : _chunkAO22ZXHIjs.createPath.call(void 0, to);
1297
+ let href = typeof to === "string" ? to : _chunkSZQUWNVJjs.createPath.call(void 0, to);
1298
1298
  href = href.replace(/ $/, "%20");
1299
1299
  let encoded = ABSOLUTE_URL_REGEX2.test(href) ? new URL(href) : new URL(href, "http://localhost");
1300
1300
  return {
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }/**
2
- * react-router v7.11.0-pre.0
2
+ * react-router v7.11.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -14,7 +14,7 @@
14
14
 
15
15
 
16
16
 
17
- var _chunkAO22ZXHIjs = require('./chunk-AO22ZXHI.js');
17
+ var _chunkSZQUWNVJjs = require('./chunk-SZQUWNVJ.js');
18
18
 
19
19
  // lib/dom/ssr/hydration.tsx
20
20
  function getHydrationData({
@@ -29,12 +29,12 @@ function getHydrationData({
29
29
  ...state,
30
30
  loaderData: { ...state.loaderData }
31
31
  };
32
- let initialMatches = _chunkAO22ZXHIjs.matchRoutes.call(void 0, routes, location, basename);
32
+ let initialMatches = _chunkSZQUWNVJjs.matchRoutes.call(void 0, routes, location, basename);
33
33
  if (initialMatches) {
34
34
  for (let match of initialMatches) {
35
35
  let routeId = match.route.id;
36
36
  let routeInfo = getRouteInfo(routeId);
37
- if (_chunkAO22ZXHIjs.shouldHydrateRouteLoader.call(void 0,
37
+ if (_chunkSZQUWNVJjs.shouldHydrateRouteLoader.call(void 0,
38
38
  routeId,
39
39
  routeInfo.clientLoader,
40
40
  routeInfo.hasLoader,
@@ -112,7 +112,7 @@ function RSCDefaultRootErrorBoundaryImpl({
112
112
  }
113
113
  }
114
114
  );
115
- if (_chunkAO22ZXHIjs.isRouteErrorResponse.call(void 0, error)) {
115
+ if (_chunkSZQUWNVJjs.isRouteErrorResponse.call(void 0, error)) {
116
116
  return /* @__PURE__ */ _react2.default.createElement(
117
117
  ErrorWrapper,
118
118
  {
@@ -120,7 +120,7 @@ function RSCDefaultRootErrorBoundaryImpl({
120
120
  title: "Unhandled Thrown Response!"
121
121
  },
122
122
  /* @__PURE__ */ _react2.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
123
- _chunkAO22ZXHIjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
123
+ _chunkSZQUWNVJjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
124
124
  );
125
125
  }
126
126
  let errorInstance;
@@ -146,7 +146,7 @@ function RSCDefaultRootErrorBoundaryImpl({
146
146
  function RSCDefaultRootErrorBoundary({
147
147
  hasRootLayout
148
148
  }) {
149
- let error = _chunkAO22ZXHIjs.useRouteError.call(void 0, );
149
+ let error = _chunkSZQUWNVJjs.useRouteError.call(void 0, );
150
150
  if (hasRootLayout === void 0) {
151
151
  throw new Error("Missing 'hasRootLayout' prop");
152
152
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.11.0-pre.0
2
+ * react-router v7.11.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -9649,7 +9649,7 @@ var isBrowser2 = typeof window !== "undefined" && typeof window.document !== "un
9649
9649
  try {
9650
9650
  if (isBrowser2) {
9651
9651
  window.__reactRouterVersion = // @ts-expect-error
9652
- "7.11.0-pre.0";
9652
+ "7.11.0";
9653
9653
  }
9654
9654
  } catch (e) {
9655
9655
  }
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
2
- * react-router v7.11.0-pre.0
2
+ * react-router v7.11.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.11.0-pre.0
2
+ * react-router v7.11.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -51,7 +51,7 @@ import {
51
51
  withComponentProps,
52
52
  withErrorBoundaryProps,
53
53
  withHydrateFallbackProps
54
- } from "./chunk-IDHO4Q57.mjs";
54
+ } from "./chunk-JMJ3UQ3L.mjs";
55
55
 
56
56
  // lib/dom/ssr/server.tsx
57
57
  import * as React from "react";