react-router 7.14.0 → 7.14.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.
Files changed (72) hide show
  1. package/CHANGELOG.md +17 -24
  2. package/dist/development/{browser-C9Ar1yxG.d.ts → browser-CtktEGQs.d.ts} +2 -2
  3. package/dist/development/{browser-vtIR1Kpe.d.mts → browser-D-3-U2Jj.d.mts} +2 -2
  4. package/dist/development/{chunk-NXTEWSJO.js → chunk-3F6IB66O.js} +99 -99
  5. package/dist/development/{chunk-WAVMRYR2.js → chunk-7VLQJKNG.js} +7 -7
  6. package/dist/development/{chunk-2UH5WJXA.mjs → chunk-BFXCU3MI.mjs} +2 -2
  7. package/dist/development/{chunk-QFMPRPBF.mjs → chunk-OE4NN4TA.mjs} +24 -14
  8. package/dist/development/{chunk-IK6APEEG.js → chunk-YMKMFAYZ.js} +23 -13
  9. package/dist/{production/context-phCt_zmH.d.mts → development/context-BzhbVly6.d.mts} +1 -1
  10. package/dist/development/dom-export.d.mts +3 -3
  11. package/dist/development/dom-export.d.ts +3 -3
  12. package/dist/development/dom-export.js +27 -27
  13. package/dist/development/dom-export.mjs +3 -3
  14. package/dist/development/{index-react-server-client-luDbagNU.d.ts → index-react-server-client-CimaPp9o.d.ts} +2 -2
  15. package/dist/{production/index-react-server-client-BwWaHAr3.d.mts → development/index-react-server-client-WSaoxloq.d.mts} +2 -2
  16. package/dist/development/index-react-server-client.d.mts +3 -3
  17. package/dist/development/index-react-server-client.d.ts +3 -3
  18. package/dist/development/index-react-server-client.js +4 -4
  19. package/dist/development/index-react-server-client.mjs +2 -2
  20. package/dist/development/index-react-server.d.mts +6 -0
  21. package/dist/development/index-react-server.d.ts +6 -0
  22. package/dist/development/index-react-server.js +9 -6
  23. package/dist/development/index-react-server.mjs +9 -6
  24. package/dist/development/index.d.mts +10 -10
  25. package/dist/development/index.d.ts +10 -10
  26. package/dist/development/index.js +82 -82
  27. package/dist/development/index.mjs +3 -3
  28. package/dist/{production/instrumentation-BYr6ff5D.d.ts → development/instrumentation-CMVbvxj9.d.ts} +1 -1
  29. package/dist/development/lib/types/internal.d.mts +2 -2
  30. package/dist/development/lib/types/internal.d.ts +2 -2
  31. package/dist/development/lib/types/internal.js +1 -1
  32. package/dist/development/lib/types/internal.mjs +1 -1
  33. package/dist/development/{register-CkcGwv27.d.ts → register-D1WlEpq9.d.ts} +1 -1
  34. package/dist/development/{register-CTxsJBKQ.d.mts → register-aE9ob3TK.d.mts} +1 -1
  35. package/dist/development/{routeModules-CA7kSxJJ.d.ts → routeModules-CM_clkdE.d.ts} +6 -0
  36. package/dist/development/{routeModules-BRrCYrSL.d.mts → routeModules-Djumx26z.d.mts} +6 -0
  37. package/dist/production/{browser-C9Ar1yxG.d.ts → browser-CtktEGQs.d.ts} +2 -2
  38. package/dist/production/{browser-vtIR1Kpe.d.mts → browser-D-3-U2Jj.d.mts} +2 -2
  39. package/dist/production/{chunk-355DUZMC.js → chunk-3SUPTI2U.js} +7 -7
  40. package/dist/production/{chunk-X5LK27NZ.mjs → chunk-G5ZWO7Q6.mjs} +2 -2
  41. package/dist/production/{chunk-FPT5DLVJ.js → chunk-LIOP3ILM.js} +99 -99
  42. package/dist/production/{chunk-HZQGQD2X.mjs → chunk-SPR7R4GU.mjs} +24 -14
  43. package/dist/production/{chunk-4TJ7T2OQ.js → chunk-UVEQGZIH.js} +23 -13
  44. package/dist/{development/context-phCt_zmH.d.mts → production/context-BzhbVly6.d.mts} +1 -1
  45. package/dist/production/dom-export.d.mts +3 -3
  46. package/dist/production/dom-export.d.ts +3 -3
  47. package/dist/production/dom-export.js +27 -27
  48. package/dist/production/dom-export.mjs +3 -3
  49. package/dist/production/{index-react-server-client-luDbagNU.d.ts → index-react-server-client-CimaPp9o.d.ts} +2 -2
  50. package/dist/{development/index-react-server-client-BwWaHAr3.d.mts → production/index-react-server-client-WSaoxloq.d.mts} +2 -2
  51. package/dist/production/index-react-server-client.d.mts +3 -3
  52. package/dist/production/index-react-server-client.d.ts +3 -3
  53. package/dist/production/index-react-server-client.js +4 -4
  54. package/dist/production/index-react-server-client.mjs +2 -2
  55. package/dist/production/index-react-server.d.mts +6 -0
  56. package/dist/production/index-react-server.d.ts +6 -0
  57. package/dist/production/index-react-server.js +9 -6
  58. package/dist/production/index-react-server.mjs +9 -6
  59. package/dist/production/index.d.mts +10 -10
  60. package/dist/production/index.d.ts +10 -10
  61. package/dist/production/index.js +82 -82
  62. package/dist/production/index.mjs +3 -3
  63. package/dist/{development/instrumentation-BYr6ff5D.d.ts → production/instrumentation-CMVbvxj9.d.ts} +1 -1
  64. package/dist/production/lib/types/internal.d.mts +2 -2
  65. package/dist/production/lib/types/internal.d.ts +2 -2
  66. package/dist/production/lib/types/internal.js +1 -1
  67. package/dist/production/lib/types/internal.mjs +1 -1
  68. package/dist/production/{register-CkcGwv27.d.ts → register-D1WlEpq9.d.ts} +1 -1
  69. package/dist/production/{register-CTxsJBKQ.d.mts → register-aE9ob3TK.d.mts} +1 -1
  70. package/dist/production/{routeModules-CA7kSxJJ.d.ts → routeModules-CM_clkdE.d.ts} +6 -0
  71. package/dist/production/{routeModules-BRrCYrSL.d.mts → routeModules-Djumx26z.d.mts} +6 -0
  72. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.14.0
