react-router 7.8.0-pre.1 → 7.8.0-pre.2

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 (42) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/development/{chunk-I22FVTOY.mjs → chunk-3D24XHV2.mjs} +19 -4
  3. package/dist/development/{chunk-NGF2R4G7.js → chunk-74TFO7SN.js} +1 -1
  4. package/dist/{production/chunk-4PESVXQ2.js → development/chunk-HQ37R3FK.js} +130 -130
  5. package/dist/development/{chunk-XFFANEXU.mjs → chunk-WSV33ENW.mjs} +2 -2
  6. package/dist/development/dom-export.js +3 -3
  7. package/dist/development/dom-export.mjs +3 -3
  8. package/dist/{production/index-react-server-client-BzBbJLAD.d.ts → development/index-react-server-client-CMphySRb.d.ts} +18 -1
  9. package/dist/{production/index-react-server-client-CuajY2vy.d.mts → development/index-react-server-client-DXb0OgpJ.d.mts} +18 -1
  10. package/dist/development/index-react-server-client.d.mts +1 -1
  11. package/dist/development/index-react-server-client.d.ts +1 -1
  12. package/dist/development/index-react-server-client.js +4 -4
  13. package/dist/development/index-react-server-client.mjs +2 -2
  14. package/dist/development/index-react-server.js +39 -25
  15. package/dist/development/index-react-server.mjs +39 -25
  16. package/dist/development/index.d.mts +2 -2
  17. package/dist/development/index.d.ts +2 -2
  18. package/dist/development/index.js +117 -102
  19. package/dist/development/index.mjs +3 -3
  20. package/dist/development/lib/types/internal.js +1 -1
  21. package/dist/development/lib/types/internal.mjs +1 -1
  22. package/dist/production/{chunk-RLJ23MYZ.js → chunk-DDK3XFL6.js} +1 -1
  23. package/dist/{development/chunk-4EVDZJGM.js → production/chunk-GSF7DANI.js} +130 -130
  24. package/dist/production/{chunk-P2ZJHOXZ.mjs → chunk-IEIDJVF4.mjs} +2 -2
  25. package/dist/production/{chunk-JJOMWYJ4.mjs → chunk-Q6IGLNPQ.mjs} +19 -4
  26. package/dist/production/dom-export.js +3 -3
  27. package/dist/production/dom-export.mjs +3 -3
  28. package/dist/{development/index-react-server-client-BzBbJLAD.d.ts → production/index-react-server-client-CMphySRb.d.ts} +18 -1
  29. package/dist/{development/index-react-server-client-CuajY2vy.d.mts → production/index-react-server-client-DXb0OgpJ.d.mts} +18 -1
  30. package/dist/production/index-react-server-client.d.mts +1 -1
  31. package/dist/production/index-react-server-client.d.ts +1 -1
  32. package/dist/production/index-react-server-client.js +4 -4
  33. package/dist/production/index-react-server-client.mjs +2 -2
  34. package/dist/production/index-react-server.js +39 -25
  35. package/dist/production/index-react-server.mjs +39 -25
  36. package/dist/production/index.d.mts +2 -2
  37. package/dist/production/index.d.ts +2 -2
  38. package/dist/production/index.js +117 -102
  39. package/dist/production/index.mjs +3 -3
  40. package/dist/production/lib/types/internal.js +1 -1
  41. package/dist/production/lib/types/internal.mjs +1 -1
  42. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.8.0-pre.1
2
+ * react-router v7.8.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -8941,7 +8941,7 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
8941
8941
  try {
8942
8942
  if (isBrowser) {
8943
8943
  window.__reactRouterVersion = // @ts-expect-error
8944
- "7.8.0-pre.1";
8944
+ "7.8.0-pre.2";
8945
8945
  }
8946
8946
  } catch (e) {
8947
8947
  }
@@ -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.8.0-pre.1
2
+ * react-router v7.8.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -11,7 +11,7 @@
11
11
  "use client";
12
12
 
13
13
 
14
- var _chunkNGF2R4G7js = require('./chunk-NGF2R4G7.js');
14
+ var _chunk74TFO7SNjs = require('./chunk-74TFO7SN.js');
15
15
 
16
16
  // lib/dom-export/dom-router-provider.tsx
17
17
  var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react);
@@ -180,7 +180,7 @@ function HydratedRouter(props) {
180
180
  }, []);
