react-router 7.9.4-pre.0 → 7.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -2
- package/dist/development/{chunk-JPM6TDKY.js → chunk-72XNTZCV.js} +134 -134
- package/dist/development/{chunk-V7H6ON6M.js → chunk-DI2QHYMJ.js} +1 -1
- package/dist/development/{chunk-I2PHXWY4.mjs → chunk-OIYGIGL5.mjs} +2 -2
- package/dist/development/{chunk-5IRCOFJ2.mjs → chunk-WY5IRSCW.mjs} +2 -2
- package/dist/development/dom-export.js +3 -3
- package/dist/development/dom-export.mjs +3 -3
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.js +1 -1
- package/dist/development/index-react-server.mjs +1 -1
- package/dist/development/index.js +97 -97
- package/dist/development/index.mjs +3 -3
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/production/{chunk-VDTQF36D.mjs → chunk-3TADTUL4.mjs} +2 -2
- package/dist/production/{chunk-QIDCISSR.js → chunk-4E5LHRQP.js} +1 -1
- package/dist/production/{chunk-TK5RYV7M.mjs → chunk-FR6HSPLK.mjs} +2 -2
- package/dist/production/{chunk-A4C524Z4.js → chunk-WNLQ53P5.js} +134 -134
- package/dist/production/dom-export.js +3 -3
- package/dist/production/dom-export.mjs +3 -3
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.js +1 -1
- package/dist/production/index-react-server.mjs +1 -1
- package/dist/production/index.js +97 -97
- package/dist/production/index.mjs +3 -3
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/package.json +1 -1
package/dist/production/index.js
CHANGED
|
@@ -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.9.4
|
|
2
|
+
* react-router v7.9.4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
var
|
|
58
|
+
var _chunkWNLQ53P5js = require('./chunk-WNLQ53P5.js');
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
@@ -147,7 +147,7 @@ var _chunkA4C524Z4js = require('./chunk-A4C524Z4.js');
|
|
|
147
147
|
|
|
148
148
|
|
|
149
149
|
|
|
150
|
-
var
|
|
150
|
+
var _chunk4E5LHRQPjs = require('./chunk-4E5LHRQP.js');
|
|
151
151
|
|
|
152
152
|
// lib/dom/ssr/server.tsx
|
|
153
153
|
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React4 = _interopRequireWildcard(_react); var React5 = _interopRequireWildcard(_react);
|
|
@@ -160,7 +160,7 @@ function ServerRouter({
|
|
|
160
160
|
url = new URL(url);
|
|
161
161
|
}
|
|
162
162
|
let { manifest, routeModules, criticalCss, serverHandoffString } = context;
|
|
163
|
-
let routes =
|
|
163
|
+
let routes = _chunk4E5LHRQPjs.createServerRoutes.call(void 0,
|
|
164
164
|
manifest.routes,
|
|
165
165
|
routeModules,
|
|
166
166
|
context.future,
|
|
@@ -173,7 +173,7 @@ function ServerRouter({
|
|
|
173
173
|
let routeId = match.route.id;
|
|
174
174
|
let route = routeModules[routeId];
|
|
175
175
|
let manifestRoute = context.manifest.routes[routeId];
|
|
176
|
-
if (route && manifestRoute &&
|
|
176
|
+
if (route && manifestRoute && _chunk4E5LHRQPjs.shouldHydrateRouteLoader.call(void 0,
|
|
177
177
|
routeId,
|
|
178
178
|
route.clientLoader,
|
|
179
179
|
manifestRoute.hasLoader,
|
|
@@ -182,9 +182,9 @@ function ServerRouter({
|
|
|
182
182
|
delete context.staticHandlerContext.loaderData[routeId];
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
let router =
|
|
185
|
+
let router = _chunkWNLQ53P5js.createStaticRouter.call(void 0, routes, context.staticHandlerContext);
|
|
186
186
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
187
|
-
|
|
187
|
+
_chunk4E5LHRQPjs.FrameworkContext.Provider,
|
|
188
188
|
{
|
|
189
189
|
value: {
|
|
190
190
|
manifest,
|
|
@@ -199,8 +199,8 @@ function ServerRouter({
|
|
|
199
199
|
renderMeta: context.renderMeta
|
|
200
200
|
}
|
|
201
201
|
},
|
|
202
|
-
/* @__PURE__ */ React.createElement(
|
|
203
|
-
|
|
202
|
+
/* @__PURE__ */ React.createElement(_chunk4E5LHRQPjs.RemixErrorBoundary, { location: router.state.location }, /* @__PURE__ */ React.createElement(
|
|
203
|
+
_chunkWNLQ53P5js.StaticRouterProvider,
|
|
204
204
|
{
|
|
205
205
|
router,
|
|
206
206
|
context: context.staticHandlerContext,
|
|
@@ -208,7 +208,7 @@ function ServerRouter({
|
|
|
208
208
|
}
|
|
209
209
|
))
|
|
210
210
|
), context.serverHandoffStream ? /* @__PURE__ */ React.createElement(React.Suspense, null, /* @__PURE__ */ React.createElement(
|
|
211
|
-
|
|
211
|
+
_chunk4E5LHRQPjs.StreamTransfer,
|
|
212
212
|
{
|
|
213
213
|
context,
|
|
214
214
|
identifier: 0,
|
|
@@ -250,18 +250,18 @@ function createRoutesStub(routes, _context) {
|
|
|
250
250
|
let patched = processRoutes(
|
|
251
251
|
// @ts-expect-error `StubRouteObject` is stricter about `loader`/`action`
|
|
252
252
|
// types compared to `AgnosticRouteObject`
|
|
253
|
-
|
|
254
|
-
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.v8_middleware]) ? new (0,
|
|
253
|
+
_chunk4E5LHRQPjs.convertRoutesToDataRoutes.call(void 0, routes, (r) => r),
|
|
254
|
+
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.v8_middleware]) ? new (0, _chunk4E5LHRQPjs.RouterContextProvider)() : {},
|
|
255
255
|
frameworkContextRef.current.manifest,
|
|
256
256
|
frameworkContextRef.current.routeModules
|
|
257
257
|
);
|
|
258
|
-
routerRef.current =
|
|
258
|
+
routerRef.current = _chunkWNLQ53P5js.createMemoryRouter.call(void 0, patched, {
|
|
259
259
|
initialEntries,
|
|
260
260
|
initialIndex,
|
|
261
261
|
hydrationData
|
|
262
262
|
});
|
|
263
263
|
}
|
|
264
|
-
return /* @__PURE__ */ React2.createElement(
|
|
264
|
+
return /* @__PURE__ */ React2.createElement(_chunk4E5LHRQPjs.FrameworkContext.Provider, { value: frameworkContextRef.current }, /* @__PURE__ */ React2.createElement(_chunkWNLQ53P5js.RouterProvider, { router: routerRef.current }));
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
267
|
function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
@@ -275,9 +275,9 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
275
275
|
id: route.id,
|
|
276
276
|
path: route.path,
|
|
277
277
|
index: route.index,
|
|
278
|
-
Component: route.Component ?
|
|
279
|
-
HydrateFallback: route.HydrateFallback ?
|
|
280
|
-
ErrorBoundary: route.ErrorBoundary ?
|
|
278
|
+
Component: route.Component ? _chunkWNLQ53P5js.withComponentProps.call(void 0, route.Component) : void 0,
|
|
279
|
+
HydrateFallback: route.HydrateFallback ? _chunkWNLQ53P5js.withHydrateFallbackProps.call(void 0, route.HydrateFallback) : void 0,
|
|
280
|
+
ErrorBoundary: route.ErrorBoundary ? _chunkWNLQ53P5js.withErrorBoundaryProps.call(void 0, route.ErrorBoundary) : void 0,
|
|
281
281
|
action: route.action ? (args) => route.action({ ...args, context }) : void 0,
|
|
282
282
|
loader: route.loader ? (args) => route.loader({ ...args, context }) : void 0,
|
|
283
283
|
middleware: route.middleware ? route.middleware.map(
|
|
@@ -312,7 +312,7 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
312
312
|
};
|
|
313
313
|
manifest.routes[newRoute.id] = entryRoute;
|
|
314
314
|
routeModules[route.id] = {
|
|
315
|
-
default: newRoute.Component ||
|
|
315
|
+
default: newRoute.Component || _chunkWNLQ53P5js.Outlet,
|
|
316
316
|
ErrorBoundary: newRoute.ErrorBoundary || void 0,
|
|
317
317
|
handle: route.handle,
|
|
318
318
|
links: route.links,
|
|
@@ -507,7 +507,7 @@ function myUnescape(value) {
|
|
|
507
507
|
return result;
|
|
508
508
|
}
|
|
509
509
|
function warnOnceAboutExpiresCookie(name, expires) {
|
|
510
|
-
|
|
510
|
+
_chunk4E5LHRQPjs.warnOnce.call(void 0,
|
|
511
511
|
!expires,
|
|
512
512
|
`The "${name}" cookie has an "expires" property set. This will cause the expires value to not be updated when the session is committed. Instead, you should set the expires value when serializing the cookie. You can use \`commitSession(session, { expires })\` if using a session storage object, or \`cookie.serialize("value", { expires })\` if you're using the cookie directly.`
|
|
513
513
|
);
|
|
@@ -561,7 +561,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
561
561
|
let entries = Object.entries(errors);
|
|
562
562
|
let serialized = {};
|
|
563
563
|
for (let [key, val] of entries) {
|
|
564
|
-
if (
|
|
564
|
+
if (_chunk4E5LHRQPjs.isRouteErrorResponse.call(void 0, val)) {
|
|
565
565
|
serialized[key] = { ...val, __type: "RouteErrorResponse" };
|
|
566
566
|
} else if (val instanceof Error) {
|
|
567
567
|
let sanitized = sanitizeError(val, serverMode);
|
|
@@ -586,7 +586,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
586
586
|
|
|
587
587
|
// lib/server-runtime/routeMatching.ts
|
|
588
588
|
function matchServerRoutes(routes, pathname, basename) {
|
|
589
|
-
let matches =
|
|
589
|
+
let matches = _chunk4E5LHRQPjs.matchRoutes.call(void 0,
|
|
590
590
|
routes,
|
|
591
591
|
pathname,
|
|
592
592
|
basename
|
|
@@ -606,7 +606,7 @@ async function callRouteHandler(handler, args) {
|
|
|
606
606
|
params: args.params,
|
|
607
607
|
context: args.context
|
|
608
608
|
});
|
|
609
|
-
if (
|
|
609
|
+
if (_chunk4E5LHRQPjs.isDataWithResponseInit.call(void 0, result) && result.init && result.init.status && _chunk4E5LHRQPjs.isRedirectStatusCode.call(void 0, result.init.status)) {
|
|
610
610
|
throw new Response(null, result.init);
|
|
611
611
|
}
|
|
612
612
|
return result;
|
|
@@ -725,17 +725,17 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
725
725
|
controller.close();
|
|
726
726
|
}
|
|
727
727
|
});
|
|
728
|
-
let decoded = await
|
|
728
|
+
let decoded = await _chunk4E5LHRQPjs.decodeViaTurboStream.call(void 0, stream, global);
|
|
729
729
|
let data2 = decoded.value;
|
|
730
|
-
if (data2 &&
|
|
731
|
-
let result = data2[
|
|
730
|
+
if (data2 && _chunk4E5LHRQPjs.SingleFetchRedirectSymbol in data2) {
|
|
731
|
+
let result = data2[_chunk4E5LHRQPjs.SingleFetchRedirectSymbol];
|
|
732
732
|
let init = { status: result.status };
|
|
733
733
|
if (result.reload) {
|
|
734
|
-
throw
|
|
734
|
+
throw _chunk4E5LHRQPjs.redirectDocument.call(void 0, result.redirect, init);
|
|
735
735
|
} else if (result.replace) {
|
|
736
|
-
throw
|
|
736
|
+
throw _chunk4E5LHRQPjs.replace.call(void 0, result.redirect, init);
|
|
737
737
|
} else {
|
|
738
|
-
throw
|
|
738
|
+
throw _chunk4E5LHRQPjs.redirect.call(void 0, result.redirect, init);
|
|
739
739
|
}
|
|
740
740
|
} else {
|
|
741
741
|
invariant2(
|
|
@@ -774,7 +774,7 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
774
774
|
|
|
775
775
|
// lib/server-runtime/serverHandoff.ts
|
|
776
776
|
function createServerHandoffString(serverHandoff) {
|
|
777
|
-
return
|
|
777
|
+
return _chunk4E5LHRQPjs.escapeHtml.call(void 0, JSON.stringify(serverHandoff));
|
|
778
778
|
}
|
|
779
779
|
|
|
780
780
|
// lib/server-runtime/headers.ts
|
|
@@ -851,7 +851,7 @@ function prependCookies(parentHeaders, childHeaders) {
|
|
|
851
851
|
|
|
852
852
|
// lib/server-runtime/single-fetch.ts
|
|
853
853
|
var SERVER_NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([
|
|
854
|
-
...
|
|
854
|
+
..._chunk4E5LHRQPjs.NO_BODY_STATUS_CODES,
|
|
855
855
|
304
|
|
856
856
|
]);
|
|
857
857
|
async function singleFetchAction(build, serverMode, staticHandler, request, handlerUrl, loadContext, handleError) {
|
|
@@ -881,7 +881,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
881
881
|
return handleQueryError(error);
|
|
882
882
|
}
|
|
883
883
|
function handleQueryResult(result) {
|
|
884
|
-
return
|
|
884
|
+
return _chunk4E5LHRQPjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
885
885
|
}
|
|
886
886
|
function handleQueryError(error) {
|
|
887
887
|
handleError(error);
|
|
@@ -893,12 +893,12 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
893
893
|
}
|
|
894
894
|
function staticContextToResponse(context) {
|
|
895
895
|
let headers = getDocumentHeaders(context, build);
|
|
896
|
-
if (
|
|
896
|
+
if (_chunk4E5LHRQPjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
897
897
|
return new Response(null, { status: context.statusCode, headers });
|
|
898
898
|
}
|
|
899
899
|
if (context.errors) {
|
|
900
900
|
Object.values(context.errors).forEach((err) => {
|
|
901
|
-
if (!
|
|
901
|
+
if (!_chunk4E5LHRQPjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
902
902
|
handleError(err);
|
|
903
903
|
}
|
|
904
904
|
});
|
|
@@ -945,7 +945,7 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
945
945
|
return handleQueryError(error);
|
|
946
946
|
}
|
|
947
947
|
function handleQueryResult(result) {
|
|
948
|
-
return
|
|
948
|
+
return _chunk4E5LHRQPjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
949
949
|
}
|
|
950
950
|
function handleQueryError(error) {
|
|
951
951
|
handleError(error);
|
|
@@ -957,12 +957,12 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
957
957
|
}
|
|
958
958
|
function staticContextToResponse(context) {
|
|
959
959
|
let headers = getDocumentHeaders(context, build);
|
|
960
|
-
if (
|
|
960
|
+
if (_chunk4E5LHRQPjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
961
961
|
return new Response(null, { status: context.statusCode, headers });
|
|
962
962
|
}
|
|
963
963
|
if (context.errors) {
|
|
964
964
|
Object.values(context.errors).forEach((err) => {
|
|
965
|
-
if (!
|
|
965
|
+
if (!_chunk4E5LHRQPjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
966
966
|
handleError(err);
|
|
967
967
|
}
|
|
968
968
|
});
|
|
@@ -1026,15 +1026,15 @@ function generateSingleFetchRedirectResponse(redirectResponse, request, build, s
|
|
|
1026
1026
|
headers.delete("Location");
|
|
1027
1027
|
headers.set("Content-Type", "text/x-script");
|
|
1028
1028
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
1029
|
-
result: request.method === "GET" ? { [
|
|
1029
|
+
result: request.method === "GET" ? { [_chunk4E5LHRQPjs.SingleFetchRedirectSymbol]: redirect2 } : redirect2,
|
|
1030
1030
|
headers,
|
|
1031
|
-
status:
|
|
1031
|
+
status: _chunk4E5LHRQPjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
1032
1032
|
});
|
|
1033
1033
|
}
|
|
1034
1034
|
function getSingleFetchRedirect(status, headers, basename) {
|
|
1035
1035
|
let redirect2 = headers.get("Location");
|
|
1036
1036
|
if (basename) {
|
|
1037
|
-
redirect2 =
|
|
1037
|
+
redirect2 = _chunk4E5LHRQPjs.stripBasename.call(void 0, redirect2, basename) || redirect2;
|
|
1038
1038
|
}
|
|
1039
1039
|
return {
|
|
1040
1040
|
redirect: redirect2,
|
|
@@ -1060,7 +1060,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1060
1060
|
typeof streamTimeout === "number" ? streamTimeout : 4950
|
|
1061
1061
|
);
|
|
1062
1062
|
requestSignal.addEventListener("abort", () => clearTimeout(timeoutId));
|
|
1063
|
-
return
|
|
1063
|
+
return _chunk4E5LHRQPjs.encode.call(void 0, data2, {
|
|
1064
1064
|
signal: controller.signal,
|
|
1065
1065
|
plugins: [
|
|
1066
1066
|
(value) => {
|
|
@@ -1068,12 +1068,12 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1068
1068
|
let { name, message, stack } = serverMode === "production" /* Production */ ? sanitizeError(value, serverMode) : value;
|
|
1069
1069
|
return ["SanitizedError", name, message, stack];
|
|
1070
1070
|
}
|
|
1071
|
-
if (value instanceof
|
|
1071
|
+
if (value instanceof _chunk4E5LHRQPjs.ErrorResponseImpl) {
|
|
1072
1072
|
let { data: data3, status, statusText } = value;
|
|
1073
1073
|
return ["ErrorResponse", data3, status, statusText];
|
|
1074
1074
|
}
|
|
1075
|
-
if (value && typeof value === "object" &&
|
|
1076
|
-
return ["SingleFetchRedirect", value[
|
|
1075
|
+
if (value && typeof value === "object" && _chunk4E5LHRQPjs.SingleFetchRedirectSymbol in value) {
|
|
1076
|
+
return ["SingleFetchRedirect", value[_chunk4E5LHRQPjs.SingleFetchRedirectSymbol]];
|
|
1077
1077
|
}
|
|
1078
1078
|
}
|
|
1079
1079
|
],
|
|
@@ -1096,14 +1096,14 @@ function derive(build, mode) {
|
|
|
1096
1096
|
let routes = createRoutes(build.routes);
|
|
1097
1097
|
let dataRoutes = createStaticHandlerDataRoutes(build.routes, build.future);
|
|
1098
1098
|
let serverMode = isServerMode(mode) ? mode : "production" /* Production */;
|
|
1099
|
-
let staticHandler =
|
|
1099
|
+
let staticHandler = _chunk4E5LHRQPjs.createStaticHandler.call(void 0, dataRoutes, {
|
|
1100
1100
|
basename: build.basename
|
|
1101
1101
|
});
|
|
1102
1102
|
let errorHandler = build.entry.module.handleError || ((error, { request }) => {
|
|
1103
1103
|
if (serverMode !== "test" /* Test */ && !request.signal.aborted) {
|
|
1104
1104
|
console.error(
|
|
1105
1105
|
// @ts-expect-error This is "private" from users but intended for internal use
|
|
1106
|
-
|
|
1106
|
+
_chunk4E5LHRQPjs.isRouteErrorResponse.call(void 0, error) && error.error ? error.error : error
|
|
1107
1107
|
);
|
|
1108
1108
|
}
|
|
1109
1109
|
});
|
|
@@ -1149,36 +1149,36 @@ var createRequestHandler = (build, mode) => {
|
|
|
1149
1149
|
});
|
|
1150
1150
|
};
|
|
1151
1151
|
if (_build.future.v8_middleware) {
|
|
1152
|
-
if (initialContext && !(initialContext instanceof
|
|
1152
|
+
if (initialContext && !(initialContext instanceof _chunk4E5LHRQPjs.RouterContextProvider)) {
|
|
1153
1153
|
let error = new Error(
|
|
1154
1154
|
"Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `RouterContextProvider` from your `getLoadContext` function."
|
|
1155
1155
|
);
|
|
1156
1156
|
handleError(error);
|
|
1157
1157
|
return returnLastResortErrorResponse(error, serverMode);
|
|
1158
1158
|
}
|
|
1159
|
-
loadContext = initialContext || new (0,
|
|
1159
|
+
loadContext = initialContext || new (0, _chunk4E5LHRQPjs.RouterContextProvider)();
|
|
1160
1160
|
} else {
|
|
1161
1161
|
loadContext = initialContext || {};
|
|
1162
1162
|
}
|
|
1163
1163
|
let url = new URL(request.url);
|
|
1164
1164
|
let normalizedBasename = _build.basename || "/";
|
|
1165
1165
|
let normalizedPath = url.pathname;
|
|
1166
|
-
if (
|
|
1166
|
+
if (_chunk4E5LHRQPjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) === "/_root.data") {
|
|
1167
1167
|
normalizedPath = normalizedBasename;
|
|
1168
1168
|
} else if (normalizedPath.endsWith(".data")) {
|
|
1169
1169
|
normalizedPath = normalizedPath.replace(/\.data$/, "");
|
|
1170
1170
|
}
|
|
1171
|
-
if (
|
|
1171
|
+
if (_chunk4E5LHRQPjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) !== "/" && normalizedPath.endsWith("/")) {
|
|
1172
1172
|
normalizedPath = normalizedPath.slice(0, -1);
|
|
1173
1173
|
}
|
|
1174
1174
|
let isSpaMode = getBuildTimeHeader(request, "X-React-Router-SPA-Mode") === "yes";
|
|
1175
1175
|
if (!_build.ssr) {
|
|
1176
1176
|
let decodedPath = decodeURI(normalizedPath);
|
|
1177
1177
|
if (normalizedBasename !== "/") {
|
|
1178
|
-
let strippedPath =
|
|
1178
|
+
let strippedPath = _chunk4E5LHRQPjs.stripBasename.call(void 0, decodedPath, normalizedBasename);
|
|
1179
1179
|
if (strippedPath == null) {
|
|
1180
1180
|
errorHandler(
|
|
1181
|
-
new (0,
|
|
1181
|
+
new (0, _chunk4E5LHRQPjs.ErrorResponseImpl)(
|
|
1182
1182
|
404,
|
|
1183
1183
|
"Not Found",
|
|
1184
1184
|
`Refusing to prerender the \`${decodedPath}\` path because it does not start with the basename \`${normalizedBasename}\``
|
|
@@ -1201,7 +1201,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1201
1201
|
} else if (!_build.prerender.includes(decodedPath) && !_build.prerender.includes(decodedPath + "/")) {
|
|
1202
1202
|
if (url.pathname.endsWith(".data")) {
|
|
1203
1203
|
errorHandler(
|
|
1204
|
-
new (0,
|
|
1204
|
+
new (0, _chunk4E5LHRQPjs.ErrorResponseImpl)(
|
|
1205
1205
|
404,
|
|
1206
1206
|
"Not Found",
|
|
1207
1207
|
`Refusing to SSR the path \`${decodedPath}\` because \`ssr:false\` is set and the path is not included in the \`prerender\` config, so in production the path will be a 404.`
|
|
@@ -1221,7 +1221,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
1223
|
}
|
|
1224
|
-
let manifestUrl =
|
|
1224
|
+
let manifestUrl = _chunk4E5LHRQPjs.getManifestPath.call(void 0,
|
|
1225
1225
|
_build.routeDiscovery.manifestPath,
|
|
1226
1226
|
normalizedBasename
|
|
1227
1227
|
);
|
|
@@ -1256,7 +1256,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1256
1256
|
loadContext,
|
|
1257
1257
|
handleError
|
|
1258
1258
|
);
|
|
1259
|
-
if (
|
|
1259
|
+
if (_chunk4E5LHRQPjs.isRedirectResponse.call(void 0, response)) {
|
|
1260
1260
|
response = generateSingleFetchRedirectResponse(
|
|
1261
1261
|
response,
|
|
1262
1262
|
request,
|
|
@@ -1270,7 +1270,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1270
1270
|
params: singleFetchMatches ? singleFetchMatches[0].params : {},
|
|
1271
1271
|
request
|
|
1272
1272
|
});
|
|
1273
|
-
if (
|
|
1273
|
+
if (_chunk4E5LHRQPjs.isRedirectResponse.call(void 0, response)) {
|
|
1274
1274
|
response = generateSingleFetchRedirectResponse(
|
|
1275
1275
|
response,
|
|
1276
1276
|
request,
|
|
@@ -1389,7 +1389,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1389
1389
|
generateMiddlewareResponse: build.future.v8_middleware ? async (query) => {
|
|
1390
1390
|
try {
|
|
1391
1391
|
let innerResult = await query(request);
|
|
1392
|
-
if (!
|
|
1392
|
+
if (!_chunk4E5LHRQPjs.isResponse.call(void 0, innerResult)) {
|
|
1393
1393
|
innerResult = await renderHtml(innerResult, isSpaMode);
|
|
1394
1394
|
}
|
|
1395
1395
|
return innerResult;
|
|
@@ -1399,7 +1399,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1399
1399
|
}
|
|
1400
1400
|
} : void 0
|
|
1401
1401
|
});
|
|
1402
|
-
if (!
|
|
1402
|
+
if (!_chunk4E5LHRQPjs.isResponse.call(void 0, result)) {
|
|
1403
1403
|
result = await renderHtml(result, isSpaMode);
|
|
1404
1404
|
}
|
|
1405
1405
|
return result;
|
|
@@ -1414,7 +1414,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1414
1414
|
}
|
|
1415
1415
|
if (context.errors) {
|
|
1416
1416
|
Object.values(context.errors).forEach((err) => {
|
|
1417
|
-
if (!
|
|
1417
|
+
if (!_chunk4E5LHRQPjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1418
1418
|
handleError(err);
|
|
1419
1419
|
}
|
|
1420
1420
|
});
|
|
@@ -1466,10 +1466,10 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1466
1466
|
} catch (error) {
|
|
1467
1467
|
handleError(error);
|
|
1468
1468
|
let errorForSecondRender = error;
|
|
1469
|
-
if (
|
|
1469
|
+
if (_chunk4E5LHRQPjs.isResponse.call(void 0, error)) {
|
|
1470
1470
|
try {
|
|
1471
1471
|
let data2 = await unwrapResponse(error);
|
|
1472
|
-
errorForSecondRender = new (0,
|
|
1472
|
+
errorForSecondRender = new (0, _chunk4E5LHRQPjs.ErrorResponseImpl)(
|
|
1473
1473
|
error.status,
|
|
1474
1474
|
error.statusText,
|
|
1475
1475
|
data2
|
|
@@ -1477,7 +1477,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1477
1477
|
} catch (e) {
|
|
1478
1478
|
}
|
|
1479
1479
|
}
|
|
1480
|
-
context =
|
|
1480
|
+
context = _chunk4E5LHRQPjs.getStaticContextFromError.call(void 0,
|
|
1481
1481
|
staticHandler.dataRoutes,
|
|
1482
1482
|
context,
|
|
1483
1483
|
errorForSecondRender
|
|
@@ -1536,7 +1536,7 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1536
1536
|
return handleQueryRouteError(error);
|
|
1537
1537
|
}
|
|
1538
1538
|
function handleQueryRouteResult(result) {
|
|
1539
|
-
if (
|
|
1539
|
+
if (_chunk4E5LHRQPjs.isResponse.call(void 0, result)) {
|
|
1540
1540
|
return result;
|
|
1541
1541
|
}
|
|
1542
1542
|
if (typeof result === "string") {
|
|
@@ -1545,10 +1545,10 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1545
1545
|
return Response.json(result);
|
|
1546
1546
|
}
|
|
1547
1547
|
function handleQueryRouteError(error) {
|
|
1548
|
-
if (
|
|
1548
|
+
if (_chunk4E5LHRQPjs.isResponse.call(void 0, error)) {
|
|
1549
1549
|
return error;
|
|
1550
1550
|
}
|
|
1551
|
-
if (
|
|
1551
|
+
if (_chunk4E5LHRQPjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1552
1552
|
handleError(error);
|
|
1553
1553
|
return errorResponseToJson(error, serverMode);
|
|
1554
1554
|
}
|
|
@@ -1671,7 +1671,7 @@ function createSessionStorage({
|
|
|
1671
1671
|
};
|
|
1672
1672
|
}
|
|
1673
1673
|
function warnOnceAboutSigningSessionCookie(cookie) {
|
|
1674
|
-
|
|
1674
|
+
_chunk4E5LHRQPjs.warnOnce.call(void 0,
|
|
1675
1675
|
cookie.isSigned,
|
|
1676
1676
|
`The "${cookie.name}" cookie is not signed, but session cookies should be signed to prevent tampering on the client before they are sent back to the server. See https://reactrouter.com/explanation/sessions-and-cookies#signing-cookies for more information.`
|
|
1677
1677
|
);
|
|
@@ -1778,12 +1778,12 @@ function getHydrationData({
|
|
|
1778
1778
|
...state,
|
|
1779
1779
|
loaderData: { ...state.loaderData }
|
|
1780
1780
|
};
|
|
1781
|
-
let initialMatches =
|
|
1781
|
+
let initialMatches = _chunk4E5LHRQPjs.matchRoutes.call(void 0, routes, location2, basename);
|
|
1782
1782
|
if (initialMatches) {
|
|
1783
1783
|
for (let match of initialMatches) {
|
|
1784
1784
|
let routeId = match.route.id;
|
|
1785
1785
|
let routeInfo = getRouteInfo(routeId);
|
|
1786
|
-
if (
|
|
1786
|
+
if (_chunk4E5LHRQPjs.shouldHydrateRouteLoader.call(void 0,
|
|
1787
1787
|
routeId,
|
|
1788
1788
|
routeInfo.clientLoader,
|
|
1789
1789
|
routeInfo.hasLoader,
|
|
@@ -1861,7 +1861,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1861
1861
|
}
|
|
1862
1862
|
}
|
|
1863
1863
|
);
|
|
1864
|
-
if (
|
|
1864
|
+
if (_chunk4E5LHRQPjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1865
1865
|
return /* @__PURE__ */ React.default.createElement(
|
|
1866
1866
|
ErrorWrapper,
|
|
1867
1867
|
{
|
|
@@ -1869,7 +1869,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1869
1869
|
title: "Unhandled Thrown Response!"
|
|
1870
1870
|
},
|
|
1871
1871
|
/* @__PURE__ */ React.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
|
1872
|
-
|
|
1872
|
+
_chunk4E5LHRQPjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
|
1873
1873
|
);
|
|
1874
1874
|
}
|
|
1875
1875
|
let errorInstance;
|
|
@@ -1895,7 +1895,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1895
1895
|
function RSCDefaultRootErrorBoundary({
|
|
1896
1896
|
hasRootLayout
|
|
1897
1897
|
}) {
|
|
1898
|
-
let error =
|
|
1898
|
+
let error = _chunk4E5LHRQPjs.useRouteError.call(void 0, );
|
|
1899
1899
|
if (hasRootLayout === void 0) {
|
|
1900
1900
|
throw new Error("Missing 'hasRootLayout' prop");
|
|
1901
1901
|
}
|
|
@@ -2043,7 +2043,7 @@ function createRouterFromPayload({
|
|
|
2043
2043
|
populateRSCRouteModules(globalVar.__reactRouterRouteModules, payload.matches);
|
|
2044
2044
|
let patches = /* @__PURE__ */ new Map();
|
|
2045
2045
|
_optionalChain([payload, 'access', _20 => _20.patches, 'optionalAccess', _21 => _21.forEach, 'call', _22 => _22((patch) => {
|
|
2046
|
-
|
|
2046
|
+
_chunk4E5LHRQPjs.invariant.call(void 0, patch.parentId, "Invalid patch parentId");
|
|
2047
2047
|
if (!patches.has(patch.parentId)) {
|
|
2048
2048
|
patches.set(patch.parentId, []);
|
|
2049
2049
|
}
|
|
@@ -2065,11 +2065,11 @@ function createRouterFromPayload({
|
|
|
2065
2065
|
}
|
|
2066
2066
|
return [route];
|
|
2067
2067
|
}, []);
|
|
2068
|
-
globalVar.__reactRouterDataRouter =
|
|
2068
|
+
globalVar.__reactRouterDataRouter = _chunk4E5LHRQPjs.createRouter.call(void 0, {
|
|
2069
2069
|
routes,
|
|
2070
2070
|
getContext,
|
|
2071
2071
|
basename: payload.basename,
|
|
2072
|
-
history:
|
|
2072
|
+
history: _chunk4E5LHRQPjs.createBrowserHistory.call(void 0, ),
|
|
2073
2073
|
hydrationData: getHydrationData({
|
|
2074
2074
|
state: {
|
|
2075
2075
|
loaderData: payload.loaderData,
|
|
@@ -2079,7 +2079,7 @@ function createRouterFromPayload({
|
|
|
2079
2079
|
routes,
|
|
2080
2080
|
getRouteInfo: (routeId) => {
|
|
2081
2081
|
let match = payload.matches.find((m) => m.id === routeId);
|
|
2082
|
-
|
|
2082
|
+
_chunk4E5LHRQPjs.invariant.call(void 0, match, "Route not found in payload");
|
|
2083
2083
|
return {
|
|
2084
2084
|
clientLoader: match.clientLoader,
|
|
2085
2085
|
hasLoader: match.hasLoader,
|
|
@@ -2177,9 +2177,9 @@ function createRouterFromPayload({
|
|
|
2177
2177
|
routeModules: globalVar.__reactRouterRouteModules
|
|
2178
2178
|
};
|
|
2179
2179
|
}
|
|
2180
|
-
var renderedRoutesContext =
|
|
2180
|
+
var renderedRoutesContext = _chunk4E5LHRQPjs.createContext.call(void 0, );
|
|
2181
2181
|
function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
|
|
2182
|
-
let dataStrategy =
|
|
2182
|
+
let dataStrategy = _chunk4E5LHRQPjs.getSingleFetchDataStrategyImpl.call(void 0,
|
|
2183
2183
|
getRouter,
|
|
2184
2184
|
(match) => {
|
|
2185
2185
|
let M = match;
|
|
@@ -2233,20 +2233,20 @@ function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReada
|
|
|
2233
2233
|
function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {
|
|
2234
2234
|
return async (args, basename, targetRoutes) => {
|
|
2235
2235
|
let { request, context } = args;
|
|
2236
|
-
let url =
|
|
2236
|
+
let url = _chunk4E5LHRQPjs.singleFetchUrl.call(void 0, request.url, basename, "rsc");
|
|
2237
2237
|
if (request.method === "GET") {
|
|
2238
|
-
url =
|
|
2238
|
+
url = _chunk4E5LHRQPjs.stripIndexParam.call(void 0, url);
|
|
2239
2239
|
if (targetRoutes) {
|
|
2240
2240
|
url.searchParams.set("_routes", targetRoutes.join(","));
|
|
2241
2241
|
}
|
|
2242
2242
|
}
|
|
2243
2243
|
let res = await fetchImplementation(
|
|
2244
|
-
new Request(url, await
|
|
2244
|
+
new Request(url, await _chunk4E5LHRQPjs.createRequestInit.call(void 0, request))
|
|
2245
2245
|
);
|
|
2246
2246
|
if (res.status >= 400 && !res.headers.has("X-Remix-Response")) {
|
|
2247
|
-
throw new (0,
|
|
2247
|
+
throw new (0, _chunk4E5LHRQPjs.ErrorResponseImpl)(res.status, res.statusText, await res.text());
|
|
2248
2248
|
}
|
|
2249
|
-
|
|
2249
|
+
_chunk4E5LHRQPjs.invariant.call(void 0, res.body, "No response body to decode");
|
|
2250
2250
|
try {
|
|
2251
2251
|
const payload = await createFromReadableStream(res.body, {
|
|
2252
2252
|
temporaryReferences: void 0
|
|
@@ -2270,7 +2270,7 @@ function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation)
|
|
|
2270
2270
|
}
|
|
2271
2271
|
context.get(renderedRoutesContext).push(...payload.matches);
|
|
2272
2272
|
let results = { routes: {} };
|
|
2273
|
-
const dataKey =
|
|
2273
|
+
const dataKey = _chunk4E5LHRQPjs.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
|
|
2274
2274
|
for (let [routeId, data2] of Object.entries(payload[dataKey] || {})) {
|
|
2275
2275
|
results.routes[routeId] = { data: data2 };
|
|
2276
2276
|
}
|
|
@@ -2303,7 +2303,7 @@ function RSCHydratedRouter({
|
|
|
2303
2303
|
[createFromReadableStream, payload, fetchImplementation, getContext]
|
|
2304
2304
|
);
|
|
2305
2305
|
React4.useEffect(() => {
|
|
2306
|
-
|
|
2306
|
+
_chunk4E5LHRQPjs.setIsHydrated.call(void 0, );
|
|
2307
2307
|
}, []);
|
|
2308
2308
|
React4.useLayoutEffect(() => {
|
|
2309
2309
|
const globalVar = window;
|
|
@@ -2390,7 +2390,7 @@ function RSCHydratedRouter({
|
|
|
2390
2390
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2391
2391
|
routeModules
|
|
2392
2392
|
};
|
|
2393
|
-
return /* @__PURE__ */ React4.createElement(
|
|
2393
|
+
return /* @__PURE__ */ React4.createElement(_chunk4E5LHRQPjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React4.createElement(RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React4.createElement(_chunk4E5LHRQPjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React4.createElement(_chunkWNLQ53P5js.UNSTABLE_TransitionEnabledRouterProvider, { router, flushSync: ReactDOM.flushSync }))));
|
|
2394
2394
|
}
|
|
2395
2395
|
function createRouteFromServerManifest(match, payload) {
|
|
2396
2396
|
let hasInitialData = payload && match.id in payload.loaderData;
|
|
@@ -2401,7 +2401,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2401
2401
|
// the server loader flow regardless of whether the client loader calls
|
|
2402
2402
|
// `serverLoader` or not, otherwise we'll have nothing to render.
|
|
2403
2403
|
match.hasComponent && !match.element;
|
|
2404
|
-
|
|
2404
|
+
_chunk4E5LHRQPjs.invariant.call(void 0, window.__reactRouterRouteModules);
|
|
2405
2405
|
populateRSCRouteModules(window.__reactRouterRouteModules, match);
|
|
2406
2406
|
let dataRoute = {
|
|
2407
2407
|
id: match.id,
|
|
@@ -2452,7 +2452,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2452
2452
|
return await callSingleFetch(singleFetch);
|
|
2453
2453
|
}
|
|
2454
2454
|
}) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
|
|
2455
|
-
throw
|
|
2455
|
+
throw _chunk4E5LHRQPjs.noActionDefinedError.call(void 0, "action", match.id);
|
|
2456
2456
|
},
|
|
2457
2457
|
path: match.path,
|
|
2458
2458
|
shouldRevalidate: match.shouldRevalidate,
|
|
@@ -2465,7 +2465,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2465
2465
|
hasShouldRevalidate: match.shouldRevalidate != null
|
|
2466
2466
|
};
|
|
2467
2467
|
if (typeof dataRoute.loader === "function") {
|
|
2468
|
-
dataRoute.loader.hydrate =
|
|
2468
|
+
dataRoute.loader.hydrate = _chunk4E5LHRQPjs.shouldHydrateRouteLoader.call(void 0,
|
|
2469
2469
|
match.id,
|
|
2470
2470
|
match.clientLoader,
|
|
2471
2471
|
match.hasLoader,
|
|
@@ -2475,7 +2475,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2475
2475
|
return dataRoute;
|
|
2476
2476
|
}
|
|
2477
2477
|
function callSingleFetch(singleFetch) {
|
|
2478
|
-
|
|
2478
|
+
_chunk4E5LHRQPjs.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
|
|
2479
2479
|
return singleFetch();
|
|
2480
2480
|
}
|
|
2481
2481
|
function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
@@ -2483,7 +2483,7 @@ function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
|
2483
2483
|
let fn = type === "action" ? "serverAction()" : "serverLoader()";
|
|
2484
2484
|
let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
|
|
2485
2485
|
console.error(msg);
|
|
2486
|
-
throw new (0,
|
|
2486
|
+
throw new (0, _chunk4E5LHRQPjs.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
|
|
2487
2487
|
}
|
|
2488
2488
|
}
|
|
2489
2489
|
var nextPaths = /* @__PURE__ */ new Set();
|
|
@@ -2731,7 +2731,7 @@ async function routeRSCServerRequest({
|
|
|
2731
2731
|
const payload = await createFromReadableStream(
|
|
2732
2732
|
detectRedirectResponse.body
|
|
2733
2733
|
);
|
|
2734
|
-
if (serverResponse.status ===
|
|
2734
|
+
if (serverResponse.status === _chunk4E5LHRQPjs.SINGLE_FETCH_REDIRECT_STATUS && payload.type === "redirect") {
|
|
2735
2735
|
const headers2 = new Headers(serverResponse.headers);
|
|
2736
2736
|
headers2.delete("Content-Encoding");
|
|
2737
2737
|
headers2.delete("Content-Length");
|
|
@@ -2766,7 +2766,7 @@ async function routeRSCServerRequest({
|
|
|
2766
2766
|
return reason;
|
|
2767
2767
|
}
|
|
2768
2768
|
try {
|
|
2769
|
-
const status =
|
|
2769
|
+
const status = _chunk4E5LHRQPjs.isRouteErrorResponse.call(void 0, reason) ? reason.status : 500;
|
|
2770
2770
|
const html = await renderHTML(() => {
|
|
2771
2771
|
const decoded = Promise.resolve(
|
|
2772
2772
|
createFromReadableStream(createStream())
|
|
@@ -2832,7 +2832,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2832
2832
|
if (payload.type !== "render") return null;
|
|
2833
2833
|
let patchedLoaderData = { ...payload.loaderData };
|
|
2834
2834
|
for (const match of payload.matches) {
|
|
2835
|
-
if (
|
|
2835
|
+
if (_chunk4E5LHRQPjs.shouldHydrateRouteLoader.call(void 0,
|
|
2836
2836
|
match.id,
|
|
2837
2837
|
match.clientLoader,
|
|
2838
2838
|
match.hasLoader,
|
|
@@ -2872,7 +2872,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2872
2872
|
}
|
|
2873
2873
|
}))
|
|
2874
2874
|
};
|
|
2875
|
-
const router =
|
|
2875
|
+
const router = _chunkWNLQ53P5js.createStaticRouter.call(void 0,
|
|
2876
2876
|
payload.matches.reduceRight((previous, match) => {
|
|
2877
2877
|
const route = {
|
|
2878
2878
|
id: match.id,
|
|
@@ -2916,8 +2916,8 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2916
2916
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2917
2917
|
routeModules: createRSCRouteModules(payload)
|
|
2918
2918
|
};
|
|
2919
|
-
return /* @__PURE__ */ React5.createElement(
|
|
2920
|
-
|
|
2919
|
+
return /* @__PURE__ */ React5.createElement(_chunk4E5LHRQPjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React5.createElement(RSCRouterGlobalErrorBoundary, { location: payload.location }, /* @__PURE__ */ React5.createElement(_chunk4E5LHRQPjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React5.createElement(
|
|
2920
|
+
_chunkWNLQ53P5js.StaticRouterProvider,
|
|
2921
2921
|
{
|
|
2922
2922
|
context,
|
|
2923
2923
|
router,
|
|
@@ -2975,7 +2975,7 @@ function deserializeErrors(errors) {
|
|
|
2975
2975
|
let serialized = {};
|
|
2976
2976
|
for (let [key, val] of entries) {
|
|
2977
2977
|
if (val && val.__type === "RouteErrorResponse") {
|
|
2978
|
-
serialized[key] = new (0,
|
|
2978
|
+
serialized[key] = new (0, _chunk4E5LHRQPjs.ErrorResponseImpl)(
|
|
2979
2979
|
val.status,
|
|
2980
2980
|
val.statusText,
|
|
2981
2981
|
val.data,
|
|
@@ -3135,4 +3135,4 @@ function deserializeErrors(errors) {
|
|
|
3135
3135
|
|
|
3136
3136
|
|
|
3137
3137
|
|
|
3138
|
-
exports.Await =
|
|
3138
|
+
exports.Await = _chunkWNLQ53P5js.Await; exports.BrowserRouter = _chunkWNLQ53P5js.BrowserRouter; exports.Form = _chunkWNLQ53P5js.Form; exports.HashRouter = _chunkWNLQ53P5js.HashRouter; exports.IDLE_BLOCKER = _chunk4E5LHRQPjs.IDLE_BLOCKER; exports.IDLE_FETCHER = _chunk4E5LHRQPjs.IDLE_FETCHER; exports.IDLE_NAVIGATION = _chunk4E5LHRQPjs.IDLE_NAVIGATION; exports.Link = _chunkWNLQ53P5js.Link; exports.Links = _chunk4E5LHRQPjs.Links; exports.MemoryRouter = _chunkWNLQ53P5js.MemoryRouter; exports.Meta = _chunk4E5LHRQPjs.Meta; exports.NavLink = _chunkWNLQ53P5js.NavLink; exports.Navigate = _chunkWNLQ53P5js.Navigate; exports.NavigationType = _chunk4E5LHRQPjs.Action; exports.Outlet = _chunkWNLQ53P5js.Outlet; exports.PrefetchPageLinks = _chunk4E5LHRQPjs.PrefetchPageLinks; exports.Route = _chunkWNLQ53P5js.Route; exports.Router = _chunkWNLQ53P5js.Router; exports.RouterContextProvider = _chunk4E5LHRQPjs.RouterContextProvider; exports.RouterProvider = _chunkWNLQ53P5js.RouterProvider; exports.Routes = _chunkWNLQ53P5js.Routes; exports.Scripts = _chunk4E5LHRQPjs.Scripts; exports.ScrollRestoration = _chunkWNLQ53P5js.ScrollRestoration; exports.ServerRouter = ServerRouter; exports.StaticRouter = _chunkWNLQ53P5js.StaticRouter; exports.StaticRouterProvider = _chunkWNLQ53P5js.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunk4E5LHRQPjs.AwaitContextProvider; exports.UNSAFE_DataRouterContext = _chunk4E5LHRQPjs.DataRouterContext; exports.UNSAFE_DataRouterStateContext = _chunk4E5LHRQPjs.DataRouterStateContext; exports.UNSAFE_ErrorResponseImpl = _chunk4E5LHRQPjs.ErrorResponseImpl; exports.UNSAFE_FetchersContext = _chunk4E5LHRQPjs.FetchersContext; exports.UNSAFE_FrameworkContext = _chunk4E5LHRQPjs.FrameworkContext; exports.UNSAFE_LocationContext = _chunk4E5LHRQPjs.LocationContext; exports.UNSAFE_NavigationContext = _chunk4E5LHRQPjs.NavigationContext; exports.UNSAFE_RSCDefaultRootErrorBoundary = RSCDefaultRootErrorBoundary; exports.UNSAFE_RemixErrorBoundary = _chunk4E5LHRQPjs.RemixErrorBoundary; exports.UNSAFE_RouteContext = _chunk4E5LHRQPjs.RouteContext; exports.UNSAFE_ServerMode = ServerMode; exports.UNSAFE_SingleFetchRedirectSymbol = _chunk4E5LHRQPjs.SingleFetchRedirectSymbol; exports.UNSAFE_ViewTransitionContext = _chunk4E5LHRQPjs.ViewTransitionContext; exports.UNSAFE_WithComponentProps = _chunkWNLQ53P5js.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkWNLQ53P5js.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkWNLQ53P5js.WithHydrateFallbackProps; exports.UNSAFE_createBrowserHistory = _chunk4E5LHRQPjs.createBrowserHistory; exports.UNSAFE_createClientRoutes = _chunk4E5LHRQPjs.createClientRoutes; exports.UNSAFE_createClientRoutesWithHMRRevalidationOptOut = _chunk4E5LHRQPjs.createClientRoutesWithHMRRevalidationOptOut; exports.UNSAFE_createRouter = _chunk4E5LHRQPjs.createRouter; exports.UNSAFE_decodeViaTurboStream = _chunk4E5LHRQPjs.decodeViaTurboStream; exports.UNSAFE_deserializeErrors = deserializeErrors; exports.UNSAFE_getHydrationData = getHydrationData; exports.UNSAFE_getPatchRoutesOnNavigationFunction = _chunk4E5LHRQPjs.getPatchRoutesOnNavigationFunction; exports.UNSAFE_getTurboStreamSingleFetchDataStrategy = _chunk4E5LHRQPjs.getTurboStreamSingleFetchDataStrategy; exports.UNSAFE_hydrationRouteProperties = _chunkWNLQ53P5js.hydrationRouteProperties; exports.UNSAFE_invariant = _chunk4E5LHRQPjs.invariant; exports.UNSAFE_mapRouteProperties = _chunkWNLQ53P5js.mapRouteProperties; exports.UNSAFE_shouldHydrateRouteLoader = _chunk4E5LHRQPjs.shouldHydrateRouteLoader; exports.UNSAFE_useFogOFWarDiscovery = _chunk4E5LHRQPjs.useFogOFWarDiscovery; exports.UNSAFE_useScrollRestoration = _chunkWNLQ53P5js.useScrollRestoration; exports.UNSAFE_withComponentProps = _chunkWNLQ53P5js.withComponentProps; exports.UNSAFE_withErrorBoundaryProps = _chunkWNLQ53P5js.withErrorBoundaryProps; exports.UNSAFE_withHydrateFallbackProps = _chunkWNLQ53P5js.withHydrateFallbackProps; exports.createBrowserRouter = _chunkWNLQ53P5js.createBrowserRouter; exports.createContext = _chunk4E5LHRQPjs.createContext; exports.createCookie = createCookie; exports.createCookieSessionStorage = createCookieSessionStorage; exports.createHashRouter = _chunkWNLQ53P5js.createHashRouter; exports.createMemoryRouter = _chunkWNLQ53P5js.createMemoryRouter; exports.createMemorySessionStorage = createMemorySessionStorage; exports.createPath = _chunk4E5LHRQPjs.createPath; exports.createRequestHandler = createRequestHandler; exports.createRoutesFromChildren = _chunkWNLQ53P5js.createRoutesFromChildren; exports.createRoutesFromElements = _chunkWNLQ53P5js.createRoutesFromElements; exports.createRoutesStub = createRoutesStub; exports.createSearchParams = _chunkWNLQ53P5js.createSearchParams; exports.createSession = createSession; exports.createSessionStorage = createSessionStorage; exports.createStaticHandler = _chunkWNLQ53P5js.createStaticHandler; exports.createStaticRouter = _chunkWNLQ53P5js.createStaticRouter; exports.data = _chunk4E5LHRQPjs.data; exports.generatePath = _chunk4E5LHRQPjs.generatePath; exports.href = href; exports.isCookie = isCookie; exports.isRouteErrorResponse = _chunk4E5LHRQPjs.isRouteErrorResponse; exports.isSession = isSession; exports.matchPath = _chunk4E5LHRQPjs.matchPath; exports.matchRoutes = _chunk4E5LHRQPjs.matchRoutes; exports.parsePath = _chunk4E5LHRQPjs.parsePath; exports.redirect = _chunk4E5LHRQPjs.redirect; exports.redirectDocument = _chunk4E5LHRQPjs.redirectDocument; exports.renderMatches = _chunkWNLQ53P5js.renderMatches; exports.replace = _chunk4E5LHRQPjs.replace; exports.resolvePath = _chunk4E5LHRQPjs.resolvePath; exports.unstable_HistoryRouter = _chunkWNLQ53P5js.HistoryRouter; exports.unstable_RSCHydratedRouter = RSCHydratedRouter; exports.unstable_RSCStaticRouter = RSCStaticRouter; exports.unstable_createCallServer = createCallServer; exports.unstable_getRSCStream = getRSCStream; exports.unstable_routeRSCServerRequest = routeRSCServerRequest; exports.unstable_setDevServerHooks = setDevServerHooks; exports.unstable_usePrompt = _chunkWNLQ53P5js.usePrompt; exports.unstable_useRoute = _chunk4E5LHRQPjs.useRoute; exports.useActionData = _chunk4E5LHRQPjs.useActionData; exports.useAsyncError = _chunk4E5LHRQPjs.useAsyncError; exports.useAsyncValue = _chunk4E5LHRQPjs.useAsyncValue; exports.useBeforeUnload = _chunkWNLQ53P5js.useBeforeUnload; exports.useBlocker = _chunk4E5LHRQPjs.useBlocker; exports.useFetcher = _chunkWNLQ53P5js.useFetcher; exports.useFetchers = _chunkWNLQ53P5js.useFetchers; exports.useFormAction = _chunkWNLQ53P5js.useFormAction; exports.useHref = _chunk4E5LHRQPjs.useHref; exports.useInRouterContext = _chunk4E5LHRQPjs.useInRouterContext; exports.useLinkClickHandler = _chunkWNLQ53P5js.useLinkClickHandler; exports.useLoaderData = _chunk4E5LHRQPjs.useLoaderData; exports.useLocation = _chunk4E5LHRQPjs.useLocation; exports.useMatch = _chunk4E5LHRQPjs.useMatch; exports.useMatches = _chunk4E5LHRQPjs.useMatches; exports.useNavigate = _chunk4E5LHRQPjs.useNavigate; exports.useNavigation = _chunk4E5LHRQPjs.useNavigation; exports.useNavigationType = _chunk4E5LHRQPjs.useNavigationType; exports.useOutlet = _chunk4E5LHRQPjs.useOutlet; exports.useOutletContext = _chunk4E5LHRQPjs.useOutletContext; exports.useParams = _chunk4E5LHRQPjs.useParams; exports.useResolvedPath = _chunk4E5LHRQPjs.useResolvedPath; exports.useRevalidator = _chunk4E5LHRQPjs.useRevalidator; exports.useRouteError = _chunk4E5LHRQPjs.useRouteError; exports.useRouteLoaderData = _chunk4E5LHRQPjs.useRouteLoaderData; exports.useRoutes = _chunk4E5LHRQPjs.useRoutes; exports.useSearchParams = _chunkWNLQ53P5js.useSearchParams; exports.useSubmit = _chunkWNLQ53P5js.useSubmit; exports.useViewTransitionState = _chunkWNLQ53P5js.useViewTransitionState;
|