2
+ * react-router v7.14.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -845,7 +845,7 @@ function resolvePath(to, fromPathname = "/") {
845
845
  } = typeof to === "string" ? parsePath(to) : to;
846
846
  let pathname;
847
847
  if (toPathname) {
848
- toPathname = toPathname.replace(/\/\/+/g, "/");
848
+ toPathname = removeDoubleSlashes(toPathname);
849
849
  if (toPathname.startsWith("/")) {
850
850
  pathname = resolvePathname(toPathname.substring(1), "/");
851
851
  } else {
@@ -861,7 +861,7 @@ function resolvePath(to, fromPathname = "/") {
861
861
  };
862
862
  }
863
863
  function resolvePathname(relativePath, fromPathname) {
864
- let segments = fromPathname.replace(/\/+$/, "").split("/");
864
+ let segments = removeTrailingSlash(fromPathname).split("/");
865
865
  let relativeSegments = relativePath.split("/");
866
866
  relativeSegments.forEach((segment) => {
867
867
  if (segment === "..") {
@@ -932,8 +932,10 @@ function resolveTo(toArg, routePathnames, locationPathname, isPathRelative = fal
932
932
  }
933
933
  return path;
934
934
  }
935
- var joinPaths = (paths) => paths.join("/").replace(/\/\/+/g, "/");
936
- var normalizePathname = (pathname) => pathname.replace(/\/+$/, "").replace(/^\/*/, "/");
935
+ var removeDoubleSlashes = (path) => path.replace(/\/\/+/g, "/");
936
+ var joinPaths = (paths) => removeDoubleSlashes(paths.join("/"));
937
+ var removeTrailingSlash = (path) => path.replace(/\/+$/, "");
938
+ var normalizePathname = (pathname) => removeTrailingSlash(pathname).replace(/^\/*/, "/");
937
939
  var normalizeSearch = (search) => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
938
940
  var normalizeHash = (hash) => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
939
941
  var DataWithResponseInit = class {
@@ -987,7 +989,8 @@ function isRouteErrorResponse(error) {
987
989
  return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
988
990
  }
989
991
  function getRoutePattern(matches) {
990
- return matches.map((m) => m.route.path).filter(Boolean).join("/").replace(/\/\/*/g, "/") || "/";
992
+ let parts = matches.map((m) => m.route.path).filter(Boolean);
993
+ return joinPaths(parts) || "/";
991
994
  }
992
995
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
993
996
  function parseToInfo(_to, basename) {
@@ -5022,7 +5025,7 @@ function normalizeRedirectLocation(location, currentUrl, basename, historyInstan
5022
5025
  }
5023
5026
  let isSameBasename = stripBasename(url.pathname, basename) != null;
5024
5027
  if (url.origin === currentUrl.origin && isSameBasename) {
5025
- return url.pathname + url.search + url.hash;
5028
+ return removeDoubleSlashes(url.pathname) + url.search + url.hash;
5026
5029
  }
5027
5030
  }
5028
5031
  try {
@@ -6503,6 +6506,16 @@ function RouterProvider({
6503
6506
  ]
6504
6507
  );
6505
6508
  React3.useLayoutEffect(() => router.subscribe(setState), [router, setState]);
6509
+ let initialized = state.initialized;
6510
+ React3.useLayoutEffect(() => {
6511
+ if (!initialized && router.state.initialized) {
6512
+ setState(router.state, {
6513
+ deletedFetchers: [],
6514
+ flushSync: false,
6515
+ newErrors: null
6516
+ });
6517
+ }
6518
+ }, [initialized, setState, router.state]);
6506
6519
  React3.useEffect(() => {
6507
6520
  if (vtContext.isTransitioning && !vtContext.flushSync) {
6508
6521
  setRenderDfd(new Deferred());
@@ -8219,9 +8232,9 @@ function singleFetchUrl(reqUrl, basename, trailingSlashAware, extension) {
8219
8232
  if (url.pathname === "/") {
8220
8233
  url.pathname = `_root.${extension}`;
8221
8234
  } else if (basename && stripBasename(url.pathname, basename) === "/") {
8222
- url.pathname = `${basename.replace(/\/$/, "")}/_root.${extension}`;
8235
+ url.pathname = `${removeTrailingSlash(basename)}/_root.${extension}`;
8223
8236
  } else {
8224
- url.pathname = `${url.pathname.replace(/\/$/, "")}.${extension}`;
8237
+ url.pathname = `${removeTrailingSlash(url.pathname)}.${extension}`;
8225
8238
  }
8226
8239
  }
8227
8240
  return url;
@@ -9177,10 +9190,7 @@ function useFogOFWarDiscovery(router, manifest, routeModules, ssr, routeDiscover
9177
9190
  }
9178
9191
  function getManifestPath(_manifestPath, basename) {
9179
9192
  let manifestPath = _manifestPath || "/__manifest";
9180
- if (basename == null) {
9181
- return manifestPath;
9182
- }
9183
- return `${basename}${manifestPath}`.replace(/\/+/g, "/");
9193
+ return basename == null ? manifestPath : joinPaths([basename, manifestPath]);
9184
9194
  }
9185
9195
  var MANIFEST_VERSION_STORAGE_KEY = "react-router-manifest-version";
9186
9196
  async function fetchAndApplyManifestPatches(paths, errorReloadPath, manifest, routeModules, ssr, isSpaMode, basename, manifestPath, patchRoutes, signal) {
@@ -9970,7 +9980,7 @@ var isBrowser2 = typeof window !== "undefined" && typeof window.document !== "un
9970
9980
  try {
9971
9981
  if (isBrowser2) {
9972
9982
  window.__reactRouterVersion = // @ts-expect-error
9973
- "7.14.0";
9983
+ "7.14.1";
9974
9984
  }
9975
9985
  } catch (e) {
9976
9986
  }
@@ -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.14.0
2
+ * react-router v7.14.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -845,7 +845,7 @@ function resolvePath(to, fromPathname = "/") {
845
845
  } = typeof to === "string" ? parsePath(to) : to;
846
846
  let pathname;
847
847
  if (toPathname) {
848
- toPathname = toPathname.replace(/\/\/+/g, "/");
848
+ toPathname = removeDoubleSlashes(toPathname);
849
849
  if (toPathname.startsWith("/")) {
850
850
  pathname = resolvePathname(toPathname.substring(1), "/");
851
851
  } else {
@@ -861,7 +861,7 @@ function resolvePath(to, fromPathname = "/") {
861
861
  };
862
862
  }
863
863
  function resolvePathname(relativePath, fromPathname) {
864
- let segments = fromPathname.replace(/\/+$/, "").split("/");
864
+ let segments = removeTrailingSlash(fromPathname).split("/");
865
865
  let relativeSegments = relativePath.split("/");
866
866
  relativeSegments.forEach((segment) => {
867
867
  if (segment === "..") {
@@ -932,8 +932,10 @@ function resolveTo(toArg, routePathnames, locationPathname, isPathRelative = fal
932
932
  }
933
933
  return path;
934
934
  }
935
- var joinPaths = (paths) => paths.join("/").replace(/\/\/+/g, "/");
936
- var normalizePathname = (pathname) => pathname.replace(/\/+$/, "").replace(/^\/*/, "/");
935
+ var removeDoubleSlashes = (path) => path.replace(/\/\/+/g, "/");
936
+ var joinPaths = (paths) => removeDoubleSlashes(paths.join("/"));
937
+ var removeTrailingSlash = (path) => path.replace(/\/+$/, "");
938
+ var normalizePathname = (pathname) => removeTrailingSlash(pathname).replace(/^\/*/, "/");
937
939
  var normalizeSearch = (search) => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
938
940
  var normalizeHash = (hash) => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
939
941
  var DataWithResponseInit = class {
@@ -987,7 +989,8 @@ function isRouteErrorResponse(error) {
987
989
  return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
988
990
  }
989
991
  function getRoutePattern(matches) {
990
- return matches.map((m) => m.route.path).filter(Boolean).join("/").replace(/\/\/*/g, "/") || "/";
992
+ let parts = matches.map((m) => m.route.path).filter(Boolean);
993
+ return joinPaths(parts) || "/";
991
994
  }
992
995
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
993
996
  function parseToInfo(_to, basename) {
@@ -5022,7 +5025,7 @@ function normalizeRedirectLocation(location, currentUrl, basename, historyInstan
5022
5025
  }
5023
5026
  let isSameBasename = stripBasename(url.pathname, basename) != null;
5024
5027
  if (url.origin === currentUrl.origin && isSameBasename) {
5025
- return url.pathname + url.search + url.hash;
5028
+ return removeDoubleSlashes(url.pathname) + url.search + url.hash;
5026
5029
  }
5027
5030
  }
5028
5031
  try {
@@ -6628,9 +6631,9 @@ function singleFetchUrl(reqUrl, basename, trailingSlashAware, extension) {
6628
6631
  if (url.pathname === "/") {
6629
6632
  url.pathname = `_root.${extension}`;
6630
6633
  } else if (basename && stripBasename(url.pathname, basename) === "/") {
6631
- url.pathname = `${basename.replace(/\/$/, "")}/_root.${extension}`;
6634
+ url.pathname = `${removeTrailingSlash(basename)}/_root.${extension}`;
6632
6635
  } else {
6633
- url.pathname = `${url.pathname.replace(/\/$/, "")}.${extension}`;
6636
+ url.pathname = `${removeTrailingSlash(url.pathname)}.${extension}`;
6634
6637
  }
6635
6638
  }
6636
6639
  return url;
@@ -8330,10 +8333,7 @@ function useFogOFWarDiscovery(router, manifest, routeModules, ssr, routeDiscover
8330
8333
  }
8331
8334
  function getManifestPath(_manifestPath, basename) {
8332
8335
  let manifestPath = _manifestPath || "/__manifest";
8333
- if (basename == null) {
8334
- return manifestPath;
8335
- }
8336
- return `${basename}${manifestPath}`.replace(/\/+/g, "/");
8336
+ return basename == null ? manifestPath : joinPaths([basename, manifestPath]);
8337
8337
  }
8338
8338
  var MANIFEST_VERSION_STORAGE_KEY = "react-router-manifest-version";
8339
8339
  async function fetchAndApplyManifestPatches(paths, errorReloadPath, manifest, routeModules, ssr, isSpaMode, basename, manifestPath, patchRoutes, signal) {
@@ -9335,6 +9335,16 @@ function RouterProvider({
9335
9335
  ]
9336
9336
  );
9337
9337
  React9.useLayoutEffect(() => router.subscribe(setState), [router, setState]);
9338
+ let initialized = state.initialized;
9339
+ React9.useLayoutEffect(() => {
9340
+ if (!initialized && router.state.initialized) {
9341
+ setState(router.state, {
9342
+ deletedFetchers: [],
9343
+ flushSync: false,
9344
+ newErrors: null
9345
+ });
9346
+ }
9347
+ }, [initialized, setState, router.state]);
9338
9348
  React9.useEffect(() => {
9339
9349
  if (vtContext.isTransitioning && !vtContext.flushSync) {
9340
9350
  setRenderDfd(new Deferred2());
@@ -1,4 +1,4 @@
1
- import { m as HTMLFormMethod, n as FormEncType, o as LoaderFunctionArgs, p as MiddlewareEnabled, c as RouterContextProvider, q as AppLoadContext, r as RouteObject, s as History, t as MaybePromise, u as MapRoutePropertiesFunction, v as Action, L as Location, w as DataRouteMatch, x as Submission, y as RouteData, z as DataStrategyFunction, B as PatchRoutesOnNavigationFunction, E as DataRouteObject, U as UIMatch, T as To, I as Path, P as Params, J as InitialEntry, K as NonIndexRouteObject, O as LazyRouteFunction, Q as IndexRouteObject, V as RouteMatch, W as TrackedPromise } from './routeModules-BRrCYrSL.mjs';
1
+ import { m as HTMLFormMethod, n as FormEncType, o as LoaderFunctionArgs, p as MiddlewareEnabled, c as RouterContextProvider, q as AppLoadContext, r as RouteObject, s as History, t as MaybePromise, u as MapRoutePropertiesFunction, v as Action, L as Location, w as DataRouteMatch, x as Submission, y as RouteData, z as DataStrategyFunction, B as PatchRoutesOnNavigationFunction, E as DataRouteObject, U as UIMatch, T as To, I as Path, P as Params, J as InitialEntry, K as NonIndexRouteObject, O as LazyRouteFunction, Q as IndexRouteObject, V as RouteMatch, W as TrackedPromise } from './routeModules-Djumx26z.mjs';
2
2
  import * as React from 'react';
3
3
 
4
4
  type unstable_ServerInstrumentation = {
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import { a as RouterProviderProps$1, R as RouterInit, u as unstable_ClientInstrumentation, C as ClientOnErrorFunction } from './context-phCt_zmH.mjs';
3
- export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-vtIR1Kpe.mjs';
4
- import './routeModules-BRrCYrSL.mjs';
2
+ import { a as RouterProviderProps$1, R as RouterInit, u as unstable_ClientInstrumentation, C as ClientOnErrorFunction } from './context-BzhbVly6.mjs';
3
+ export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-D-3-U2Jj.mjs';
4
+ import './routeModules-Djumx26z.mjs';
5
5
 
6
6
  type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
7
7
  declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { RouterProviderProps as RouterProviderProps$1, RouterInit, ClientOnErrorFunction } from 'react-router';
3
- import { u as unstable_ClientInstrumentation } from './instrumentation-BYr6ff5D.js';
4
- export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-C9Ar1yxG.js';
5
- import './routeModules-CA7kSxJJ.js';
3
+ import { u as unstable_ClientInstrumentation } from './instrumentation-CMVbvxj9.js';
4
+ export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-CtktEGQs.js';
5
+ import './routeModules-CM_clkdE.js';
6
6
 
7
7
  type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
8
8
  declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
@@ -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.14.0
2
+ * react-router v7.14.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -13,7 +13,7 @@
13
13
 
14
14
 
15
15
 
16
- var _chunk355DUZMCjs = require('./chunk-355DUZMC.js');
16
+ var _chunk3SUPTI2Ujs = require('./chunk-3SUPTI2U.js');
17
17
 
18
18
 
19
19
 
@@ -33,7 +33,7 @@ var _chunk355DUZMCjs = require('./chunk-355DUZMC.js');
33
33
 
34
34
 
35
35
 
36
- var _chunk4TJ7T2OQjs = require('./chunk-4TJ7T2OQ.js');
36
+ var _chunkUVEQGZIHjs = require('./chunk-UVEQGZIH.js');
37
37
 
38
38
  // lib/dom-export/dom-router-provider.tsx
39
39
  var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React3 = _interopRequireWildcard(_react);
@@ -213,7 +213,7 @@ function HydratedRouter(props) {
213
213
  }, []);
214
214
  React2.useEffect(() => {
215
215
  if (process.env.NODE_ENV === "development" && criticalCss === void 0) {
216
- document.querySelectorAll(`[${_chunk4TJ7T2OQjs.CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
216
+ document.querySelectorAll(`[${_chunkUVEQGZIHjs.CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
217
217
  }
218
218
  }, [criticalCss]);
219
219
  let [location2, setLocation] = React2.useState(router.state.location);
@@ -392,7 +392,7 @@ function createRouterFromPayload({
392
392
  };
393
393
  if (payload.type !== "render") throw new Error("Invalid payload type");
394
394
  globalVar.__reactRouterRouteModules = _nullishCoalesce(globalVar.__reactRouterRouteModules, () => ( {}));
395
- _chunk355DUZMCjs.populateRSCRouteModules.call(void 0, globalVar.__reactRouterRouteModules, payload.matches);
395
+ _chunk3SUPTI2Ujs.populateRSCRouteModules.call(void 0, globalVar.__reactRouterRouteModules, payload.matches);
396
396
  let routes = payload.matches.reduceRight((previous, match) => {
397
397
  const route = createRouteFromServerManifest(
398
398
  match,
@@ -406,12 +406,12 @@ function createRouterFromPayload({
406
406
  return [route];
407
407
  }, []);
408
408
  let applyPatchesPromise;
409
- globalVar.__reactRouterDataRouter = _chunk4TJ7T2OQjs.createRouter.call(void 0, {
409
+ globalVar.__reactRouterDataRouter = _chunkUVEQGZIHjs.createRouter.call(void 0, {
410
410
  routes,
411
411
  getContext,
412
412
  basename: payload.basename,
413
- history: _chunk4TJ7T2OQjs.createBrowserHistory.call(void 0, ),
414
- hydrationData: _chunk355DUZMCjs.getHydrationData.call(void 0, {
413
+ history: _chunkUVEQGZIHjs.createBrowserHistory.call(void 0, ),
414
+ hydrationData: _chunk3SUPTI2Ujs.getHydrationData.call(void 0, {
415
415
  state: {
416
416
  loaderData: payload.loaderData,
417
417
  actionData: payload.actionData,
@@ -420,7 +420,7 @@ function createRouterFromPayload({
420
420
  routes,
421
421
  getRouteInfo: (routeId) => {
422
422
  let match = payload.matches.find((m) => m.id === routeId);
423
- _chunk4TJ7T2OQjs.invariant.call(void 0, match, "Route not found in payload");
423
+ _chunkUVEQGZIHjs.invariant.call(void 0, match, "Route not found in payload");
424
424
  return {
425
425
  clientLoader: match.clientLoader,
426
426
  hasLoader: match.hasLoader,
@@ -535,9 +535,9 @@ function createRouterFromPayload({
535
535
  routeModules: globalVar.__reactRouterRouteModules
536
536
  };
537
537
  }
538
- var renderedRoutesContext = _chunk4TJ7T2OQjs.createContext.call(void 0, );
538
+ var renderedRoutesContext = _chunkUVEQGZIHjs.createContext.call(void 0, );
539
539
  function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
540
- let dataStrategy = _chunk4TJ7T2OQjs.getSingleFetchDataStrategyImpl.call(void 0,
540
+ let dataStrategy = _chunkUVEQGZIHjs.getSingleFetchDataStrategyImpl.call(void 0,
541
541
  getRouter,
542
542
  (match) => {
543
543
  let M = match;
@@ -595,20 +595,20 @@ function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReada
595
595
  function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {
596
596
  return async (args, basename, trailingSlashAware, targetRoutes) => {
597
597
  let { request, context } = args;
598
- let url = _chunk4TJ7T2OQjs.singleFetchUrl.call(void 0, request.url, basename, trailingSlashAware, "rsc");
598
+ let url = _chunkUVEQGZIHjs.singleFetchUrl.call(void 0, request.url, basename, trailingSlashAware, "rsc");
599
599
  if (request.method === "GET") {
600
- url = _chunk4TJ7T2OQjs.stripIndexParam.call(void 0, url);
600
+ url = _chunkUVEQGZIHjs.stripIndexParam.call(void 0, url);
601
601
  if (targetRoutes) {
602
602
  url.searchParams.set("_routes", targetRoutes.join(","));
603
603
  }
604
604
  }
605
605
  let res = await fetchImplementation(
606
- new Request(url, await _chunk4TJ7T2OQjs.createRequestInit.call(void 0, request))
606
+ new Request(url, await _chunkUVEQGZIHjs.createRequestInit.call(void 0, request))
607
607
  );
608
608
  if (res.status >= 400 && !res.headers.has("X-Remix-Response")) {
609
- throw new (0, _chunk4TJ7T2OQjs.ErrorResponseImpl)(res.status, res.statusText, await res.text());
609
+ throw new (0, _chunkUVEQGZIHjs.ErrorResponseImpl)(res.status, res.statusText, await res.text());
610
610
  }
611
- _chunk4TJ7T2OQjs.invariant.call(void 0, res.body, "No response body to decode");
611
+ _chunkUVEQGZIHjs.invariant.call(void 0, res.body, "No response body to decode");
612
612
  try {
613
613
  const payload = await createFromReadableStream(res.body, {
614
614
  temporaryReferences: void 0
@@ -632,7 +632,7 @@ function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation)
632
632
  }
633
633
  context.get(renderedRoutesContext).push(...payload.matches);
634
634
  let results = { routes: {} };
635
- const dataKey = _chunk4TJ7T2OQjs.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
635
+ const dataKey = _chunkUVEQGZIHjs.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
636
636
  for (let [routeId, data] of Object.entries(payload[dataKey] || {})) {
637
637
  results.routes[routeId] = { data };
638
638
  }
@@ -665,7 +665,7 @@ function RSCHydratedRouter({
665
665
  [createFromReadableStream, payload, fetchImplementation, getContext]
666
666
  );
667
667
  React3.useEffect(() => {
668
- _chunk4TJ7T2OQjs.setIsHydrated.call(void 0, );
668
+ _chunkUVEQGZIHjs.setIsHydrated.call(void 0, );
669
669
  }, []);
670
670
  React3.useLayoutEffect(() => {
671
671
  const globalVar = window;
@@ -774,8 +774,8 @@ function RSCHydratedRouter({
774
774
  },
775
775
  routeModules
776
776
  };
777
- return /* @__PURE__ */ React3.createElement(_chunk4TJ7T2OQjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(_chunk355DUZMCjs.RSCRouterGlobalErrorBoundary, { location: state.location }, /* @__PURE__ */ React3.createElement(_chunk4TJ7T2OQjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React3.createElement(
778
- _chunk4TJ7T2OQjs.RouterProvider,
777
+ return /* @__PURE__ */ React3.createElement(_chunkUVEQGZIHjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(_chunk3SUPTI2Ujs.RSCRouterGlobalErrorBoundary, { location: state.location }, /* @__PURE__ */ React3.createElement(_chunkUVEQGZIHjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React3.createElement(
778
+ _chunkUVEQGZIHjs.RouterProvider,
779
779
  {
780
780
  router: transitionEnabledRouter,
781
781
  flushSync: ReactDOM2.flushSync
@@ -791,8 +791,8 @@ function createRouteFromServerManifest(match, payload) {
791
791
  // the server loader flow regardless of whether the client loader calls
792
792
  // `serverLoader` or not, otherwise we'll have nothing to render.
793
793
  match.hasComponent && !match.element;
794
- _chunk4TJ7T2OQjs.invariant.call(void 0, window.__reactRouterRouteModules);
795
- _chunk355DUZMCjs.populateRSCRouteModules.call(void 0, window.__reactRouterRouteModules, match);
794
+ _chunkUVEQGZIHjs.invariant.call(void 0, window.__reactRouterRouteModules);
795
+ _chunk3SUPTI2Ujs.populateRSCRouteModules.call(void 0, window.__reactRouterRouteModules, match);
796
796
  let dataRoute = {
797
797
  id: match.id,
798
798
  element: match.element,
@@ -842,7 +842,7 @@ function createRouteFromServerManifest(match, payload) {
842
842
  return await callSingleFetch(singleFetch);
843
843
  }
844
844
  }) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
845
- throw _chunk4TJ7T2OQjs.noActionDefinedError.call(void 0, "action", match.id);
845
+ throw _chunkUVEQGZIHjs.noActionDefinedError.call(void 0, "action", match.id);
846
846
  },
847
847
  path: match.path,
848
848
  shouldRevalidate: match.shouldRevalidate,
@@ -855,7 +855,7 @@ function createRouteFromServerManifest(match, payload) {
855
855
  hasShouldRevalidate: match.shouldRevalidate != null
856
856
  };
857
857
  if (typeof dataRoute.loader === "function") {
858
- dataRoute.loader.hydrate = _chunk4TJ7T2OQjs.shouldHydrateRouteLoader.call(void 0,
858
+ dataRoute.loader.hydrate = _chunkUVEQGZIHjs.shouldHydrateRouteLoader.call(void 0,
859
859
  match.id,
860
860
  match.clientLoader,
861
861
  match.hasLoader,
@@ -865,7 +865,7 @@ function createRouteFromServerManifest(match, payload) {
865
865
  return dataRoute;
866
866
  }
867
867
  function callSingleFetch(singleFetch) {
868
- _chunk4TJ7T2OQjs.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
868
+ _chunkUVEQGZIHjs.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
869
869
  return singleFetch();
870
870
  }
871
871
  function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
@@ -873,7 +873,7 @@ function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
873
873
  let fn = type === "action" ? "serverAction()" : "serverLoader()";
874
874
  let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
875
875
  console.error(msg);
876
- throw new (0, _chunk4TJ7T2OQjs.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
876
+ throw new (0, _chunkUVEQGZIHjs.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
877
877
  }
878
878
  }
879
879
  var nextPaths = /* @__PURE__ */ new Set();
@@ -946,7 +946,7 @@ function isExternalLocation(location2) {
946
946
  }
947
947
  function hasInvalidProtocol(location2) {
948
948
  try {
949
- return _chunk4TJ7T2OQjs.invalidProtocols.includes(new URL(location2).protocol);
949
+ return _chunkUVEQGZIHjs.invalidProtocols.includes(new URL(location2).protocol);
950
950
  } catch (e2) {
951
951
  return false;
952
952
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.14.0
2
+ * react-router v7.14.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -14,7 +14,7 @@ import {
14
14
  deserializeErrors,
15
15
  getHydrationData,
16
16
  populateRSCRouteModules
17
- } from "./chunk-X5LK27NZ.mjs";
17
+ } from "./chunk-G5ZWO7Q6.mjs";
18
18
  import {
19
19
  CRITICAL_CSS_DATA_ATTRIBUTE,
20
20
  ErrorResponseImpl,
@@ -43,7 +43,7 @@ import {
43
43
  singleFetchUrl,
44
44
  stripIndexParam,
45
45
  useFogOFWarDiscovery
46
- } from "./chunk-HZQGQD2X.mjs";
46
+ } from "./chunk-SPR7R4GU.mjs";
47
47
 
48
48
  // lib/dom-export/dom-router-provider.tsx
49
49
  import * as React from "react";
@@ -1,6 +1,6 @@
1
- import { H as HydrationState, f as StaticHandlerContext, l as unstable_ServerInstrumentation, c as RelativeRoutingType, a as Router$1, d as RouterState, R as RouterInit, t as FutureConfig$1, u as unstable_ClientInstrumentation, e as GetScrollRestorationKeyFunction, F as Fetcher, B as BlockerFunction, C as CreateStaticHandlerOptions$1, S as StaticHandler } from './instrumentation-BYr6ff5D.js';
1
+ import { H as HydrationState, f as StaticHandlerContext, l as unstable_ServerInstrumentation, c as RelativeRoutingType, a as Router$1, d as RouterState, R as RouterInit, t as FutureConfig$1, u as unstable_ClientInstrumentation, e as GetScrollRestorationKeyFunction, F as Fetcher, B as BlockerFunction, C as CreateStaticHandlerOptions$1, S as StaticHandler } from './instrumentation-CMVbvxj9.js';
2
2
  import * as React from 'react';
3
- import { aC as RouteManifest, J as RouteModules, n as DataRouteObject, a as ClientLoaderFunction, aD as ServerRouteModule, r as MiddlewareEnabled, c as RouterContextProvider, s as AppLoadContext, q as LoaderFunctionArgs, _ as ActionFunctionArgs, aE as TrackedPromise, f as History, T as To, L as Location, i as Action, aa as RouteMatch, W as InitialEntry, Y as NonIndexRouteObject, a5 as LazyRouteFunction, X as IndexRouteObject, P as Params, l as DataStrategyFunction, m as PatchRoutesOnNavigationFunction, e as RouteObject, U as UIMatch, o as HTMLFormMethod, F as FormEncType, at as PageLinkDescriptor, K as SerializeFrom } from './routeModules-CA7kSxJJ.js';
3
+ import { aC as RouteManifest, J as RouteModules, n as DataRouteObject, a as ClientLoaderFunction, aD as ServerRouteModule, r as MiddlewareEnabled, c as RouterContextProvider, s as AppLoadContext, q as LoaderFunctionArgs, _ as ActionFunctionArgs, aE as TrackedPromise, f as History, T as To, L as Location, i as Action, aa as RouteMatch, W as InitialEntry, Y as NonIndexRouteObject, a5 as LazyRouteFunction, X as IndexRouteObject, P as Params, l as DataStrategyFunction, m as PatchRoutesOnNavigationFunction, e as RouteObject, U as UIMatch, o as HTMLFormMethod, F as FormEncType, at as PageLinkDescriptor, K as SerializeFrom } from './routeModules-CM_clkdE.js';
4
4
 
5
5
  interface Route$1 {
6
6
  index?: boolean;
@@ -1,6 +1,6 @@
1
- import { H as HydrationState, h as StaticHandlerContext, n as unstable_ServerInstrumentation, d as RelativeRoutingType, g as GetScrollRestorationKeyFunction, R as RouterInit, ah as FutureConfig$1, u as unstable_ClientInstrumentation, N as NavigateOptions, F as Fetcher, b as Router, B as BlockerFunction, ai as CreateStaticHandlerOptions$1, S as StaticHandler } from './context-phCt_zmH.mjs';
1
+ import { H as HydrationState, h as StaticHandlerContext, n as unstable_ServerInstrumentation, d as RelativeRoutingType, g as GetScrollRestorationKeyFunction, R as RouterInit, ah as FutureConfig$1, u as unstable_ClientInstrumentation, N as NavigateOptions, F as Fetcher, b as Router, B as BlockerFunction, ai as CreateStaticHandlerOptions$1, S as StaticHandler } from './context-BzhbVly6.mjs';
2
2
  import * as React from 'react';
3
- import { aD as RouteManifest, X as RouteModules, E as DataRouteObject, a as ClientLoaderFunction, aE as ServerRouteModule, p as MiddlewareEnabled, c as RouterContextProvider, q as AppLoadContext, o as LoaderFunctionArgs, a1 as ActionFunctionArgs, m as HTMLFormMethod, n as FormEncType, au as PageLinkDescriptor, T as To, s as History, z as DataStrategyFunction, B as PatchRoutesOnNavigationFunction, r as RouteObject, Y as SerializeFrom, L as Location } from './routeModules-BRrCYrSL.mjs';
3
+ import { aD as RouteManifest, X as RouteModules, E as DataRouteObject, a as ClientLoaderFunction, aE as ServerRouteModule, p as MiddlewareEnabled, c as RouterContextProvider, q as AppLoadContext, o as LoaderFunctionArgs, a1 as ActionFunctionArgs, m as HTMLFormMethod, n as FormEncType, au as PageLinkDescriptor, T as To, s as History, z as DataStrategyFunction, B as PatchRoutesOnNavigationFunction, r as RouteObject, Y as SerializeFrom, L as Location } from './routeModules-Djumx26z.mjs';
4
4
 
5
5
  interface Route {
6
6
  index?: boolean;
@@ -1,4 +1,4 @@
1
- export { Q as MemoryRouter, T as Navigate, U as Outlet, V as Route, W as Router, X as RouterProvider, Y as Routes, A as UNSAFE_AwaitContextProvider, ab as UNSAFE_WithComponentProps, af as UNSAFE_WithErrorBoundaryProps, ad as UNSAFE_WithHydrateFallbackProps } from './context-phCt_zmH.mjs';
2
- export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-BwWaHAr3.mjs';
3
- import './routeModules-BRrCYrSL.mjs';
1
+ export { Q as MemoryRouter, T as Navigate, U as Outlet, V as Route, W as Router, X as RouterProvider, Y as Routes, A as UNSAFE_AwaitContextProvider, ab as UNSAFE_WithComponentProps, af as UNSAFE_WithErrorBoundaryProps, ad as UNSAFE_WithHydrateFallbackProps } from './context-BzhbVly6.mjs';
2
+ export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-WSaoxloq.mjs';
3
+ import './routeModules-Djumx26z.mjs';
4
4
  import 'react';
@@ -1,4 +1,4 @@
1
- export { W as BrowserRouter, $ as Form, X as HashRouter, Y as Link, an as Links, j as MemoryRouter, am as Meta, _ as NavLink, k as Navigate, l as Outlet, m as Route, n as Router, o as RouterProvider, p as Routes, a0 as ScrollRestoration, ak as StaticRouter, al as StaticRouterProvider, b as UNSAFE_AwaitContextProvider, aH as UNSAFE_WithComponentProps, aL as UNSAFE_WithErrorBoundaryProps, aJ as UNSAFE_WithHydrateFallbackProps, Z as unstable_HistoryRouter } from './index-react-server-client-luDbagNU.js';
2
- import './instrumentation-BYr6ff5D.js';
3
- import './routeModules-CA7kSxJJ.js';
1
+ export { W as BrowserRouter, $ as Form, X as HashRouter, Y as Link, an as Links, j as MemoryRouter, am as Meta, _ as NavLink, k as Navigate, l as Outlet, m as Route, n as Router, o as RouterProvider, p as Routes, a0 as ScrollRestoration, ak as StaticRouter, al as StaticRouterProvider, b as UNSAFE_AwaitContextProvider, aH as UNSAFE_WithComponentProps, aL as UNSAFE_WithErrorBoundaryProps, aJ as UNSAFE_WithHydrateFallbackProps, Z as unstable_HistoryRouter } from './index-react-server-client-CimaPp9o.js';
2
+ import './instrumentation-CMVbvxj9.js';
3
+ import './routeModules-CM_clkdE.js';
4
4
  import 'react';
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
2
- * react-router v7.14.0
2
+ * react-router v7.14.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -19,7 +19,7 @@
19
19
 
20
20
 
21
21
 
22
- var _chunkFPT5DLVJjs = require('./chunk-FPT5DLVJ.js');
22
+ var _chunkLIOP3ILMjs = require('./chunk-LIOP3ILM.js');
23
23
 
24
24
 
25
25
 
@@ -34,7 +34,7 @@ var _chunkFPT5DLVJjs = require('./chunk-FPT5DLVJ.js');
34
34
 
35
35
 
36
36
 
37
- var _chunk4TJ7T2OQjs = require('./chunk-4TJ7T2OQ.js');
37
+ var _chunkUVEQGZIHjs = require('./chunk-UVEQGZIH.js');
38
38
 
39
39
 
40
40
 
@@ -58,4 +58,4 @@ var _chunk4TJ7T2OQjs = require('./chunk-4TJ7T2OQ.js');
58
58
 
59
59
 
60
60
 
61
- exports.BrowserRouter = _chunkFPT5DLVJjs.BrowserRouter; exports.Form = _chunkFPT5DLVJjs.Form; exports.HashRouter = _chunkFPT5DLVJjs.HashRouter; exports.Link = _chunkFPT5DLVJjs.Link; exports.Links = _chunk4TJ7T2OQjs.Links; exports.MemoryRouter = _chunk4TJ7T2OQjs.MemoryRouter; exports.Meta = _chunk4TJ7T2OQjs.Meta; exports.NavLink = _chunkFPT5DLVJjs.NavLink; exports.Navigate = _chunk4TJ7T2OQjs.Navigate; exports.Outlet = _chunk4TJ7T2OQjs.Outlet; exports.Route = _chunk4TJ7T2OQjs.Route; exports.Router = _chunk4TJ7T2OQjs.Router; exports.RouterProvider = _chunk4TJ7T2OQjs.RouterProvider; exports.Routes = _chunk4TJ7T2OQjs.Routes; exports.ScrollRestoration = _chunkFPT5DLVJjs.ScrollRestoration; exports.StaticRouter = _chunkFPT5DLVJjs.StaticRouter; exports.StaticRouterProvider = _chunkFPT5DLVJjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunk4TJ7T2OQjs.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunk4TJ7T2OQjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunk4TJ7T2OQjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunk4TJ7T2OQjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkFPT5DLVJjs.HistoryRouter;
61
+ exports.BrowserRouter = _chunkLIOP3ILMjs.BrowserRouter; exports.Form = _chunkLIOP3ILMjs.Form; exports.HashRouter = _chunkLIOP3ILMjs.HashRouter; exports.Link = _chunkLIOP3ILMjs.Link; exports.Links = _chunkUVEQGZIHjs.Links; exports.MemoryRouter = _chunkUVEQGZIHjs.MemoryRouter; exports.Meta = _chunkUVEQGZIHjs.Meta; exports.NavLink = _chunkLIOP3ILMjs.NavLink; exports.Navigate = _chunkUVEQGZIHjs.Navigate; exports.Outlet = _chunkUVEQGZIHjs.Outlet; exports.Route = _chunkUVEQGZIHjs.Route; exports.Router = _chunkUVEQGZIHjs.Router; exports.RouterProvider = _chunkUVEQGZIHjs.RouterProvider; exports.Routes = _chunkUVEQGZIHjs.Routes; exports.ScrollRestoration = _chunkLIOP3ILMjs.ScrollRestoration; exports.StaticRouter = _chunkLIOP3ILMjs.StaticRouter; exports.StaticRouterProvider = _chunkLIOP3ILMjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkUVEQGZIHjs.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunkUVEQGZIHjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkUVEQGZIHjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkUVEQGZIHjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkLIOP3ILMjs.HistoryRouter;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.14.0
2
+ * react-router v7.14.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -32,7 +32,7 @@ import {
32
32
  WithComponentProps,
33
33
  WithErrorBoundaryProps,
34
34
  WithHydrateFallbackProps
35
- } from "./chunk-HZQGQD2X.mjs";
35
+ } from "./chunk-SPR7R4GU.mjs";
36
36
  export {
37
37
  BrowserRouter,
38
38
  Form,
@@ -878,6 +878,9 @@ type RedirectFunction = (url: string, init?: number | ResponseInit) => Response;
878
878
  * Sets the status code and the [`Location`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Location)
879
879
  * header. Defaults to [`302 Found`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302).
880
880
  *
881
+ * This utility accepts absolute URLs and can navigate to external domains, so
882
+ * the application should validate any user-supplied inputs to redirects.
883
+ *
881
884
  * @example
882
885
  * import { redirect } from "react-router";
883
886
  *
@@ -907,6 +910,9 @@ declare const redirect$1: RedirectFunction;
907
910
  * and the [`Location`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Location)
908
911
  * header. Defaults to [`302 Found`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302).
909
912
  *
913
+ * This utility accepts absolute URLs and can navigate to external domains, so
914
+ * the application should validate any user-supplied inputs to redirects.
915
+ *
910
916
  * ```tsx filename=routes/logout.tsx
911
917
  * import { redirectDocument } from "react-router";
912
918
  *
@@ -878,6 +878,9 @@ type RedirectFunction = (url: string, init?: number | ResponseInit) => Response;
878
878
  * Sets the status code and the [`Location`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Location)
879
879
  * header. Defaults to [`302 Found`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302).
880
880
  *
881
+ * This utility accepts absolute URLs and can navigate to external domains, so
882
+ * the application should validate any user-supplied inputs to redirects.
883
+ *
881
884
  * @example
882
885
  * import { redirect } from "react-router";
883
886
  *
@@ -907,6 +910,9 @@ declare const redirect$1: RedirectFunction;
907
910
  * and the [`Location`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Location)
908
911
  * header. Defaults to [`302 Found`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302).
909
912
  *
913
+ * This utility accepts absolute URLs and can navigate to external domains, so
914
+ * the application should validate any user-supplied inputs to redirects.
915
+ *
910
916
  * ```tsx filename=routes/logout.tsx
911
917
  * import { redirectDocument } from "react-router";
912
918
  *
@@ -27,7 +27,7 @@ function _interopNamespace(e) {
27
27
  var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
28
28
 
29
29
  /**
30
- * react-router v7.14.0
30
+ * react-router v7.14.1
31
31
  *
32
32
  * Copyright (c) Remix Software Inc.
33
33
  *
@@ -728,7 +728,7 @@ function resolvePath(to, fromPathname = "/") {
728
728
  } = typeof to === "string" ? parsePath(to) : to;
729
729
  let pathname;
730
730
  if (toPathname) {
731
- toPathname = toPathname.replace(/\/\/+/g, "/");
731
+ toPathname = removeDoubleSlashes(toPathname);
732
732
  if (toPathname.startsWith("/")) {
733
733
  pathname = resolvePathname(toPathname.substring(1), "/");
734
734
  } else {
@@ -744,7 +744,7 @@ function resolvePath(to, fromPathname = "/") {
744
744
  };
745
745
  }
746
746
  function resolvePathname(relativePath, fromPathname) {
747
- let segments = fromPathname.replace(/\/+$/, "").split("/");
747
+ let segments = removeTrailingSlash(fromPathname).split("/");
748
748
  let relativeSegments = relativePath.split("/");
749
749
  relativeSegments.forEach((segment) => {
750
750
  if (segment === "..") {
@@ -815,8 +815,10 @@ function resolveTo(toArg, routePathnames, locationPathname, isPathRelative = fal
815
815
  }
816
816
  return path;
817
817
  }
818
- var joinPaths = (paths) => paths.join("/").replace(/\/\/+/g, "/");
819
- var normalizePathname = (pathname) => pathname.replace(/\/+$/, "").replace(/^\/*/, "/");
818
+ var removeDoubleSlashes = (path) => path.replace(/\/\/+/g, "/");
819
+ var joinPaths = (paths) => removeDoubleSlashes(paths.join("/"));
820
+ var removeTrailingSlash = (path) => path.replace(/\/+$/, "");
821
+ var normalizePathname = (pathname) => removeTrailingSlash(pathname).replace(/^\/*/, "/");
820
822
  var normalizeSearch = (search) => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
821
823
  var normalizeHash = (hash) => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
822
824
  var DataWithResponseInit = class {
@@ -870,7 +872,8 @@ function isRouteErrorResponse(error) {
870
872
  return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
871
873
  }
872
874
  function getRoutePattern(matches) {
873
- return matches.map((m) => m.route.path).filter(Boolean).join("/").replace(/\/\/*/g, "/") || "/";
875
+ let parts = matches.map((m) => m.route.path).filter(Boolean);
876
+ return joinPaths(parts) || "/";
874
877
  }
875
878
 
876
879
  // lib/router/router.ts