181
181
  React2.useEffect(() => {
182
182
  if (process.env.NODE_ENV === "development" && criticalCss === void 0) {
183
- document.querySelectorAll(`[${_chunkNGF2R4G7js.CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
183
+ document.querySelectorAll(`[${_chunk74TFO7SNjs.CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
184
184
  }
185
185
  }, [criticalCss]);
186
186
  let [location, setLocation] = React2.useState(router.state.location);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.8.0-pre.1
2
+ * react-router v7.8.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -12,7 +12,7 @@
12
12
  import {
13
13
  deserializeErrors,
14
14
  getHydrationData
15
- } from "./chunk-I22FVTOY.mjs";
15
+ } from "./chunk-3D24XHV2.mjs";
16
16
  import {
17
17
  CRITICAL_CSS_DATA_ATTRIBUTE,
18
18
  FrameworkContext,
@@ -29,7 +29,7 @@ import {
29
29
  invariant,
30
30
  mapRouteProperties,
31
31
  useFogOFWarDiscovery
32
- } from "./chunk-XFFANEXU.mjs";
32
+ } from "./chunk-WSV33ENW.mjs";
33
33
 
34
34
  // lib/dom-export/dom-router-provider.tsx
35
35
  import * as React from "react";
@@ -1239,6 +1239,23 @@ interface DOMRouterOpts {
1239
1239
  * [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
1240
1240
  * This function is called to generate a fresh `context` instance on each
1241
1241
  * navigation or fetcher call.
1242
+ *
1243
+ * ```tsx
1244
+ * import {
1245
+ * unstable_createContext,
1246
+ * unstable_RouterContextProvider,
1247
+ * } from "react-router";
1248
+ *
1249
+ * const apiClientContext = unstable_createContext<APIClient>();
1250
+ *
1251
+ * function createBrowserRouter(routes, {
1252
+ * unstable_getContext() {
1253
+ * let context = new unstable_RouterContextProvider();
1254
+ * context.set(apiClientContext, getApiClient());
1255
+ * return context;
1256
+ * }
1257
+ * })
1258
+ * ```
1242
1259
  */
1243
1260
  unstable_getContext?: RouterInit["unstable_getContext"];
1244
1261
  /**
@@ -1249,7 +1266,7 @@ interface DOMRouterOpts {
1249
1266
  * When Server-Rendering and opting-out of automatic hydration, the
1250
1267
  * `hydrationData` option allows you to pass in hydration data from your
1251
1268
  * server-render. This will almost always be a subset of data from the
1252
- * {@link StaticHandlerContext} value you get back from {@link StaticHandler}'s
1269
+ * {@link StaticHandlerContext} value you get back from the {@link StaticHandler}'s
1253
1270
  * `query` method:
1254
1271
  *
1255
1272
  * ```tsx
@@ -431,6 +431,23 @@ interface DOMRouterOpts {
431
431
  * [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
432
432
  * This function is called to generate a fresh `context` instance on each
433
433
  * navigation or fetcher call.
434
+ *
435
+ * ```tsx
436
+ * import {
437
+ * unstable_createContext,
438
+ * unstable_RouterContextProvider,
439
+ * } from "react-router";
440
+ *
441
+ * const apiClientContext = unstable_createContext<APIClient>();
442
+ *
443
+ * function createBrowserRouter(routes, {
444
+ * unstable_getContext() {
445
+ * let context = new unstable_RouterContextProvider();
446
+ * context.set(apiClientContext, getApiClient());
447
+ * return context;
448
+ * }
449
+ * })
450
+ * ```
434
451
  */
435
452
  unstable_getContext?: RouterInit["unstable_getContext"];
436
453
  /**
@@ -441,7 +458,7 @@ interface DOMRouterOpts {
441
458
  * When Server-Rendering and opting-out of automatic hydration, the
442
459
  * `hydrationData` option allows you to pass in hydration data from your
443
460
  * server-render. This will almost always be a subset of data from the
444
- * {@link StaticHandlerContext} value you get back from {@link StaticHandler}'s
461
+ * {@link StaticHandlerContext} value you get back from the {@link StaticHandler}'s
445
462
  * `query` method:
446
463
  *
447
464
  * ```tsx
@@ -1,5 +1,5 @@
1
1
  export { f as Await, g as MemoryRouter, h as Navigate, i as Outlet, j as Route, k as Router, l as RouterProvider, m as Routes, W as UNSAFE_WithComponentProps, v as UNSAFE_WithErrorBoundaryProps, t as UNSAFE_WithHydrateFallbackProps } from './components-CuPfnyiZ.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-CuajY2vy.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-DXb0OgpJ.mjs';
3
3
  import './context-DohQKLID.mjs';
4
4
  import 'react';
5
5
  import './route-data-CpB5xtMm.mjs';
@@ -1,3 +1,3 @@
1
- export { h as Await, V as BrowserRouter, _ as Form, W as HashRouter, X as Link, am as Links, i as MemoryRouter, al as Meta, Z as NavLink, j as Navigate, k as Outlet, l as Route, m as Router, n as RouterProvider, o as Routes, $ as ScrollRestoration, aj as StaticRouter, ak as StaticRouterProvider, az as UNSAFE_WithComponentProps, aD as UNSAFE_WithErrorBoundaryProps, aB as UNSAFE_WithHydrateFallbackProps, Y as unstable_HistoryRouter } from './index-react-server-client-BzBbJLAD.js';
1
+ export { h as Await, V as BrowserRouter, _ as Form, W as HashRouter, X as Link, am as Links, i as MemoryRouter, al as Meta, Z as NavLink, j as Navigate, k as Outlet, l as Route, m as Router, n as RouterProvider, o as Routes, $ as ScrollRestoration, aj as StaticRouter, ak as StaticRouterProvider, az as UNSAFE_WithComponentProps, aD as UNSAFE_WithErrorBoundaryProps, aB as UNSAFE_WithHydrateFallbackProps, Y as unstable_HistoryRouter } from './index-react-server-client-CMphySRb.js';
2
2
  import './routeModules-qBivMBjd.js';
3
3
  import 'react';
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
2
- * react-router v7.8.0-pre.1
2
+ * react-router v7.8.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -30,11 +30,11 @@
30
30
 
31
31
 
32
32
 
33
- var _chunk4EVDZJGMjs = require('./chunk-4EVDZJGM.js');
33
+ var _chunkHQ37R3FKjs = require('./chunk-HQ37R3FK.js');
34
34
 
35
35
 
36
36
 
37
- var _chunkNGF2R4G7js = require('./chunk-NGF2R4G7.js');
37
+ var _chunk74TFO7SNjs = require('./chunk-74TFO7SN.js');
38
38
 
39
39
 
40
40
 
@@ -58,4 +58,4 @@ var _chunkNGF2R4G7js = require('./chunk-NGF2R4G7.js');
58
58
 
59
59
 
60
60
 
61
- exports.Await = _chunk4EVDZJGMjs.Await; exports.BrowserRouter = _chunk4EVDZJGMjs.BrowserRouter; exports.Form = _chunk4EVDZJGMjs.Form; exports.HashRouter = _chunk4EVDZJGMjs.HashRouter; exports.Link = _chunk4EVDZJGMjs.Link; exports.Links = _chunkNGF2R4G7js.Links; exports.MemoryRouter = _chunk4EVDZJGMjs.MemoryRouter; exports.Meta = _chunkNGF2R4G7js.Meta; exports.NavLink = _chunk4EVDZJGMjs.NavLink; exports.Navigate = _chunk4EVDZJGMjs.Navigate; exports.Outlet = _chunk4EVDZJGMjs.Outlet; exports.Route = _chunk4EVDZJGMjs.Route; exports.Router = _chunk4EVDZJGMjs.Router; exports.RouterProvider = _chunk4EVDZJGMjs.RouterProvider; exports.Routes = _chunk4EVDZJGMjs.Routes; exports.ScrollRestoration = _chunk4EVDZJGMjs.ScrollRestoration; exports.StaticRouter = _chunk4EVDZJGMjs.StaticRouter; exports.StaticRouterProvider = _chunk4EVDZJGMjs.StaticRouterProvider; exports.UNSAFE_WithComponentProps = _chunk4EVDZJGMjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunk4EVDZJGMjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunk4EVDZJGMjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunk4EVDZJGMjs.HistoryRouter;
61
+ exports.Await = _chunkHQ37R3FKjs.Await; exports.BrowserRouter = _chunkHQ37R3FKjs.BrowserRouter; exports.Form = _chunkHQ37R3FKjs.Form; exports.HashRouter = _chunkHQ37R3FKjs.HashRouter; exports.Link = _chunkHQ37R3FKjs.Link; exports.Links = _chunk74TFO7SNjs.Links; exports.MemoryRouter = _chunkHQ37R3FKjs.MemoryRouter; exports.Meta = _chunk74TFO7SNjs.Meta; exports.NavLink = _chunkHQ37R3FKjs.NavLink; exports.Navigate = _chunkHQ37R3FKjs.Navigate; exports.Outlet = _chunkHQ37R3FKjs.Outlet; exports.Route = _chunkHQ37R3FKjs.Route; exports.Router = _chunkHQ37R3FKjs.Router; exports.RouterProvider = _chunkHQ37R3FKjs.RouterProvider; exports.Routes = _chunkHQ37R3FKjs.Routes; exports.ScrollRestoration = _chunkHQ37R3FKjs.ScrollRestoration; exports.StaticRouter = _chunkHQ37R3FKjs.StaticRouter; exports.StaticRouterProvider = _chunkHQ37R3FKjs.StaticRouterProvider; exports.UNSAFE_WithComponentProps = _chunkHQ37R3FKjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkHQ37R3FKjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkHQ37R3FKjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkHQ37R3FKjs.HistoryRouter;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.8.0-pre.1
2
+ * react-router v7.8.0-pre.2
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-XFFANEXU.mjs";
35
+ } from "./chunk-WSV33ENW.mjs";
36
36
  export {
37
37
  Await,
38
38
  BrowserRouter,
@@ -27,7 +27,7 @@ function _interopNamespace(e) {
27
27
  var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
28
28
 
29
29
  /**
30
- * react-router v7.8.0-pre.1
30
+ * react-router v7.8.0-pre.2
31
31
  *
32
32
  * Copyright (c) Remix Software Inc.
33
33
  *
@@ -2086,7 +2086,7 @@ function invariant2(value, message) {
2086
2086
  }
2087
2087
 
2088
2088
  // lib/server-runtime/headers.ts
2089
- function getDocumentHeadersImpl(context, getRouteHeadersFn) {
2089
+ function getDocumentHeadersImpl(context, getRouteHeadersFn, _defaultHeaders) {
2090
2090
  let boundaryIdx = context.errors ? context.matches.findIndex((m) => context.errors[m.route.id]) : -1;
2091
2091
  let matches = boundaryIdx >= 0 ? context.matches.slice(0, boundaryIdx + 1) : context.matches;
2092
2092
  let errorHeaders;
@@ -2102,6 +2102,7 @@ function getDocumentHeadersImpl(context, getRouteHeadersFn) {
2102
2102
  return errorHeaders != null;
2103
2103
  });
2104
2104
  }
2105
+ const defaultHeaders = new Headers(_defaultHeaders);
2105
2106
  return matches.reduce((parentHeaders, match, idx) => {
2106
2107
  let { id } = match.route;
2107
2108
  let loaderHeaders = context.loaderHeaders[id] || new Headers();
@@ -2133,7 +2134,7 @@ function getDocumentHeadersImpl(context, getRouteHeadersFn) {
2133
2134
  prependCookies(loaderHeaders, headers);
2134
2135
  prependCookies(parentHeaders, headers);
2135
2136
  return headers;
2136
- }, new Headers());
2137
+ }, new Headers(defaultHeaders));
2137
2138
  }
2138
2139
  function prependCookies(parentHeaders, childHeaders) {
2139
2140
  let parentSetCookieString = parentHeaders.get("Set-Cookie");
@@ -2157,7 +2158,7 @@ var ServerStorage = globalVar.___reactRouterServerStorage___ ?? (globalVar.___re
2157
2158
  var redirect2 = (...args) => {
2158
2159
  const response = redirect(...args);
2159
2160
  const ctx = ServerStorage.getStore();
2160
- if (ctx) {
2161
+ if (ctx && ctx.runningAction) {
2161
2162
  ctx.redirect = response;
2162
2163
  }
2163
2164
  return response;
@@ -2165,7 +2166,7 @@ var redirect2 = (...args) => {
2165
2166
  var redirectDocument2 = (...args) => {
2166
2167
  const response = redirectDocument(...args);
2167
2168
  const ctx = ServerStorage.getStore();
2168
- if (ctx) {
2169
+ if (ctx && ctx.runningAction) {
2169
2170
  ctx.redirect = response;
2170
2171
  }
2171
2172
  return response;
@@ -2173,7 +2174,7 @@ var redirectDocument2 = (...args) => {
2173
2174
  var replace2 = (...args) => {
2174
2175
  const response = replace(...args);
2175
2176
  const ctx = ServerStorage.getStore();
2176
- if (ctx) {
2177
+ if (ctx && ctx.runningAction) {
2177
2178
  ctx.redirect = response;
2178
2179
  }
2179
2180
  return response;
@@ -2429,7 +2430,9 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
2429
2430
  })
2430
2431
  });
2431
2432
  let actionResult;
2432
- const ctx = {};
2433
+ const ctx = {
2434
+ runningAction: false
2435
+ };
2433
2436
  const result = await ServerStorage.run(
2434
2437
  ctx,
2435
2438
  () => staticHandler.query(request, {
@@ -2440,6 +2443,7 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
2440
2443
  async unstable_generateMiddlewareResponse(query) {
2441
2444
  let formState;
2442
2445
  if (request.method === "POST") {
2446
+ ctx.runningAction = true;
2443
2447
  let result2 = await processServerAction(
2444
2448
  request,
2445
2449
  basename,
@@ -2450,6 +2454,7 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
2450
2454
  onError,
2451
2455
  temporaryReferences
2452
2456
  );
2457
+ ctx.runningAction = false;
2453
2458
  if (isResponse(result2)) {
2454
2459
  return generateRedirectResponse(
2455
2460
  result2,
@@ -2457,22 +2462,24 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
2457
2462
  basename,
2458
2463
  isDataRequest,
2459
2464
  generateResponse,
2460
- temporaryReferences
2465
+ temporaryReferences,
2466
+ ctx.redirect?.headers
2461
2467
  );
2462
2468
  }
2463
2469
  actionResult = result2?.actionResult;
2464
2470
  formState = result2?.formState;
2465
2471
  request = result2?.revalidationRequest ?? request;
2466
- }
2467
- if (ctx.redirect) {
2468
- return generateRedirectResponse(
2469
- ctx.redirect,
2470
- actionResult,
2471
- basename,
2472
- isDataRequest,
2473
- generateResponse,
2474
- temporaryReferences
2475
- );
2472
+ if (ctx.redirect) {
2473
+ return generateRedirectResponse(
2474
+ ctx.redirect,
2475
+ actionResult,
2476
+ basename,
2477
+ isDataRequest,
2478
+ generateResponse,
2479
+ temporaryReferences,
2480
+ void 0
2481
+ );
2482
+ }
2476
2483
  }
2477
2484
  let staticContext = await query(request);
2478
2485
  if (isResponse(staticContext)) {
@@ -2482,7 +2489,8 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
2482
2489
  basename,
2483
2490
  isDataRequest,
2484
2491
  generateResponse,
2485
- temporaryReferences
2492
+ temporaryReferences,
2493
+ ctx.redirect?.headers
2486
2494
  );
2487
2495
  }
2488
2496
  return generateStaticContextResponse(
@@ -2496,7 +2504,8 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
2496
2504
  actionResult,
2497
2505
  formState,
2498
2506
  staticContext,
2499
- temporaryReferences
2507
+ temporaryReferences,
2508
+ ctx.redirect?.headers
2500
2509
  );
2501
2510
  }
2502
2511
  })
@@ -2508,13 +2517,14 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
2508
2517
  basename,
2509
2518
  isDataRequest,
2510
2519
  generateResponse,
2511
- temporaryReferences
2520
+ temporaryReferences,
2521
+ ctx.redirect?.headers
2512
2522
  );
2513
2523
  }
2514
2524
  invariant2(isResponse(result), "Expected a response from query");
2515
2525
  return result;
2516
2526
  }
2517
- function generateRedirectResponse(response, actionResult, basename, isDataRequest, generateResponse, temporaryReferences) {
2527
+ function generateRedirectResponse(response, actionResult, basename, isDataRequest, generateResponse, temporaryReferences, sideEffectRedirectHeaders) {
2518
2528
  let redirect3 = response.headers.get("Location");
2519
2529
  if (isDataRequest && basename) {
2520
2530
  redirect3 = stripBasename(redirect3, basename) || redirect3;
@@ -2527,7 +2537,10 @@ function generateRedirectResponse(response, actionResult, basename, isDataReques
2527
2537
  status: response.status,
2528
2538
  actionResult
2529
2539
  };
2530
- let headers = new Headers(response.headers);
2540
+ let headers = new Headers(sideEffectRedirectHeaders);
2541
+ for (const [key, value] of response.headers.entries()) {
2542
+ headers.append(key, value);
2543
+ }
2531
2544
  headers.delete("Location");
2532
2545
  headers.delete("X-Remix-Reload-Document");
2533
2546
  headers.delete("X-Remix-Replace");
@@ -2543,7 +2556,7 @@ function generateRedirectResponse(response, actionResult, basename, isDataReques
2543
2556
  { temporaryReferences }
2544
2557
  );
2545
2558
  }
2546
- async function generateStaticContextResponse(routes, basename, generateResponse, statusCode, routeIdsToLoad, isDataRequest, isSubmission, actionResult, formState, staticContext, temporaryReferences) {
2559
+ async function generateStaticContextResponse(routes, basename, generateResponse, statusCode, routeIdsToLoad, isDataRequest, isSubmission, actionResult, formState, staticContext, temporaryReferences, sideEffectRedirectHeaders) {
2547
2560
  statusCode = staticContext.statusCode ?? statusCode;
2548
2561
  if (staticContext.errors) {
2549
2562
  staticContext.errors = Object.fromEntries(
@@ -2564,7 +2577,8 @@ async function generateStaticContextResponse(routes, basename, generateResponse,
2564
2577
  });
2565
2578
  let headers = getDocumentHeadersImpl(
2566
2579
  staticContext,
2567
- (match) => match.route.headers
2580
+ (match) => match.route.headers,
2581
+ sideEffectRedirectHeaders
2568
2582
  );
2569
2583
  headers.delete("Content-Length");
2570
2584
  const baseRenderPayload = {
@@ -6,7 +6,7 @@ export { Await, BrowserRouter, Form, HashRouter, Link, Links, MemoryRouter, Meta
6
6
  import { serialize, parse } from 'cookie';
7
7
 
8
8
  /**
9
- * react-router v7.8.0-pre.1
9
+ * react-router v7.8.0-pre.2
10
10
  *
11
11
  * Copyright (c) Remix Software Inc.
12
12
  *
@@ -2065,7 +2065,7 @@ function invariant2(value, message) {
2065
2065
  }
2066
2066
 
2067
2067
  // lib/server-runtime/headers.ts
2068
- function getDocumentHeadersImpl(context, getRouteHeadersFn) {
2068
+ function getDocumentHeadersImpl(context, getRouteHeadersFn, _defaultHeaders) {
2069
2069
  let boundaryIdx = context.errors ? context.matches.findIndex((m) => context.errors[m.route.id]) : -1;
2070
2070
  let matches = boundaryIdx >= 0 ? context.matches.slice(0, boundaryIdx + 1) : context.matches;
2071
2071
  let errorHeaders;
@@ -2081,6 +2081,7 @@ function getDocumentHeadersImpl(context, getRouteHeadersFn) {
2081
2081
  return errorHeaders != null;
2082
2082
  });
2083
2083
  }
2084
+ const defaultHeaders = new Headers(_defaultHeaders);
2084
2085
  return matches.reduce((parentHeaders, match, idx) => {
2085
2086
  let { id } = match.route;
2086
2087
  let loaderHeaders = context.loaderHeaders[id] || new Headers();
@@ -2112,7 +2113,7 @@ function getDocumentHeadersImpl(context, getRouteHeadersFn) {
2112
2113
  prependCookies(loaderHeaders, headers);
2113
2114
  prependCookies(parentHeaders, headers);
2114
2115
  return headers;
2115
- }, new Headers());
2116
+ }, new Headers(defaultHeaders));
2116
2117
  }
2117
2118
  function prependCookies(parentHeaders, childHeaders) {
2118
2119
  let parentSetCookieString = parentHeaders.get("Set-Cookie");
@@ -2136,7 +2137,7 @@ var ServerStorage = globalVar.___reactRouterServerStorage___ ?? (globalVar.___re
2136
2137
  var redirect2 = (...args) => {
2137
2138
  const response = redirect(...args);
2138
2139
  const ctx = ServerStorage.getStore();
2139
- if (ctx) {
2140
+ if (ctx && ctx.runningAction) {
2140
2141
  ctx.redirect = response;
2141
2142
  }
2142
2143
  return response;
@@ -2144,7 +2145,7 @@ var redirect2 = (...args) => {
2144
2145
  var redirectDocument2 = (...args) => {
2145
2146
  const response = redirectDocument(...args);
2146
2147
  const ctx = ServerStorage.getStore();
2147
- if (ctx) {
2148
+ if (ctx && ctx.runningAction) {
2148
2149
  ctx.redirect = response;
2149
2150
  }
2150
2151
  return response;
@@ -2152,7 +2153,7 @@ var redirectDocument2 = (...args) => {
2152
2153
  var replace2 = (...args) => {
2153
2154
  const response = replace(...args);
2154
2155
  const ctx = ServerStorage.getStore();
2155
- if (ctx) {
2156
+ if (ctx && ctx.runningAction) {
2156
2157
  ctx.redirect = response;
2157
2158
  }
2158
2159
  return response;
@@ -2408,7 +2409,9 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
2408
2409
  })
2409
2410
  });
2410
2411
  let actionResult;
2411
- const ctx = {};
2412
+ const ctx = {
2413
+ runningAction: false
2414
+ };
2412
2415
  const result = await ServerStorage.run(
2413
2416
  ctx,
2414
2417
  () => staticHandler.query(request, {
@@ -2419,6 +2422,7 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
2419
2422
  async unstable_generateMiddlewareResponse(query) {
2420
2423
  let formState;
2421
2424
  if (request.method === "POST") {
2425
+ ctx.runningAction = true;
2422
2426
  let result2 = await processServerAction(
2423
2427
  request,
2424
2428
  basename,
@@ -2429,6 +2433,7 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
2429
2433
  onError,
2430
2434
  temporaryReferences
2431
2435
  );
2436
+ ctx.runningAction = false;
2432
2437
  if (isResponse(result2)) {
2433
2438
  return generateRedirectResponse(
2434
2439
  result2,
@@ -2436,22 +2441,24 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
2436
2441
  basename,
2437
2442
  isDataRequest,
2438
2443
  generateResponse,
2439
- temporaryReferences
2444
+ temporaryReferences,
2445
+ ctx.redirect?.headers
2440
2446
  );
2441
2447
  }
2442
2448
  actionResult = result2?.actionResult;
2443
2449
  formState = result2?.formState;
2444
2450
  request = result2?.revalidationRequest ?? request;
2445
- }
2446
- if (ctx.redirect) {
2447
- return generateRedirectResponse(
2448
- ctx.redirect,
2449
- actionResult,
2450
- basename,
2451
- isDataRequest,
2452
- generateResponse,
2453
- temporaryReferences
2454
- );
2451
+ if (ctx.redirect) {
2452
+ return generateRedirectResponse(
2453
+ ctx.redirect,
2454
+ actionResult,
2455
+ basename,
2456
+ isDataRequest,
2457
+ generateResponse,
2458
+ temporaryReferences,
2459
+ void 0
2460
+ );
2461
+ }
2455
2462
  }
2456
2463
  let staticContext = await query(request);
2457
2464
  if (isResponse(staticContext)) {
@@ -2461,7 +2468,8 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
2461
2468
  basename,
2462
2469
  isDataRequest,
2463
2470
  generateResponse,
2464
- temporaryReferences
2471
+ temporaryReferences,
2472
+ ctx.redirect?.headers
2465
2473
  );
2466
2474
  }
2467
2475
  return generateStaticContextResponse(
@@ -2475,7 +2483,8 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
2475
2483
  actionResult,
2476
2484
  formState,
2477
2485
  staticContext,
2478
- temporaryReferences
2486
+ temporaryReferences,
2487
+ ctx.redirect?.headers
2479
2488
  );
2480
2489
  }
2481
2490
  })
@@ -2487,13 +2496,14 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
2487
2496
  basename,
2488
2497
  isDataRequest,
2489
2498
  generateResponse,
2490
- temporaryReferences
2499
+ temporaryReferences,
2500
+ ctx.redirect?.headers
2491
2501
  );
2492
2502
  }
2493
2503
  invariant2(isResponse(result), "Expected a response from query");
2494
2504
  return result;
2495
2505
  }
2496
- function generateRedirectResponse(response, actionResult, basename, isDataRequest, generateResponse, temporaryReferences) {
2506
+ function generateRedirectResponse(response, actionResult, basename, isDataRequest, generateResponse, temporaryReferences, sideEffectRedirectHeaders) {
2497
2507
  let redirect3 = response.headers.get("Location");
2498
2508
  if (isDataRequest && basename) {
2499
2509
  redirect3 = stripBasename(redirect3, basename) || redirect3;
@@ -2506,7 +2516,10 @@ function generateRedirectResponse(response, actionResult, basename, isDataReques
2506
2516
  status: response.status,
2507
2517
  actionResult
2508
2518
  };
2509
- let headers = new Headers(response.headers);
2519
+ let headers = new Headers(sideEffectRedirectHeaders);
2520
+ for (const [key, value] of response.headers.entries()) {
2521
+ headers.append(key, value);
2522
+ }
2510
2523
  headers.delete("Location");
2511
2524
  headers.delete("X-Remix-Reload-Document");
2512
2525
  headers.delete("X-Remix-Replace");
@@ -2522,7 +2535,7 @@ function generateRedirectResponse(response, actionResult, basename, isDataReques
2522
2535
  { temporaryReferences }
2523
2536
  );
2524
2537
  }
2525
- async function generateStaticContextResponse(routes, basename, generateResponse, statusCode, routeIdsToLoad, isDataRequest, isSubmission, actionResult, formState, staticContext, temporaryReferences) {
2538
+ async function generateStaticContextResponse(routes, basename, generateResponse, statusCode, routeIdsToLoad, isDataRequest, isSubmission, actionResult, formState, staticContext, temporaryReferences, sideEffectRedirectHeaders) {
2526
2539
  statusCode = staticContext.statusCode ?? statusCode;
2527
2540
  if (staticContext.errors) {
2528
2541
  staticContext.errors = Object.fromEntries(
@@ -2543,7 +2556,8 @@ async function generateStaticContextResponse(routes, basename, generateResponse,
2543
2556
  });
2544
2557
  let headers = getDocumentHeadersImpl(
2545
2558
  staticContext,
2546
- (match) => match.route.headers
2559
+ (match) => match.route.headers,
2560
+ sideEffectRedirectHeaders
2547
2561
  );
2548
2562
  headers.delete("Content-Length");
2549
2563
  const baseRenderPayload = {
@@ -6,8 +6,8 @@ import * as React from 'react';
6
6
  import React__default, { ReactElement } from 'react';
7
7
  import { c as RouteModules, d as SerializeFrom, e as MetaFunction, f as LinksFunction, A as AppLoadContext, E as Equal, g as ClientActionFunction, h as ClientLoaderFunction, H as HeadersFunction } from './route-data-CpB5xtMm.mjs';
8
8
  export { i as ClientActionFunctionArgs, j as ClientLoaderFunctionArgs, k as HeadersArgs, n as HtmlLinkDescriptor, L as LinkDescriptor, l as MetaArgs, M as MetaDescriptor, m as PageLinkDescriptor, u as unstable_SerializesTo } from './route-data-CpB5xtMm.mjs';
9
- import { A as AssetsManifest, E as EntryContext, F as FutureConfig, S as ServerBuild } from './index-react-server-client-CuajY2vy.mjs';
10
- export { l as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, a1 as DiscoverBehavior, c as FetcherFormProps, h as FetcherSubmitFunction, G as FetcherSubmitOptions, i as FetcherWithComponents, q as Form, d as FormProps, a2 as HandleDataRequestFunction, a3 as HandleDocumentRequestFunction, a4 as HandleErrorFunction, m as HashRouter, H as HashRouterProps, a as HistoryRouterProps, n as Link, L as LinkProps, X as Links, _ as LinksProps, W as Meta, p as NavLink, N as NavLinkProps, b as NavLinkRenderProps, P as ParamKeyValuePair, a0 as PrefetchBehavior, Z as PrefetchPageLinks, Y as Scripts, $ as ScriptsProps, r as ScrollRestoration, e as ScrollRestorationProps, a5 as ServerEntryModule, f as SetURLSearchParams, T as StaticRouter, M as StaticRouterProps, V as StaticRouterProvider, O as StaticRouterProviderProps, g as SubmitFunction, I as SubmitOptions, J as SubmitTarget, a6 as UNSAFE_FrameworkContext, a7 as UNSAFE_createClientRoutes, a8 as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, a9 as UNSAFE_shouldHydrateRouteLoader, aa as UNSAFE_useScrollRestoration, U as URLSearchParamsInit, j as createBrowserRouter, k as createHashRouter, K as createSearchParams, Q as createStaticHandler, R as createStaticRouter, o as unstable_HistoryRouter, z as unstable_usePrompt, y as useBeforeUnload, w as useFetcher, x as useFetchers, v as useFormAction, u as useLinkClickHandler, s as useSearchParams, t as useSubmit, C as useViewTransitionState } from './index-react-server-client-CuajY2vy.mjs';
9
+ import { A as AssetsManifest, E as EntryContext, F as FutureConfig, S as ServerBuild } from './index-react-server-client-DXb0OgpJ.mjs';
10
+ export { l as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, a1 as DiscoverBehavior, c as FetcherFormProps, h as FetcherSubmitFunction, G as FetcherSubmitOptions, i as FetcherWithComponents, q as Form, d as FormProps, a2 as HandleDataRequestFunction, a3 as HandleDocumentRequestFunction, a4 as HandleErrorFunction, m as HashRouter, H as HashRouterProps, a as HistoryRouterProps, n as Link, L as LinkProps, X as Links, _ as LinksProps, W as Meta, p as NavLink, N as NavLinkProps, b as NavLinkRenderProps, P as ParamKeyValuePair, a0 as PrefetchBehavior, Z as PrefetchPageLinks, Y as Scripts, $ as ScriptsProps, r as ScrollRestoration, e as ScrollRestorationProps, a5 as ServerEntryModule, f as SetURLSearchParams, T as StaticRouter, M as StaticRouterProps, V as StaticRouterProvider, O as StaticRouterProviderProps, g as SubmitFunction, I as SubmitOptions, J as SubmitTarget, a6 as UNSAFE_FrameworkContext, a7 as UNSAFE_createClientRoutes, a8 as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, a9 as UNSAFE_shouldHydrateRouteLoader, aa as UNSAFE_useScrollRestoration, U as URLSearchParamsInit, j as createBrowserRouter, k as createHashRouter, K as createSearchParams, Q as createStaticHandler, R as createStaticRouter, o as unstable_HistoryRouter, z as unstable_usePrompt, y as useBeforeUnload, w as useFetcher, x as useFetchers, v as useFormAction, u as useLinkClickHandler, s as useSearchParams, t as useSubmit, C as useViewTransitionState } from './index-react-server-client-DXb0OgpJ.mjs';
11
11
  import { ParseOptions, SerializeOptions } from 'cookie';
12
12
  export { ParseOptions as CookieParseOptions, SerializeOptions as CookieSerializeOptions } from 'cookie';
13
13
  import { P as Pages } from './register-DiOIlEq5.mjs';
@@ -1,7 +1,7 @@
1
1
  import { d as Router, e as RouteModules, D as DataStrategyFunction, T as To, f as NavigateOptions, B as BlockerFunction, g as Blocker, h as SerializeFrom, i as RelativeRoutingType, a as Location, j as ParamParseKey, k as Path, l as PathPattern, m as PathMatch, U as UIMatch, n as Navigation, A as Action, o as Params, p as RouteObject, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, t as MetaFunction, v as LinksFunction, w as NonIndexRouteObject, x as AppLoadContext, y as unstable_RouterContextProvider, z as MiddlewareEnabled, E as Equal, F as ClientActionFunction, J as ClientLoaderFunction, K as HeadersFunction, O as ShouldRevalidateFunction, Q as RouterInit, V as RouterState, W as PatchRoutesOnNavigationFunction, X as DataRouteObject } from './routeModules-qBivMBjd.js';
2
2
  export { a6 as ActionFunctionArgs, aF as ClientActionFunctionArgs, aG as ClientLoaderFunctionArgs, aB as DataRouteMatch, a7 as DataStrategyFunctionArgs, a8 as DataStrategyMatch, a9 as DataStrategyResult, ab as ErrorResponse, a0 as Fetcher, ac as FormEncType, ad as FormMethod, aL as Future, Z as GetScrollPositionFunction, _ as GetScrollRestorationKeyFunction, ae as HTMLFormMethod, aH as HeadersArgs, aK as HtmlLinkDescriptor, ar as IDLE_BLOCKER, aq as IDLE_FETCHER, ap as IDLE_NAVIGATION, af as LazyRouteFunction, L as LinkDescriptor, ag as LoaderFunctionArgs, aI as MetaArgs, M as MetaDescriptor, a1 as NavigationStates, aC as Navigator, aJ as PageLinkDescriptor, aD as PatchRoutesOnNavigationFunctionArgs, ai as PathParam, aj as RedirectFunction, a5 as RevalidationState, aE as RouteMatch, a4 as RouterFetchOptions, a3 as RouterNavigateOptions, a2 as RouterSubscriber, al as ShouldRevalidateFunctionArgs, Y as StaticHandler, $ as StaticHandlerContext, aR as UNSAFE_DataRouterContext, aS as UNSAFE_DataRouterStateContext, aa as UNSAFE_DataWithResponseInit, aQ as UNSAFE_ErrorResponseImpl, aT as UNSAFE_FetchersContext, aU as UNSAFE_LocationContext, aV as UNSAFE_NavigationContext, aW as UNSAFE_RouteContext, aX as UNSAFE_ViewTransitionContext, aN as UNSAFE_createBrowserHistory, aP as UNSAFE_createRouter, aO as UNSAFE_invariant, an as createPath, as as data, at as generatePath, au as isRouteErrorResponse, av as matchPath, aw as matchRoutes, ao as parsePath, ax as redirect, ay as redirectDocument, az as replace, aA as resolvePath, ah as unstable_MiddlewareFunction, ak as unstable_RouterContext, aM as unstable_SerializesTo, am as unstable_createContext } from './routeModules-qBivMBjd.js';
3
- import { A as AssetsManifest, E as EntryContext, F as FutureConfig, R as RouteComponentType, H as HydrateFallbackType, a as ErrorBoundaryType, S as ServerBuild } from './index-react-server-client-BzBbJLAD.js';
4
- export { h as Await, b as AwaitProps, V as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, as as DiscoverBehavior, y as FetcherFormProps, K as FetcherSubmitFunction, a9 as FetcherSubmitOptions, Q as FetcherWithComponents, _ as Form, z as FormProps, at as HandleDataRequestFunction, au as HandleDocumentRequestFunction, av as HandleErrorFunction, W as HashRouter, t as HashRouterProps, u as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, X as Link, v as LinkProps, am as Links, ap as LinksProps, i as MemoryRouter, M as MemoryRouterOpts, c as MemoryRouterProps, al as Meta, Z as NavLink, w as NavLinkProps, x as NavLinkRenderProps, j as Navigate, N as NavigateProps, k as Outlet, O as OutletProps, aa as ParamKeyValuePair, P as PathRouteProps, ar as PrefetchBehavior, ao as PrefetchPageLinks, l as Route, d as RouteProps, m as Router, e as RouterProps, n as RouterProvider, f as RouterProviderProps, o as Routes, g as RoutesProps, an as Scripts, aq as ScriptsProps, $ as ScrollRestoration, C as ScrollRestorationProps, aw as ServerEntryModule, G as SetURLSearchParams, aj as StaticRouter, af as StaticRouterProps, ak as StaticRouterProvider, ag as StaticRouterProviderProps, J as SubmitFunction, ab as SubmitOptions, ad as SubmitTarget, aF as UNSAFE_FrameworkContext, az as UNSAFE_WithComponentProps, aD as UNSAFE_WithErrorBoundaryProps, aB as UNSAFE_WithHydrateFallbackProps, aG as UNSAFE_createClientRoutes, aH as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ax as UNSAFE_hydrationRouteProperties, ay as UNSAFE_mapRouteProperties, aI as UNSAFE_shouldHydrateRouteLoader, aJ as UNSAFE_useScrollRestoration, aA as UNSAFE_withComponentProps, aE as UNSAFE_withErrorBoundaryProps, aC as UNSAFE_withHydrateFallbackProps, ac as URLSearchParamsInit, T as createBrowserRouter, U as createHashRouter, p as createMemoryRouter, q as createRoutesFromChildren, r as createRoutesFromElements, ae as createSearchParams, ah as createStaticHandler, ai as createStaticRouter, s as renderMatches, Y as unstable_HistoryRouter, a7 as unstable_usePrompt, a6 as useBeforeUnload, a4 as useFetcher, a5 as useFetchers, a3 as useFormAction, a0 as useLinkClickHandler, a1 as useSearchParams, a2 as useSubmit, a8 as useViewTransitionState } from './index-react-server-client-BzBbJLAD.js';
3
+ import { A as AssetsManifest, E as EntryContext, F as FutureConfig, R as RouteComponentType, H as HydrateFallbackType, a as ErrorBoundaryType, S as ServerBuild } from './index-react-server-client-CMphySRb.js';
4
+ export { h as Await, b as AwaitProps, V as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, as as DiscoverBehavior, y as FetcherFormProps, K as FetcherSubmitFunction, a9 as FetcherSubmitOptions, Q as FetcherWithComponents, _ as Form, z as FormProps, at as HandleDataRequestFunction, au as HandleDocumentRequestFunction, av as HandleErrorFunction, W as HashRouter, t as HashRouterProps, u as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, X as Link, v as LinkProps, am as Links, ap as LinksProps, i as MemoryRouter, M as MemoryRouterOpts, c as MemoryRouterProps, al as Meta, Z as NavLink, w as NavLinkProps, x as NavLinkRenderProps, j as Navigate, N as NavigateProps, k as Outlet, O as OutletProps, aa as ParamKeyValuePair, P as PathRouteProps, ar as PrefetchBehavior, ao as PrefetchPageLinks, l as Route, d as RouteProps, m as Router, e as RouterProps, n as RouterProvider, f as RouterProviderProps, o as Routes, g as RoutesProps, an as Scripts, aq as ScriptsProps, $ as ScrollRestoration, C as ScrollRestorationProps, aw as ServerEntryModule, G as SetURLSearchParams, aj as StaticRouter, af as StaticRouterProps, ak as StaticRouterProvider, ag as StaticRouterProviderProps, J as SubmitFunction, ab as SubmitOptions, ad as SubmitTarget, aF as UNSAFE_FrameworkContext, az as UNSAFE_WithComponentProps, aD as UNSAFE_WithErrorBoundaryProps, aB as UNSAFE_WithHydrateFallbackProps, aG as UNSAFE_createClientRoutes, aH as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ax as UNSAFE_hydrationRouteProperties, ay as UNSAFE_mapRouteProperties, aI as UNSAFE_shouldHydrateRouteLoader, aJ as UNSAFE_useScrollRestoration, aA as UNSAFE_withComponentProps, aE as UNSAFE_withErrorBoundaryProps, aC as UNSAFE_withHydrateFallbackProps, ac as URLSearchParamsInit, T as createBrowserRouter, U as createHashRouter, p as createMemoryRouter, q as createRoutesFromChildren, r as createRoutesFromElements, ae as createSearchParams, ah as createStaticHandler, ai as createStaticRouter, s as renderMatches, Y as unstable_HistoryRouter, a7 as unstable_usePrompt, a6 as useBeforeUnload, a4 as useFetcher, a5 as useFetchers, a3 as useFormAction, a0 as useLinkClickHandler, a1 as useSearchParams, a2 as useSubmit, a8 as useViewTransitionState } from './index-react-server-client-CMphySRb.js';
5
5
  import * as React from 'react';
6
6
  import React__default, { ReactElement } from 'react';
7
7
  import { ParseOptions, SerializeOptions } from 'cookie';