react-router 7.9.0 → 7.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/development/{chunk-S5YDGZLY.mjs → chunk-B7RQU5TL.mjs} +2 -2
- package/dist/development/{chunk-UGCJQSTX.js → chunk-LWNHKVDL.js} +131 -131
- package/dist/development/{chunk-VHEBI3C5.js → chunk-PW3F6ATG.js} +1 -1
- package/dist/development/{chunk-AKKEMMKB.mjs → chunk-SKNKB5VI.mjs} +2 -2
- package/dist/development/{context-BH6Jwdoy.d.mts → context-CIdFp11b.d.mts} +1 -1
- package/dist/development/dom-export.d.mts +1 -1
- package/dist/development/dom-export.js +3 -3
- package/dist/development/dom-export.mjs +3 -3
- package/dist/{production/index-react-server-client-CMC2eQAY.d.ts → development/index-react-server-client-BYr9g50r.d.ts} +1 -1
- package/dist/{production/index-react-server-client-1cWMpKk4.d.mts → development/index-react-server-client-BeVfPpWg.d.mts} +2 -2
- package/dist/development/index-react-server-client.d.mts +3 -3
- package/dist/development/index-react-server-client.d.ts +2 -2
- 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.d.mts +1 -1
- package/dist/development/index-react-server.d.ts +1 -1
- package/dist/development/index-react-server.js +1 -1
- package/dist/development/index-react-server.mjs +1 -1
- package/dist/development/index.d.mts +6 -6
- package/dist/development/index.d.ts +4 -4
- package/dist/development/index.js +96 -96
- package/dist/development/index.mjs +3 -3
- package/dist/development/lib/types/internal.d.mts +39 -14
- package/dist/development/lib/types/internal.d.ts +38 -13
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{route-data-BQkq8Erj.d.mts → route-data-Bpm4liR_.d.mts} +1 -1
- package/dist/development/{routeModules-DSKAn01V.d.ts → routeModules-DnUHijGz.d.ts} +1 -1
- package/dist/production/{chunk-HDA5IKPB.js → chunk-3SXVZXGI.js} +131 -131
- package/dist/production/{chunk-VNPMQDPD.js → chunk-HMYSPRGR.js} +1 -1
- package/dist/production/{chunk-MOZTWV63.mjs → chunk-P25HWPOZ.mjs} +2 -2
- package/dist/production/{chunk-WOZJCBVO.mjs → chunk-RCAZODXZ.mjs} +2 -2
- package/dist/production/{context-BH6Jwdoy.d.mts → context-CIdFp11b.d.mts} +1 -1
- package/dist/production/dom-export.d.mts +1 -1
- package/dist/production/dom-export.js +3 -3
- package/dist/production/dom-export.mjs +3 -3
- package/dist/{development/index-react-server-client-CMC2eQAY.d.ts → production/index-react-server-client-BYr9g50r.d.ts} +1 -1
- package/dist/{development/index-react-server-client-1cWMpKk4.d.mts → production/index-react-server-client-BeVfPpWg.d.mts} +2 -2
- package/dist/production/index-react-server-client.d.mts +3 -3
- package/dist/production/index-react-server-client.d.ts +2 -2
- 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.d.mts +1 -1
- package/dist/production/index-react-server.d.ts +1 -1
- package/dist/production/index-react-server.js +1 -1
- package/dist/production/index-react-server.mjs +1 -1
- package/dist/production/index.d.mts +6 -6
- package/dist/production/index.d.ts +4 -4
- package/dist/production/index.js +96 -96
- package/dist/production/index.mjs +3 -3
- package/dist/production/lib/types/internal.d.mts +39 -14
- package/dist/production/lib/types/internal.d.ts +38 -13
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/production/{route-data-BQkq8Erj.d.mts → route-data-Bpm4liR_.d.mts} +1 -1
- package/dist/production/{routeModules-DSKAn01V.d.ts → routeModules-DnUHijGz.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _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.
|
|
2
|
+
* react-router v7.9.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
var
|
|
57
|
+
var _chunkLWNHKVDLjs = require('./chunk-LWNHKVDL.js');
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
@@ -145,7 +145,7 @@ var _chunkUGCJQSTXjs = require('./chunk-UGCJQSTX.js');
|
|
|
145
145
|
|
|
146
146
|
|
|
147
147
|
|
|
148
|
-
var
|
|
148
|
+
var _chunkPW3F6ATGjs = require('./chunk-PW3F6ATG.js');
|
|
149
149
|
|
|
150
150
|
// lib/dom/ssr/server.tsx
|
|
151
151
|
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React4 = _interopRequireWildcard(_react); var React5 = _interopRequireWildcard(_react);
|
|
@@ -158,7 +158,7 @@ function ServerRouter({
|
|
|
158
158
|
url = new URL(url);
|
|
159
159
|
}
|
|
160
160
|
let { manifest, routeModules, criticalCss, serverHandoffString } = context;
|
|
161
|
-
let routes =
|
|
161
|
+
let routes = _chunkPW3F6ATGjs.createServerRoutes.call(void 0,
|
|
162
162
|
manifest.routes,
|
|
163
163
|
routeModules,
|
|
164
164
|
context.future,
|
|
@@ -171,7 +171,7 @@ function ServerRouter({
|
|
|
171
171
|
let routeId = match.route.id;
|
|
172
172
|
let route = routeModules[routeId];
|
|
173
173
|
let manifestRoute = context.manifest.routes[routeId];
|
|
174
|
-
if (route && manifestRoute &&
|
|
174
|
+
if (route && manifestRoute && _chunkPW3F6ATGjs.shouldHydrateRouteLoader.call(void 0,
|
|
175
175
|
routeId,
|
|
176
176
|
route.clientLoader,
|
|
177
177
|
manifestRoute.hasLoader,
|
|
@@ -180,9 +180,9 @@ function ServerRouter({
|
|
|
180
180
|
delete context.staticHandlerContext.loaderData[routeId];
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
let router =
|
|
183
|
+
let router = _chunkLWNHKVDLjs.createStaticRouter.call(void 0, routes, context.staticHandlerContext);
|
|
184
184
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
185
|
-
|
|
185
|
+
_chunkPW3F6ATGjs.FrameworkContext.Provider,
|
|
186
186
|
{
|
|
187
187
|
value: {
|
|
188
188
|
manifest,
|
|
@@ -197,8 +197,8 @@ function ServerRouter({
|
|
|
197
197
|
renderMeta: context.renderMeta
|
|
198
198
|
}
|
|
199
199
|
},
|
|
200
|
-
/* @__PURE__ */ React.createElement(
|
|
201
|
-
|
|
200
|
+
/* @__PURE__ */ React.createElement(_chunkPW3F6ATGjs.RemixErrorBoundary, { location: router.state.location }, /* @__PURE__ */ React.createElement(
|
|
201
|
+
_chunkLWNHKVDLjs.StaticRouterProvider,
|
|
202
202
|
{
|
|
203
203
|
router,
|
|
204
204
|
context: context.staticHandlerContext,
|
|
@@ -206,7 +206,7 @@ function ServerRouter({
|
|
|
206
206
|
}
|
|
207
207
|
))
|
|
208
208
|
), context.serverHandoffStream ? /* @__PURE__ */ React.createElement(React.Suspense, null, /* @__PURE__ */ React.createElement(
|
|
209
|
-
|
|
209
|
+
_chunkPW3F6ATGjs.StreamTransfer,
|
|
210
210
|
{
|
|
211
211
|
context,
|
|
212
212
|
identifier: 0,
|
|
@@ -248,18 +248,18 @@ function createRoutesStub(routes, _context) {
|
|
|
248
248
|
let patched = processRoutes(
|
|
249
249
|
// @ts-expect-error `StubRouteObject` is stricter about `loader`/`action`
|
|
250
250
|
// types compared to `AgnosticRouteObject`
|
|
251
|
-
|
|
252
|
-
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.v8_middleware]) ? new (0,
|
|
251
|
+
_chunkPW3F6ATGjs.convertRoutesToDataRoutes.call(void 0, routes, (r) => r),
|
|
252
|
+
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.v8_middleware]) ? new (0, _chunkPW3F6ATGjs.RouterContextProvider)() : {},
|
|
253
253
|
frameworkContextRef.current.manifest,
|
|
254
254
|
frameworkContextRef.current.routeModules
|
|
255
255
|
);
|
|
256
|
-
routerRef.current =
|
|
256
|
+
routerRef.current = _chunkLWNHKVDLjs.createMemoryRouter.call(void 0, patched, {
|
|
257
257
|
initialEntries,
|
|
258
258
|
initialIndex,
|
|
259
259
|
hydrationData
|
|
260
260
|
});
|
|
261
261
|
}
|
|
262
|
-
return /* @__PURE__ */ React2.createElement(
|
|
262
|
+
return /* @__PURE__ */ React2.createElement(_chunkPW3F6ATGjs.FrameworkContext.Provider, { value: frameworkContextRef.current }, /* @__PURE__ */ React2.createElement(_chunkLWNHKVDLjs.RouterProvider, { router: routerRef.current }));
|
|
263
263
|
};
|
|
264
264
|
}
|
|
265
265
|
function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
@@ -273,9 +273,9 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
273
273
|
id: route.id,
|
|
274
274
|
path: route.path,
|
|
275
275
|
index: route.index,
|
|
276
|
-
Component: route.Component ?
|
|
277
|
-
HydrateFallback: route.HydrateFallback ?
|
|
278
|
-
ErrorBoundary: route.ErrorBoundary ?
|
|
276
|
+
Component: route.Component ? _chunkLWNHKVDLjs.withComponentProps.call(void 0, route.Component) : void 0,
|
|
277
|
+
HydrateFallback: route.HydrateFallback ? _chunkLWNHKVDLjs.withHydrateFallbackProps.call(void 0, route.HydrateFallback) : void 0,
|
|
278
|
+
ErrorBoundary: route.ErrorBoundary ? _chunkLWNHKVDLjs.withErrorBoundaryProps.call(void 0, route.ErrorBoundary) : void 0,
|
|
279
279
|
action: route.action ? (args) => route.action({ ...args, context }) : void 0,
|
|
280
280
|
loader: route.loader ? (args) => route.loader({ ...args, context }) : void 0,
|
|
281
281
|
handle: route.handle,
|
|
@@ -304,7 +304,7 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
304
304
|
};
|
|
305
305
|
manifest.routes[newRoute.id] = entryRoute;
|
|
306
306
|
routeModules[route.id] = {
|
|
307
|
-
default: newRoute.Component ||
|
|
307
|
+
default: newRoute.Component || _chunkLWNHKVDLjs.Outlet,
|
|
308
308
|
ErrorBoundary: newRoute.ErrorBoundary || void 0,
|
|
309
309
|
handle: route.handle,
|
|
310
310
|
links: route.links,
|
|
@@ -499,7 +499,7 @@ function myUnescape(value) {
|
|
|
499
499
|
return result;
|
|
500
500
|
}
|
|
501
501
|
function warnOnceAboutExpiresCookie(name, expires) {
|
|
502
|
-
|
|
502
|
+
_chunkPW3F6ATGjs.warnOnce.call(void 0,
|
|
503
503
|
!expires,
|
|
504
504
|
`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.`
|
|
505
505
|
);
|
|
@@ -553,7 +553,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
553
553
|
let entries = Object.entries(errors);
|
|
554
554
|
let serialized = {};
|
|
555
555
|
for (let [key, val] of entries) {
|
|
556
|
-
if (
|
|
556
|
+
if (_chunkPW3F6ATGjs.isRouteErrorResponse.call(void 0, val)) {
|
|
557
557
|
serialized[key] = { ...val, __type: "RouteErrorResponse" };
|
|
558
558
|
} else if (val instanceof Error) {
|
|
559
559
|
let sanitized = sanitizeError(val, serverMode);
|
|
@@ -578,7 +578,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
578
578
|
|
|
579
579
|
// lib/server-runtime/routeMatching.ts
|
|
580
580
|
function matchServerRoutes(routes, pathname, basename) {
|
|
581
|
-
let matches =
|
|
581
|
+
let matches = _chunkPW3F6ATGjs.matchRoutes.call(void 0,
|
|
582
582
|
routes,
|
|
583
583
|
pathname,
|
|
584
584
|
basename
|
|
@@ -598,7 +598,7 @@ async function callRouteHandler(handler, args) {
|
|
|
598
598
|
params: args.params,
|
|
599
599
|
context: args.context
|
|
600
600
|
});
|
|
601
|
-
if (
|
|
601
|
+
if (_chunkPW3F6ATGjs.isDataWithResponseInit.call(void 0, result) && result.init && result.init.status && _chunkPW3F6ATGjs.isRedirectStatusCode.call(void 0, result.init.status)) {
|
|
602
602
|
throw new Response(null, result.init);
|
|
603
603
|
}
|
|
604
604
|
return result;
|
|
@@ -717,17 +717,17 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
717
717
|
controller.close();
|
|
718
718
|
}
|
|
719
719
|
});
|
|
720
|
-
let decoded = await
|
|
720
|
+
let decoded = await _chunkPW3F6ATGjs.decodeViaTurboStream.call(void 0, stream, global);
|
|
721
721
|
let data2 = decoded.value;
|
|
722
|
-
if (data2 &&
|
|
723
|
-
let result = data2[
|
|
722
|
+
if (data2 && _chunkPW3F6ATGjs.SingleFetchRedirectSymbol in data2) {
|
|
723
|
+
let result = data2[_chunkPW3F6ATGjs.SingleFetchRedirectSymbol];
|
|
724
724
|
let init = { status: result.status };
|
|
725
725
|
if (result.reload) {
|
|
726
|
-
throw
|
|
726
|
+
throw _chunkPW3F6ATGjs.redirectDocument.call(void 0, result.redirect, init);
|
|
727
727
|
} else if (result.replace) {
|
|
728
|
-
throw
|
|
728
|
+
throw _chunkPW3F6ATGjs.replace.call(void 0, result.redirect, init);
|
|
729
729
|
} else {
|
|
730
|
-
throw
|
|
730
|
+
throw _chunkPW3F6ATGjs.redirect.call(void 0, result.redirect, init);
|
|
731
731
|
}
|
|
732
732
|
} else {
|
|
733
733
|
invariant2(
|
|
@@ -766,7 +766,7 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
766
766
|
|
|
767
767
|
// lib/server-runtime/serverHandoff.ts
|
|
768
768
|
function createServerHandoffString(serverHandoff) {
|
|
769
|
-
return
|
|
769
|
+
return _chunkPW3F6ATGjs.escapeHtml.call(void 0, JSON.stringify(serverHandoff));
|
|
770
770
|
}
|
|
771
771
|
|
|
772
772
|
// lib/server-runtime/headers.ts
|
|
@@ -843,7 +843,7 @@ function prependCookies(parentHeaders, childHeaders) {
|
|
|
843
843
|
|
|
844
844
|
// lib/server-runtime/single-fetch.ts
|
|
845
845
|
var SERVER_NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([
|
|
846
|
-
...
|
|
846
|
+
..._chunkPW3F6ATGjs.NO_BODY_STATUS_CODES,
|
|
847
847
|
304
|
|
848
848
|
]);
|
|
849
849
|
async function singleFetchAction(build, serverMode, staticHandler, request, handlerUrl, loadContext, handleError) {
|
|
@@ -873,7 +873,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
873
873
|
return handleQueryError(error);
|
|
874
874
|
}
|
|
875
875
|
function handleQueryResult(result) {
|
|
876
|
-
return
|
|
876
|
+
return _chunkPW3F6ATGjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
877
877
|
}
|
|
878
878
|
function handleQueryError(error) {
|
|
879
879
|
handleError(error);
|
|
@@ -885,12 +885,12 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
885
885
|
}
|
|
886
886
|
function staticContextToResponse(context) {
|
|
887
887
|
let headers = getDocumentHeaders(context, build);
|
|
888
|
-
if (
|
|
888
|
+
if (_chunkPW3F6ATGjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
889
889
|
return new Response(null, { status: context.statusCode, headers });
|
|
890
890
|
}
|
|
891
891
|
if (context.errors) {
|
|
892
892
|
Object.values(context.errors).forEach((err) => {
|
|
893
|
-
if (!
|
|
893
|
+
if (!_chunkPW3F6ATGjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
894
894
|
handleError(err);
|
|
895
895
|
}
|
|
896
896
|
});
|
|
@@ -937,7 +937,7 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
937
937
|
return handleQueryError(error);
|
|
938
938
|
}
|
|
939
939
|
function handleQueryResult(result) {
|
|
940
|
-
return
|
|
940
|
+
return _chunkPW3F6ATGjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
941
941
|
}
|
|
942
942
|
function handleQueryError(error) {
|
|
943
943
|
handleError(error);
|
|
@@ -949,12 +949,12 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
949
949
|
}
|
|
950
950
|
function staticContextToResponse(context) {
|
|
951
951
|
let headers = getDocumentHeaders(context, build);
|
|
952
|
-
if (
|
|
952
|
+
if (_chunkPW3F6ATGjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
953
953
|
return new Response(null, { status: context.statusCode, headers });
|
|
954
954
|
}
|
|
955
955
|
if (context.errors) {
|
|
956
956
|
Object.values(context.errors).forEach((err) => {
|
|
957
|
-
if (!
|
|
957
|
+
if (!_chunkPW3F6ATGjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
958
958
|
handleError(err);
|
|
959
959
|
}
|
|
960
960
|
});
|
|
@@ -1018,15 +1018,15 @@ function generateSingleFetchRedirectResponse(redirectResponse, request, build, s
|
|
|
1018
1018
|
headers.delete("Location");
|
|
1019
1019
|
headers.set("Content-Type", "text/x-script");
|
|
1020
1020
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
1021
|
-
result: request.method === "GET" ? { [
|
|
1021
|
+
result: request.method === "GET" ? { [_chunkPW3F6ATGjs.SingleFetchRedirectSymbol]: redirect2 } : redirect2,
|
|
1022
1022
|
headers,
|
|
1023
|
-
status:
|
|
1023
|
+
status: _chunkPW3F6ATGjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
1024
1024
|
});
|
|
1025
1025
|
}
|
|
1026
1026
|
function getSingleFetchRedirect(status, headers, basename) {
|
|
1027
1027
|
let redirect2 = headers.get("Location");
|
|
1028
1028
|
if (basename) {
|
|
1029
|
-
redirect2 =
|
|
1029
|
+
redirect2 = _chunkPW3F6ATGjs.stripBasename.call(void 0, redirect2, basename) || redirect2;
|
|
1030
1030
|
}
|
|
1031
1031
|
return {
|
|
1032
1032
|
redirect: redirect2,
|
|
@@ -1052,7 +1052,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1052
1052
|
typeof streamTimeout === "number" ? streamTimeout : 4950
|
|
1053
1053
|
);
|
|
1054
1054
|
requestSignal.addEventListener("abort", () => clearTimeout(timeoutId));
|
|
1055
|
-
return
|
|
1055
|
+
return _chunkPW3F6ATGjs.encode.call(void 0, data2, {
|
|
1056
1056
|
signal: controller.signal,
|
|
1057
1057
|
plugins: [
|
|
1058
1058
|
(value) => {
|
|
@@ -1060,12 +1060,12 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1060
1060
|
let { name, message, stack } = serverMode === "production" /* Production */ ? sanitizeError(value, serverMode) : value;
|
|
1061
1061
|
return ["SanitizedError", name, message, stack];
|
|
1062
1062
|
}
|
|
1063
|
-
if (value instanceof
|
|
1063
|
+
if (value instanceof _chunkPW3F6ATGjs.ErrorResponseImpl) {
|
|
1064
1064
|
let { data: data3, status, statusText } = value;
|
|
1065
1065
|
return ["ErrorResponse", data3, status, statusText];
|
|
1066
1066
|
}
|
|
1067
|
-
if (value && typeof value === "object" &&
|
|
1068
|
-
return ["SingleFetchRedirect", value[
|
|
1067
|
+
if (value && typeof value === "object" && _chunkPW3F6ATGjs.SingleFetchRedirectSymbol in value) {
|
|
1068
|
+
return ["SingleFetchRedirect", value[_chunkPW3F6ATGjs.SingleFetchRedirectSymbol]];
|
|
1069
1069
|
}
|
|
1070
1070
|
}
|
|
1071
1071
|
],
|
|
@@ -1088,14 +1088,14 @@ function derive(build, mode) {
|
|
|
1088
1088
|
let routes = createRoutes(build.routes);
|
|
1089
1089
|
let dataRoutes = createStaticHandlerDataRoutes(build.routes, build.future);
|
|
1090
1090
|
let serverMode = isServerMode(mode) ? mode : "production" /* Production */;
|
|
1091
|
-
let staticHandler =
|
|
1091
|
+
let staticHandler = _chunkPW3F6ATGjs.createStaticHandler.call(void 0, dataRoutes, {
|
|
1092
1092
|
basename: build.basename
|
|
1093
1093
|
});
|
|
1094
1094
|
let errorHandler = build.entry.module.handleError || ((error, { request }) => {
|
|
1095
1095
|
if (serverMode !== "test" /* Test */ && !request.signal.aborted) {
|
|
1096
1096
|
console.error(
|
|
1097
1097
|
// @ts-expect-error This is "private" from users but intended for internal use
|
|
1098
|
-
|
|
1098
|
+
_chunkPW3F6ATGjs.isRouteErrorResponse.call(void 0, error) && error.error ? error.error : error
|
|
1099
1099
|
);
|
|
1100
1100
|
}
|
|
1101
1101
|
});
|
|
@@ -1141,36 +1141,36 @@ var createRequestHandler = (build, mode) => {
|
|
|
1141
1141
|
});
|
|
1142
1142
|
};
|
|
1143
1143
|
if (_build.future.v8_middleware) {
|
|
1144
|
-
if (initialContext && !(initialContext instanceof
|
|
1144
|
+
if (initialContext && !(initialContext instanceof _chunkPW3F6ATGjs.RouterContextProvider)) {
|
|
1145
1145
|
let error = new Error(
|
|
1146
1146
|
"Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `RouterContextProvider` from your `getLoadContext` function."
|
|
1147
1147
|
);
|
|
1148
1148
|
handleError(error);
|
|
1149
1149
|
return returnLastResortErrorResponse(error, serverMode);
|
|
1150
1150
|
}
|
|
1151
|
-
loadContext = initialContext || new (0,
|
|
1151
|
+
loadContext = initialContext || new (0, _chunkPW3F6ATGjs.RouterContextProvider)();
|
|
1152
1152
|
} else {
|
|
1153
1153
|
loadContext = initialContext || {};
|
|
1154
1154
|
}
|
|
1155
1155
|
let url = new URL(request.url);
|
|
1156
1156
|
let normalizedBasename = _build.basename || "/";
|
|
1157
1157
|
let normalizedPath = url.pathname;
|
|
1158
|
-
if (
|
|
1158
|
+
if (_chunkPW3F6ATGjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) === "/_root.data") {
|
|
1159
1159
|
normalizedPath = normalizedBasename;
|
|
1160
1160
|
} else if (normalizedPath.endsWith(".data")) {
|
|
1161
1161
|
normalizedPath = normalizedPath.replace(/\.data$/, "");
|
|
1162
1162
|
}
|
|
1163
|
-
if (
|
|
1163
|
+
if (_chunkPW3F6ATGjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) !== "/" && normalizedPath.endsWith("/")) {
|
|
1164
1164
|
normalizedPath = normalizedPath.slice(0, -1);
|
|
1165
1165
|
}
|
|
1166
1166
|
let isSpaMode = getBuildTimeHeader(request, "X-React-Router-SPA-Mode") === "yes";
|
|
1167
1167
|
if (!_build.ssr) {
|
|
1168
1168
|
let decodedPath = decodeURI(normalizedPath);
|
|
1169
1169
|
if (normalizedBasename !== "/") {
|
|
1170
|
-
let strippedPath =
|
|
1170
|
+
let strippedPath = _chunkPW3F6ATGjs.stripBasename.call(void 0, decodedPath, normalizedBasename);
|
|
1171
1171
|
if (strippedPath == null) {
|
|
1172
1172
|
errorHandler(
|
|
1173
|
-
new (0,
|
|
1173
|
+
new (0, _chunkPW3F6ATGjs.ErrorResponseImpl)(
|
|
1174
1174
|
404,
|
|
1175
1175
|
"Not Found",
|
|
1176
1176
|
`Refusing to prerender the \`${decodedPath}\` path because it does not start with the basename \`${normalizedBasename}\``
|
|
@@ -1193,7 +1193,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1193
1193
|
} else if (!_build.prerender.includes(decodedPath) && !_build.prerender.includes(decodedPath + "/")) {
|
|
1194
1194
|
if (url.pathname.endsWith(".data")) {
|
|
1195
1195
|
errorHandler(
|
|
1196
|
-
new (0,
|
|
1196
|
+
new (0, _chunkPW3F6ATGjs.ErrorResponseImpl)(
|
|
1197
1197
|
404,
|
|
1198
1198
|
"Not Found",
|
|
1199
1199
|
`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.`
|
|
@@ -1213,7 +1213,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1213
1213
|
}
|
|
1214
1214
|
}
|
|
1215
1215
|
}
|
|
1216
|
-
let manifestUrl =
|
|
1216
|
+
let manifestUrl = _chunkPW3F6ATGjs.getManifestPath.call(void 0,
|
|
1217
1217
|
_build.routeDiscovery.manifestPath,
|
|
1218
1218
|
normalizedBasename
|
|
1219
1219
|
);
|
|
@@ -1248,7 +1248,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1248
1248
|
loadContext,
|
|
1249
1249
|
handleError
|
|
1250
1250
|
);
|
|
1251
|
-
if (
|
|
1251
|
+
if (_chunkPW3F6ATGjs.isRedirectResponse.call(void 0, response)) {
|
|
1252
1252
|
response = generateSingleFetchRedirectResponse(
|
|
1253
1253
|
response,
|
|
1254
1254
|
request,
|
|
@@ -1262,7 +1262,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1262
1262
|
params: singleFetchMatches ? singleFetchMatches[0].params : {},
|
|
1263
1263
|
request
|
|
1264
1264
|
});
|
|
1265
|
-
if (
|
|
1265
|
+
if (_chunkPW3F6ATGjs.isRedirectResponse.call(void 0, response)) {
|
|
1266
1266
|
response = generateSingleFetchRedirectResponse(
|
|
1267
1267
|
response,
|
|
1268
1268
|
request,
|
|
@@ -1379,7 +1379,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1379
1379
|
generateMiddlewareResponse: build.future.v8_middleware ? async (query) => {
|
|
1380
1380
|
try {
|
|
1381
1381
|
let innerResult = await query(request);
|
|
1382
|
-
if (!
|
|
1382
|
+
if (!_chunkPW3F6ATGjs.isResponse.call(void 0, innerResult)) {
|
|
1383
1383
|
innerResult = await renderHtml(innerResult, isSpaMode);
|
|
1384
1384
|
}
|
|
1385
1385
|
return innerResult;
|
|
@@ -1389,7 +1389,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1389
1389
|
}
|
|
1390
1390
|
} : void 0
|
|
1391
1391
|
});
|
|
1392
|
-
if (!
|
|
1392
|
+
if (!_chunkPW3F6ATGjs.isResponse.call(void 0, result)) {
|
|
1393
1393
|
result = await renderHtml(result, isSpaMode);
|
|
1394
1394
|
}
|
|
1395
1395
|
return result;
|
|
@@ -1404,7 +1404,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1404
1404
|
}
|
|
1405
1405
|
if (context.errors) {
|
|
1406
1406
|
Object.values(context.errors).forEach((err) => {
|
|
1407
|
-
if (!
|
|
1407
|
+
if (!_chunkPW3F6ATGjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1408
1408
|
handleError(err);
|
|
1409
1409
|
}
|
|
1410
1410
|
});
|
|
@@ -1456,10 +1456,10 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1456
1456
|
} catch (error) {
|
|
1457
1457
|
handleError(error);
|
|
1458
1458
|
let errorForSecondRender = error;
|
|
1459
|
-
if (
|
|
1459
|
+
if (_chunkPW3F6ATGjs.isResponse.call(void 0, error)) {
|
|
1460
1460
|
try {
|
|
1461
1461
|
let data2 = await unwrapResponse(error);
|
|
1462
|
-
errorForSecondRender = new (0,
|
|
1462
|
+
errorForSecondRender = new (0, _chunkPW3F6ATGjs.ErrorResponseImpl)(
|
|
1463
1463
|
error.status,
|
|
1464
1464
|
error.statusText,
|
|
1465
1465
|
data2
|
|
@@ -1467,7 +1467,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1467
1467
|
} catch (e) {
|
|
1468
1468
|
}
|
|
1469
1469
|
}
|
|
1470
|
-
context =
|
|
1470
|
+
context = _chunkPW3F6ATGjs.getStaticContextFromError.call(void 0,
|
|
1471
1471
|
staticHandler.dataRoutes,
|
|
1472
1472
|
context,
|
|
1473
1473
|
errorForSecondRender
|
|
@@ -1526,7 +1526,7 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1526
1526
|
return handleQueryRouteError(error);
|
|
1527
1527
|
}
|
|
1528
1528
|
function handleQueryRouteResult(result) {
|
|
1529
|
-
if (
|
|
1529
|
+
if (_chunkPW3F6ATGjs.isResponse.call(void 0, result)) {
|
|
1530
1530
|
return result;
|
|
1531
1531
|
}
|
|
1532
1532
|
if (typeof result === "string") {
|
|
@@ -1535,11 +1535,11 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1535
1535
|
return Response.json(result);
|
|
1536
1536
|
}
|
|
1537
1537
|
function handleQueryRouteError(error) {
|
|
1538
|
-
if (
|
|
1538
|
+
if (_chunkPW3F6ATGjs.isResponse.call(void 0, error)) {
|
|
1539
1539
|
error.headers.set("X-Remix-Catch", "yes");
|
|
1540
1540
|
return error;
|
|
1541
1541
|
}
|
|
1542
|
-
if (
|
|
1542
|
+
if (_chunkPW3F6ATGjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1543
1543
|
handleError(error);
|
|
1544
1544
|
return errorResponseToJson(error, serverMode);
|
|
1545
1545
|
}
|
|
@@ -1665,7 +1665,7 @@ function createSessionStorage({
|
|
|
1665
1665
|
};
|
|
1666
1666
|
}
|
|
1667
1667
|
function warnOnceAboutSigningSessionCookie(cookie) {
|
|
1668
|
-
|
|
1668
|
+
_chunkPW3F6ATGjs.warnOnce.call(void 0,
|
|
1669
1669
|
cookie.isSigned,
|
|
1670
1670
|
`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.`
|
|
1671
1671
|
);
|
|
@@ -1772,12 +1772,12 @@ function getHydrationData({
|
|
|
1772
1772
|
...state,
|
|
1773
1773
|
loaderData: { ...state.loaderData }
|
|
1774
1774
|
};
|
|
1775
|
-
let initialMatches =
|
|
1775
|
+
let initialMatches = _chunkPW3F6ATGjs.matchRoutes.call(void 0, routes, location2, basename);
|
|
1776
1776
|
if (initialMatches) {
|
|
1777
1777
|
for (let match of initialMatches) {
|
|
1778
1778
|
let routeId = match.route.id;
|
|
1779
1779
|
let routeInfo = getRouteInfo(routeId);
|
|
1780
|
-
if (
|
|
1780
|
+
if (_chunkPW3F6ATGjs.shouldHydrateRouteLoader.call(void 0,
|
|
1781
1781
|
routeId,
|
|
1782
1782
|
routeInfo.clientLoader,
|
|
1783
1783
|
routeInfo.hasLoader,
|
|
@@ -1855,7 +1855,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1855
1855
|
}
|
|
1856
1856
|
}
|
|
1857
1857
|
);
|
|
1858
|
-
if (
|
|
1858
|
+
if (_chunkPW3F6ATGjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1859
1859
|
return /* @__PURE__ */ React.default.createElement(
|
|
1860
1860
|
ErrorWrapper,
|
|
1861
1861
|
{
|
|
@@ -1863,7 +1863,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1863
1863
|
title: "Unhandled Thrown Response!"
|
|
1864
1864
|
},
|
|
1865
1865
|
/* @__PURE__ */ React.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
|
1866
|
-
|
|
1866
|
+
_chunkPW3F6ATGjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
|
1867
1867
|
);
|
|
1868
1868
|
}
|
|
1869
1869
|
let errorInstance;
|
|
@@ -1889,7 +1889,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1889
1889
|
function RSCDefaultRootErrorBoundary({
|
|
1890
1890
|
hasRootLayout
|
|
1891
1891
|
}) {
|
|
1892
|
-
let error =
|
|
1892
|
+
let error = _chunkPW3F6ATGjs.useRouteError.call(void 0, );
|
|
1893
1893
|
if (hasRootLayout === void 0) {
|
|
1894
1894
|
throw new Error("Missing 'hasRootLayout' prop");
|
|
1895
1895
|
}
|
|
@@ -2033,7 +2033,7 @@ function createRouterFromPayload({
|
|
|
2033
2033
|
populateRSCRouteModules(globalVar.__reactRouterRouteModules, payload.matches);
|
|
2034
2034
|
let patches = /* @__PURE__ */ new Map();
|
|
2035
2035
|
_optionalChain([payload, 'access', _20 => _20.patches, 'optionalAccess', _21 => _21.forEach, 'call', _22 => _22((patch) => {
|
|
2036
|
-
|
|
2036
|
+
_chunkPW3F6ATGjs.invariant.call(void 0, patch.parentId, "Invalid patch parentId");
|
|
2037
2037
|
if (!patches.has(patch.parentId)) {
|
|
2038
2038
|
patches.set(patch.parentId, []);
|
|
2039
2039
|
}
|
|
@@ -2055,11 +2055,11 @@ function createRouterFromPayload({
|
|
|
2055
2055
|
}
|
|
2056
2056
|
return [route];
|
|
2057
2057
|
}, []);
|
|
2058
|
-
globalVar.__reactRouterDataRouter =
|
|
2058
|
+
globalVar.__reactRouterDataRouter = _chunkPW3F6ATGjs.createRouter.call(void 0, {
|
|
2059
2059
|
routes,
|
|
2060
2060
|
getContext,
|
|
2061
2061
|
basename: payload.basename,
|
|
2062
|
-
history:
|
|
2062
|
+
history: _chunkPW3F6ATGjs.createBrowserHistory.call(void 0, ),
|
|
2063
2063
|
hydrationData: getHydrationData({
|
|
2064
2064
|
state: {
|
|
2065
2065
|
loaderData: payload.loaderData,
|
|
@@ -2069,7 +2069,7 @@ function createRouterFromPayload({
|
|
|
2069
2069
|
routes,
|
|
2070
2070
|
getRouteInfo: (routeId) => {
|
|
2071
2071
|
let match = payload.matches.find((m) => m.id === routeId);
|
|
2072
|
-
|
|
2072
|
+
_chunkPW3F6ATGjs.invariant.call(void 0, match, "Route not found in payload");
|
|
2073
2073
|
return {
|
|
2074
2074
|
clientLoader: match.clientLoader,
|
|
2075
2075
|
hasLoader: match.hasLoader,
|
|
@@ -2167,9 +2167,9 @@ function createRouterFromPayload({
|
|
|
2167
2167
|
routeModules: globalVar.__reactRouterRouteModules
|
|
2168
2168
|
};
|
|
2169
2169
|
}
|
|
2170
|
-
var renderedRoutesContext =
|
|
2170
|
+
var renderedRoutesContext = _chunkPW3F6ATGjs.createContext.call(void 0, );
|
|
2171
2171
|
function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
|
|
2172
|
-
let dataStrategy =
|
|
2172
|
+
let dataStrategy = _chunkPW3F6ATGjs.getSingleFetchDataStrategyImpl.call(void 0,
|
|
2173
2173
|
getRouter,
|
|
2174
2174
|
(match) => {
|
|
2175
2175
|
let M = match;
|
|
@@ -2223,20 +2223,20 @@ function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReada
|
|
|
2223
2223
|
function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {
|
|
2224
2224
|
return async (args, basename, targetRoutes) => {
|
|
2225
2225
|
let { request, context } = args;
|
|
2226
|
-
let url =
|
|
2226
|
+
let url = _chunkPW3F6ATGjs.singleFetchUrl.call(void 0, request.url, basename, "rsc");
|
|
2227
2227
|
if (request.method === "GET") {
|
|
2228
|
-
url =
|
|
2228
|
+
url = _chunkPW3F6ATGjs.stripIndexParam.call(void 0, url);
|
|
2229
2229
|
if (targetRoutes) {
|
|
2230
2230
|
url.searchParams.set("_routes", targetRoutes.join(","));
|
|
2231
2231
|
}
|
|
2232
2232
|
}
|
|
2233
2233
|
let res = await fetchImplementation(
|
|
2234
|
-
new Request(url, await
|
|
2234
|
+
new Request(url, await _chunkPW3F6ATGjs.createRequestInit.call(void 0, request))
|
|
2235
2235
|
);
|
|
2236
2236
|
if (res.status === 404 && !res.headers.has("X-Remix-Response")) {
|
|
2237
|
-
throw new (0,
|
|
2237
|
+
throw new (0, _chunkPW3F6ATGjs.ErrorResponseImpl)(404, "Not Found", true);
|
|
2238
2238
|
}
|
|
2239
|
-
|
|
2239
|
+
_chunkPW3F6ATGjs.invariant.call(void 0, res.body, "No response body to decode");
|
|
2240
2240
|
try {
|
|
2241
2241
|
const payload = await createFromReadableStream(res.body, {
|
|
2242
2242
|
temporaryReferences: void 0
|
|
@@ -2260,7 +2260,7 @@ function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation)
|
|
|
2260
2260
|
}
|
|
2261
2261
|
context.get(renderedRoutesContext).push(...payload.matches);
|
|
2262
2262
|
let results = { routes: {} };
|
|
2263
|
-
const dataKey =
|
|
2263
|
+
const dataKey = _chunkPW3F6ATGjs.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
|
|
2264
2264
|
for (let [routeId, data2] of Object.entries(payload[dataKey] || {})) {
|
|
2265
2265
|
results.routes[routeId] = { data: data2 };
|
|
2266
2266
|
}
|
|
@@ -2293,7 +2293,7 @@ function RSCHydratedRouter({
|
|
|
2293
2293
|
[createFromReadableStream, payload, fetchImplementation, getContext]
|
|
2294
2294
|
);
|
|
2295
2295
|
React4.useEffect(() => {
|
|
2296
|
-
|
|
2296
|
+
_chunkPW3F6ATGjs.setIsHydrated.call(void 0, );
|
|
2297
2297
|
}, []);
|
|
2298
2298
|
React4.useLayoutEffect(() => {
|
|
2299
2299
|
const globalVar = window;
|
|
@@ -2380,7 +2380,7 @@ function RSCHydratedRouter({
|
|
|
2380
2380
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2381
2381
|
routeModules
|
|
2382
2382
|
};
|
|
2383
|
-
return /* @__PURE__ */ React4.createElement(
|
|
2383
|
+
return /* @__PURE__ */ React4.createElement(_chunkPW3F6ATGjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React4.createElement(RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React4.createElement(_chunkPW3F6ATGjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React4.createElement(_chunkLWNHKVDLjs.RouterProvider, { router, flushSync: ReactDOM.flushSync }))));
|
|
2384
2384
|
}
|
|
2385
2385
|
function createRouteFromServerManifest(match, payload) {
|
|
2386
2386
|
let hasInitialData = payload && match.id in payload.loaderData;
|
|
@@ -2391,7 +2391,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2391
2391
|
// the server loader flow regardless of whether the client loader calls
|
|
2392
2392
|
// `serverLoader` or not, otherwise we'll have nothing to render.
|
|
2393
2393
|
match.hasComponent && !match.element;
|
|
2394
|
-
|
|
2394
|
+
_chunkPW3F6ATGjs.invariant.call(void 0, window.__reactRouterRouteModules);
|
|
2395
2395
|
populateRSCRouteModules(window.__reactRouterRouteModules, match);
|
|
2396
2396
|
let dataRoute = {
|
|
2397
2397
|
id: match.id,
|
|
@@ -2442,7 +2442,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2442
2442
|
return await callSingleFetch(singleFetch);
|
|
2443
2443
|
}
|
|
2444
2444
|
}) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
|
|
2445
|
-
throw
|
|
2445
|
+
throw _chunkPW3F6ATGjs.noActionDefinedError.call(void 0, "action", match.id);
|
|
2446
2446
|
},
|
|
2447
2447
|
path: match.path,
|
|
2448
2448
|
shouldRevalidate: match.shouldRevalidate,
|
|
@@ -2455,7 +2455,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2455
2455
|
hasShouldRevalidate: match.shouldRevalidate != null
|
|
2456
2456
|
};
|
|
2457
2457
|
if (typeof dataRoute.loader === "function") {
|
|
2458
|
-
dataRoute.loader.hydrate =
|
|
2458
|
+
dataRoute.loader.hydrate = _chunkPW3F6ATGjs.shouldHydrateRouteLoader.call(void 0,
|
|
2459
2459
|
match.id,
|
|
2460
2460
|
match.clientLoader,
|
|
2461
2461
|
match.hasLoader,
|
|
@@ -2465,7 +2465,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2465
2465
|
return dataRoute;
|
|
2466
2466
|
}
|
|
2467
2467
|
function callSingleFetch(singleFetch) {
|
|
2468
|
-
|
|
2468
|
+
_chunkPW3F6ATGjs.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
|
|
2469
2469
|
return singleFetch();
|
|
2470
2470
|
}
|
|
2471
2471
|
function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
@@ -2473,7 +2473,7 @@ function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
|
2473
2473
|
let fn = type === "action" ? "serverAction()" : "serverLoader()";
|
|
2474
2474
|
let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
|
|
2475
2475
|
console.error(msg);
|
|
2476
|
-
throw new (0,
|
|
2476
|
+
throw new (0, _chunkPW3F6ATGjs.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
|
|
2477
2477
|
}
|
|
2478
2478
|
}
|
|
2479
2479
|
var nextPaths = /* @__PURE__ */ new Set();
|
|
@@ -2697,7 +2697,7 @@ async function routeRSCServerRequest({
|
|
|
2697
2697
|
const payload = await createFromReadableStream(
|
|
2698
2698
|
detectRedirectResponse.body
|
|
2699
2699
|
);
|
|
2700
|
-
if (serverResponse.status ===
|
|
2700
|
+
if (serverResponse.status === _chunkPW3F6ATGjs.SINGLE_FETCH_REDIRECT_STATUS && payload.type === "redirect") {
|
|
2701
2701
|
const headers2 = new Headers(serverResponse.headers);
|
|
2702
2702
|
headers2.delete("Content-Encoding");
|
|
2703
2703
|
headers2.delete("Content-Length");
|
|
@@ -2747,7 +2747,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2747
2747
|
if (payload.type !== "render") return null;
|
|
2748
2748
|
let patchedLoaderData = { ...payload.loaderData };
|
|
2749
2749
|
for (const match of payload.matches) {
|
|
2750
|
-
if (
|
|
2750
|
+
if (_chunkPW3F6ATGjs.shouldHydrateRouteLoader.call(void 0,
|
|
2751
2751
|
match.id,
|
|
2752
2752
|
match.clientLoader,
|
|
2753
2753
|
match.hasLoader,
|
|
@@ -2781,7 +2781,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2781
2781
|
}
|
|
2782
2782
|
}))
|
|
2783
2783
|
};
|
|
2784
|
-
const router =
|
|
2784
|
+
const router = _chunkLWNHKVDLjs.createStaticRouter.call(void 0,
|
|
2785
2785
|
payload.matches.reduceRight((previous, match) => {
|
|
2786
2786
|
const route = {
|
|
2787
2787
|
id: match.id,
|
|
@@ -2825,8 +2825,8 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2825
2825
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2826
2826
|
routeModules: createRSCRouteModules(payload)
|
|
2827
2827
|
};
|
|
2828
|
-
return /* @__PURE__ */ React5.createElement(
|
|
2829
|
-
|
|
2828
|
+
return /* @__PURE__ */ React5.createElement(_chunkPW3F6ATGjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React5.createElement(RSCRouterGlobalErrorBoundary, { location: payload.location }, /* @__PURE__ */ React5.createElement(_chunkPW3F6ATGjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React5.createElement(
|
|
2829
|
+
_chunkLWNHKVDLjs.StaticRouterProvider,
|
|
2830
2830
|
{
|
|
2831
2831
|
context,
|
|
2832
2832
|
router,
|
|
@@ -2884,7 +2884,7 @@ function deserializeErrors(errors) {
|
|
|
2884
2884
|
let serialized = {};
|
|
2885
2885
|
for (let [key, val] of entries) {
|
|
2886
2886
|
if (val && val.__type === "RouteErrorResponse") {
|
|
2887
|
-
serialized[key] = new (0,
|
|
2887
|
+
serialized[key] = new (0, _chunkPW3F6ATGjs.ErrorResponseImpl)(
|
|
2888
2888
|
val.status,
|
|
2889
2889
|
val.statusText,
|
|
2890
2890
|
val.data,
|
|
@@ -3043,4 +3043,4 @@ function deserializeErrors(errors) {
|
|
|
3043
3043
|
|
|
3044
3044
|
|
|
3045
3045
|
|
|
3046
|
-
exports.Await =
|
|
3046
|
+
exports.Await = _chunkLWNHKVDLjs.Await; exports.BrowserRouter = _chunkLWNHKVDLjs.BrowserRouter; exports.Form = _chunkLWNHKVDLjs.Form; exports.HashRouter = _chunkLWNHKVDLjs.HashRouter; exports.IDLE_BLOCKER = _chunkPW3F6ATGjs.IDLE_BLOCKER; exports.IDLE_FETCHER = _chunkPW3F6ATGjs.IDLE_FETCHER; exports.IDLE_NAVIGATION = _chunkPW3F6ATGjs.IDLE_NAVIGATION; exports.Link = _chunkLWNHKVDLjs.Link; exports.Links = _chunkPW3F6ATGjs.Links; exports.MemoryRouter = _chunkLWNHKVDLjs.MemoryRouter; exports.Meta = _chunkPW3F6ATGjs.Meta; exports.NavLink = _chunkLWNHKVDLjs.NavLink; exports.Navigate = _chunkLWNHKVDLjs.Navigate; exports.NavigationType = _chunkPW3F6ATGjs.Action; exports.Outlet = _chunkLWNHKVDLjs.Outlet; exports.PrefetchPageLinks = _chunkPW3F6ATGjs.PrefetchPageLinks; exports.Route = _chunkLWNHKVDLjs.Route; exports.Router = _chunkLWNHKVDLjs.Router; exports.RouterContextProvider = _chunkPW3F6ATGjs.RouterContextProvider; exports.RouterProvider = _chunkLWNHKVDLjs.RouterProvider; exports.Routes = _chunkLWNHKVDLjs.Routes; exports.Scripts = _chunkPW3F6ATGjs.Scripts; exports.ScrollRestoration = _chunkLWNHKVDLjs.ScrollRestoration; exports.ServerRouter = ServerRouter; exports.StaticRouter = _chunkLWNHKVDLjs.StaticRouter; exports.StaticRouterProvider = _chunkLWNHKVDLjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkPW3F6ATGjs.AwaitContextProvider; exports.UNSAFE_DataRouterContext = _chunkPW3F6ATGjs.DataRouterContext; exports.UNSAFE_DataRouterStateContext = _chunkPW3F6ATGjs.DataRouterStateContext; exports.UNSAFE_ErrorResponseImpl = _chunkPW3F6ATGjs.ErrorResponseImpl; exports.UNSAFE_FetchersContext = _chunkPW3F6ATGjs.FetchersContext; exports.UNSAFE_FrameworkContext = _chunkPW3F6ATGjs.FrameworkContext; exports.UNSAFE_LocationContext = _chunkPW3F6ATGjs.LocationContext; exports.UNSAFE_NavigationContext = _chunkPW3F6ATGjs.NavigationContext; exports.UNSAFE_RSCDefaultRootErrorBoundary = RSCDefaultRootErrorBoundary; exports.UNSAFE_RemixErrorBoundary = _chunkPW3F6ATGjs.RemixErrorBoundary; exports.UNSAFE_RouteContext = _chunkPW3F6ATGjs.RouteContext; exports.UNSAFE_ServerMode = ServerMode; exports.UNSAFE_SingleFetchRedirectSymbol = _chunkPW3F6ATGjs.SingleFetchRedirectSymbol; exports.UNSAFE_ViewTransitionContext = _chunkPW3F6ATGjs.ViewTransitionContext; exports.UNSAFE_WithComponentProps = _chunkLWNHKVDLjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkLWNHKVDLjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkLWNHKVDLjs.WithHydrateFallbackProps; exports.UNSAFE_createBrowserHistory = _chunkPW3F6ATGjs.createBrowserHistory; exports.UNSAFE_createClientRoutes = _chunkPW3F6ATGjs.createClientRoutes; exports.UNSAFE_createClientRoutesWithHMRRevalidationOptOut = _chunkPW3F6ATGjs.createClientRoutesWithHMRRevalidationOptOut; exports.UNSAFE_createRouter = _chunkPW3F6ATGjs.createRouter; exports.UNSAFE_decodeViaTurboStream = _chunkPW3F6ATGjs.decodeViaTurboStream; exports.UNSAFE_deserializeErrors = deserializeErrors; exports.UNSAFE_getHydrationData = getHydrationData; exports.UNSAFE_getPatchRoutesOnNavigationFunction = _chunkPW3F6ATGjs.getPatchRoutesOnNavigationFunction; exports.UNSAFE_getTurboStreamSingleFetchDataStrategy = _chunkPW3F6ATGjs.getTurboStreamSingleFetchDataStrategy; exports.UNSAFE_hydrationRouteProperties = _chunkLWNHKVDLjs.hydrationRouteProperties; exports.UNSAFE_invariant = _chunkPW3F6ATGjs.invariant; exports.UNSAFE_mapRouteProperties = _chunkLWNHKVDLjs.mapRouteProperties; exports.UNSAFE_shouldHydrateRouteLoader = _chunkPW3F6ATGjs.shouldHydrateRouteLoader; exports.UNSAFE_useFogOFWarDiscovery = _chunkPW3F6ATGjs.useFogOFWarDiscovery; exports.UNSAFE_useScrollRestoration = _chunkLWNHKVDLjs.useScrollRestoration; exports.UNSAFE_withComponentProps = _chunkLWNHKVDLjs.withComponentProps; exports.UNSAFE_withErrorBoundaryProps = _chunkLWNHKVDLjs.withErrorBoundaryProps; exports.UNSAFE_withHydrateFallbackProps = _chunkLWNHKVDLjs.withHydrateFallbackProps; exports.createBrowserRouter = _chunkLWNHKVDLjs.createBrowserRouter; exports.createContext = _chunkPW3F6ATGjs.createContext; exports.createCookie = createCookie; exports.createCookieSessionStorage = createCookieSessionStorage; exports.createHashRouter = _chunkLWNHKVDLjs.createHashRouter; exports.createMemoryRouter = _chunkLWNHKVDLjs.createMemoryRouter; exports.createMemorySessionStorage = createMemorySessionStorage; exports.createPath = _chunkPW3F6ATGjs.createPath; exports.createRequestHandler = createRequestHandler; exports.createRoutesFromChildren = _chunkLWNHKVDLjs.createRoutesFromChildren; exports.createRoutesFromElements = _chunkLWNHKVDLjs.createRoutesFromElements; exports.createRoutesStub = createRoutesStub; exports.createSearchParams = _chunkLWNHKVDLjs.createSearchParams; exports.createSession = createSession; exports.createSessionStorage = createSessionStorage; exports.createStaticHandler = _chunkLWNHKVDLjs.createStaticHandler; exports.createStaticRouter = _chunkLWNHKVDLjs.createStaticRouter; exports.data = _chunkPW3F6ATGjs.data; exports.generatePath = _chunkPW3F6ATGjs.generatePath; exports.href = href; exports.isCookie = isCookie; exports.isRouteErrorResponse = _chunkPW3F6ATGjs.isRouteErrorResponse; exports.isSession = isSession; exports.matchPath = _chunkPW3F6ATGjs.matchPath; exports.matchRoutes = _chunkPW3F6ATGjs.matchRoutes; exports.parsePath = _chunkPW3F6ATGjs.parsePath; exports.redirect = _chunkPW3F6ATGjs.redirect; exports.redirectDocument = _chunkPW3F6ATGjs.redirectDocument; exports.renderMatches = _chunkLWNHKVDLjs.renderMatches; exports.replace = _chunkPW3F6ATGjs.replace; exports.resolvePath = _chunkPW3F6ATGjs.resolvePath; exports.unstable_HistoryRouter = _chunkLWNHKVDLjs.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 = _chunkLWNHKVDLjs.usePrompt; exports.useActionData = _chunkPW3F6ATGjs.useActionData; exports.useAsyncError = _chunkPW3F6ATGjs.useAsyncError; exports.useAsyncValue = _chunkPW3F6ATGjs.useAsyncValue; exports.useBeforeUnload = _chunkLWNHKVDLjs.useBeforeUnload; exports.useBlocker = _chunkPW3F6ATGjs.useBlocker; exports.useFetcher = _chunkLWNHKVDLjs.useFetcher; exports.useFetchers = _chunkLWNHKVDLjs.useFetchers; exports.useFormAction = _chunkLWNHKVDLjs.useFormAction; exports.useHref = _chunkPW3F6ATGjs.useHref; exports.useInRouterContext = _chunkPW3F6ATGjs.useInRouterContext; exports.useLinkClickHandler = _chunkLWNHKVDLjs.useLinkClickHandler; exports.useLoaderData = _chunkPW3F6ATGjs.useLoaderData; exports.useLocation = _chunkPW3F6ATGjs.useLocation; exports.useMatch = _chunkPW3F6ATGjs.useMatch; exports.useMatches = _chunkPW3F6ATGjs.useMatches; exports.useNavigate = _chunkPW3F6ATGjs.useNavigate; exports.useNavigation = _chunkPW3F6ATGjs.useNavigation; exports.useNavigationType = _chunkPW3F6ATGjs.useNavigationType; exports.useOutlet = _chunkPW3F6ATGjs.useOutlet; exports.useOutletContext = _chunkPW3F6ATGjs.useOutletContext; exports.useParams = _chunkPW3F6ATGjs.useParams; exports.useResolvedPath = _chunkPW3F6ATGjs.useResolvedPath; exports.useRevalidator = _chunkPW3F6ATGjs.useRevalidator; exports.useRouteError = _chunkPW3F6ATGjs.useRouteError; exports.useRouteLoaderData = _chunkPW3F6ATGjs.useRouteLoaderData; exports.useRoutes = _chunkPW3F6ATGjs.useRoutes; exports.useSearchParams = _chunkLWNHKVDLjs.useSearchParams; exports.useSubmit = _chunkLWNHKVDLjs.useSubmit; exports.useViewTransitionState = _chunkLWNHKVDLjs.useViewTransitionState;
|