/opt/canhelp/node_modules/next/dist/client
NameSizeModeActions
app-dir/-0755rm
compat/-0755rm
components/-0755rm
dev/-0755rm
legacy/-0755rm
lib/-0755rm
portal/-0755rm
react-client-callbacks/-0755rm
request/-0755rm
tracing/-0755rm
add-base-path.d.ts790644editdlrm
add-base-path.js10100644editdlrm
add-base-path.js.map9730644editdlrm
add-locale.d.ts1210644editdlrm
add-locale.js10520644editdlrm
add-locale.js.map9000644editdlrm
app-bootstrap.d.ts2850644editdlrm
app-bootstrap.js27710644editdlrm
app-bootstrap.js.map39670644editdlrm
app-build-id.d.ts1110644editdlrm
app-build-id.js17670644editdlrm
app-build-id.js.map14610644editdlrm
app-call-server.d.ts910644editdlrm
app-call-server.js11640644editdlrm
app-call-server.js.map10170644editdlrm
app-find-source-map-url.d.ts900644editdlrm
app-find-source-map-url.js16620644editdlrm
app-find-source-map-url.js.map20920644editdlrm
app-globals.d.ts450644editdlrm
app-globals.js7080644editdlrm
app-globals.js.map5910644editdlrm
app-index.d.ts6250644editdlrm
app-index.js114290644editdlrm
app-index.js.map170630644editdlrm
app-link-gc.d.ts400644editdlrm
app-link-gc.js45430644editdlrm
app-link-gc.js.map51630644editdlrm
app-next-dev.d.ts240644editdlrm
app-next-dev.js12140644editdlrm
app-next-dev.js.map11980644editdlrm
app-next-turbopack.d.ts110644editdlrm
app-next-turbopack.js12910644editdlrm
app-next-turbopack.js.map16590644editdlrm
app-next.d.ts240644editdlrm
app-next.js12840644editdlrm
app-next.js.map12490644editdlrm
app-webpack.d.ts110644editdlrm
app-webpack.js31740644editdlrm
app-webpack.js.map32030644editdlrm
assign-location.d.ts3630644editdlrm
assign-location.js12590644editdlrm
assign-location.js.map15490644editdlrm
detect-domain-locale.d.ts1410644editdlrm
detect-domain-locale.js9220644editdlrm
detect-domain-locale.js.map7220644editdlrm
flight-data-helpers.d.ts14910644editdlrm
flight-data-helpers.js54390644editdlrm
flight-data-helpers.js.map86650644editdlrm
form-shared.d.ts28860644editdlrm
form-shared.js71320644editdlrm
form-shared.js.map107620644editdlrm
form.d.ts4890644editdlrm
form.js58160644editdlrm
form.js.map82650644editdlrm
get-domain-locale.d.ts2200644editdlrm
get-domain-locale.js15610644editdlrm
get-domain-locale.js.map24570644editdlrm
has-base-path.d.ts600644editdlrm
has-base-path.js8070644editdlrm
has-base-path.js.map6050644editdlrm
head-manager.d.ts10410644editdlrm
head-manager.js49810644editdlrm
head-manager.js.map83420644editdlrm
image-component.d.ts13370644editdlrm
image-component.js139610644editdlrm
image-component.js.map213850644editdlrm
index.d.ts7730644editdlrm
index.js334400644editdlrm
index.js.map525760644editdlrm
link.d.ts50620644editdlrm
link.js194570644editdlrm
link.js.map343670644editdlrm
next-dev-turbopack.d.ts110644editdlrm
next-dev-turbopack.js19400644editdlrm
next-dev-turbopack.js.map30020644editdlrm
next-dev.d.ts200644editdlrm
next-dev.js12230644editdlrm
next-dev.js.map11940644editdlrm
next-turbopack.d.ts480644editdlrm
next-turbopack.js14600644editdlrm
next-turbopack.js.map23300644editdlrm
next.d.ts1350644editdlrm
next.js7870644editdlrm
next.js.map8600644editdlrm
normalize-locale-path.d.ts1440644editdlrm
normalize-locale-path.js8830644editdlrm
normalize-locale-path.js.map8830644editdlrm
normalize-trailing-slash.d.ts1900644editdlrm
normalize-trailing-slash.js14500644editdlrm
normalize-trailing-slash.js.map17230644editdlrm
page-bootstrap.d.ts1230644editdlrm
page-bootstrap.js74270644editdlrm
page-bootstrap.js.map89990644editdlrm
page-loader.d.ts13700644editdlrm
page-loader.js75950644editdlrm
page-loader.js.map121060644editdlrm
remove-base-path.d.ts620644editdlrm
remove-base-path.js10800644editdlrm
remove-base-path.js.map11450644editdlrm
remove-locale.d.ts770644editdlrm
remove-locale.js11480644editdlrm
remove-locale.js.map13080644editdlrm
request-idle-callback.d.ts2650644editdlrm
request-idle-callback.js14490644editdlrm
request-idle-callback.js.map14320644editdlrm
resolve-href.d.ts3960644editdlrm
resolve-href.js55060644editdlrm
resolve-href.js.map78990644editdlrm
route-announcer.d.ts1150644editdlrm
route-announcer.js33120644editdlrm
route-announcer.js.map35530644editdlrm
route-loader.d.ts17360644editdlrm
route-loader.js139680644editdlrm
route-loader.js.map230120644editdlrm
route-params.d.ts11130644editdlrm
route-params.js82580644editdlrm
route-params.js.map108840644editdlrm
router.d.ts10780644editdlrm
router.js67160644editdlrm
router.js.map88230644editdlrm
script.d.ts9230644editdlrm
script.js140470644editdlrm
script.js.map187820644editdlrm
set-attributes-from-props.d.ts860644editdlrm
set-attributes-from-props.js23670644editdlrm
set-attributes-from-props.js.map31210644editdlrm
trusted-types.d.ts5440644editdlrm
trusted-types.js15280644editdlrm
trusted-types.js.map19570644editdlrm
use-client-disallowed.d.ts530644editdlrm
use-client-disallowed.js10060644editdlrm
use-client-disallowed.js.map7530644editdlrm
use-intersection.d.ts4120644editdlrm
use-intersection.js38450644editdlrm
use-intersection.js.map66460644editdlrm
use-merged-ref.d.ts1390644editdlrm
use-merged-ref.js24020644editdlrm
use-merged-ref.js.map34960644editdlrm
web-vitals.d.ts1560644editdlrm
web-vitals.js11090644editdlrm
web-vitals.js.map10080644editdlrm
webpack.d.ts110644editdlrm
webpack.js22820644editdlrm
webpack.js.map25350644editdlrm
with-router.d.ts5050644editdlrm
with-router.js14580644editdlrm
with-router.js.map19210644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/client/flight-data-helpers.js.map (8665B)
{"version":3,"sources":["../../src/client/flight-data-helpers.ts"],"sourcesContent":["import type {\n CacheNodeSeedData,\n FlightData,\n FlightDataPath,\n FlightRouterState,\n FlightSegmentPath,\n Segment,\n} from '../server/app-render/types'\nimport type { HeadData } from '../shared/lib/app-router-context.shared-runtime'\nimport { PAGE_SEGMENT_KEY } from '../shared/lib/segment'\n\nexport type NormalizedFlightData = {\n /**\n * The full `FlightSegmentPath` inclusive of the final `Segment`\n */\n segmentPath: FlightSegmentPath\n /**\n * The `FlightSegmentPath` exclusive of the final `Segment`\n */\n pathToSegment: FlightSegmentPath\n segment: Segment\n tree: FlightRouterState\n seedData: CacheNodeSeedData | null\n head: HeadData\n isHeadPartial: boolean\n isRootRender: boolean\n}\n\n// TODO: We should only have to export `normalizeFlightData`, however because the initial flight data\n// that gets passed to `createInitialRouterState` doesn't conform to the `FlightDataPath` type (it's missing the root segment)\n// we're currently exporting it so we can use it directly. This should be fixed as part of the unification of\n// the different ways we express `FlightSegmentPath`.\nexport function getFlightDataPartsFromPath(\n flightDataPath: FlightDataPath\n): NormalizedFlightData {\n // Pick the last 4 items from the `FlightDataPath` to get the [tree, seedData, viewport, isHeadPartial].\n const flightDataPathLength = 4\n // tree, seedData, and head are *always* the last three items in the `FlightDataPath`.\n const [tree, seedData, head, isHeadPartial] =\n flightDataPath.slice(-flightDataPathLength)\n // The `FlightSegmentPath` is everything except the last three items. For a root render, it won't be present.\n const segmentPath = flightDataPath.slice(0, -flightDataPathLength)\n\n return {\n // TODO: Unify these two segment path helpers. We are inconsistently pushing an empty segment (\"\")\n // to the start of the segment path in some places which makes it hard to use solely the segment path.\n // Look for \"// TODO-APP: remove ''\" in the codebase.\n pathToSegment: segmentPath.slice(0, -1),\n segmentPath,\n // if the `FlightDataPath` corresponds with the root, there'll be no segment path,\n // in which case we default to ''.\n segment: segmentPath[segmentPath.length - 1] ?? '',\n tree,\n seedData,\n head,\n isHeadPartial,\n isRootRender: flightDataPath.length === flightDataPathLength,\n }\n}\n\nexport function getNextFlightSegmentPath(\n flightSegmentPath: FlightSegmentPath\n): FlightSegmentPath {\n // Since `FlightSegmentPath` is a repeated tuple of `Segment` and `ParallelRouteKey`, we slice off two items\n // to get the next segment path.\n return flightSegmentPath.slice(2)\n}\n\nexport function normalizeFlightData(\n flightData: FlightData\n): NormalizedFlightData[] | string {\n // FlightData can be a string when the server didn't respond with a proper flight response,\n // or when a redirect happens, to signal to the client that it needs to perform an MPA navigation.\n if (typeof flightData === 'string') {\n return flightData\n }\n\n return flightData.map((flightDataPath) =>\n getFlightDataPartsFromPath(flightDataPath)\n )\n}\n\n/**\n * This function is used to prepare the flight router state for the request.\n * It removes markers that are not needed by the server, and are purely used\n * for stashing state on the client.\n * @param flightRouterState - The flight router state to prepare.\n * @param isHmrRefresh - Whether this is an HMR refresh request.\n * @returns The prepared flight router state.\n */\nexport function prepareFlightRouterStateForRequest(\n flightRouterState: FlightRouterState,\n isHmrRefresh?: boolean\n): string {\n // HMR requests need the complete, unmodified state for proper functionality\n if (isHmrRefresh) {\n return encodeURIComponent(JSON.stringify(flightRouterState))\n }\n\n return encodeURIComponent(\n JSON.stringify(stripClientOnlyDataFromFlightRouterState(flightRouterState))\n )\n}\n\n/**\n * Recursively strips client-only data from FlightRouterState while preserving\n * server-needed information for proper rendering decisions.\n */\nfunction stripClientOnlyDataFromFlightRouterState(\n flightRouterState: FlightRouterState\n): FlightRouterState {\n const [\n segment,\n parallelRoutes,\n _url, // Intentionally unused - URLs are client-only\n refreshMarker,\n isRootLayout,\n hasLoadingBoundary,\n ] = flightRouterState\n\n // __PAGE__ segments are always fetched from the server, so there's\n // no need to send them up\n const cleanedSegment = stripSearchParamsFromPageSegment(segment)\n\n // Recursively process parallel routes\n const cleanedParallelRoutes: { [key: string]: FlightRouterState } = {}\n for (const [key, childState] of Object.entries(parallelRoutes)) {\n cleanedParallelRoutes[key] =\n stripClientOnlyDataFromFlightRouterState(childState)\n }\n\n const result: FlightRouterState = [\n cleanedSegment,\n cleanedParallelRoutes,\n null, // URLs omitted - server reconstructs paths from segments\n shouldPreserveRefreshMarker(refreshMarker) ? refreshMarker : null,\n ]\n\n // Append optional fields if present\n if (isRootLayout !== undefined) {\n result[4] = isRootLayout\n }\n if (hasLoadingBoundary !== undefined) {\n result[5] = hasLoadingBoundary\n }\n\n return result\n}\n\n/**\n * Strips search parameters from __PAGE__ segments to prevent sensitive\n * client-side data from being sent to the server.\n */\nfunction stripSearchParamsFromPageSegment(segment: Segment): Segment {\n if (\n typeof segment === 'string' &&\n segment.startsWith(PAGE_SEGMENT_KEY + '?')\n ) {\n return PAGE_SEGMENT_KEY\n }\n return segment\n}\n\n/**\n * Determines whether the refresh marker should be sent to the server\n * Client-only markers like 'refresh' are stripped, while server-needed markers\n * like 'refetch' and 'inside-shared-layout' are preserved.\n */\nfunction shouldPreserveRefreshMarker(\n refreshMarker: FlightRouterState[3]\n): boolean {\n return Boolean(refreshMarker && refreshMarker !== 'refresh')\n}\n"],"names":["getFlightDataPartsFromPath","getNextFlightSegmentPath","normalizeFlightData","prepareFlightRouterStateForRequest","flightDataPath","flightDataPathLength","tree","seedData","head","isHeadPartial","slice","segmentPath","pathToSegment","segment","length","isRootRender","flightSegmentPath","flightData","map","flightRouterState","isHmrRefresh","encodeURIComponent","JSON","stringify","stripClientOnlyDataFromFlightRouterState","parallelRoutes","_url","refreshMarker","isRootLayout","hasLoadingBoundary","cleanedSegment","stripSearchParamsFromPageSegment","cleanedParallelRoutes","key","childState","Object","entries","result","shouldPreserveRefreshMarker","undefined","startsWith","PAGE_SEGMENT_KEY","Boolean"],"mappings":";;;;;;;;;;;;;;;;;IAgCgBA,0BAA0B;eAA1BA;;IA4BAC,wBAAwB;eAAxBA;;IAQAC,mBAAmB;eAAnBA;;IAsBAC,kCAAkC;eAAlCA;;;yBAjFiB;AAuB1B,SAASH,2BACdI,cAA8B;IAE9B,wGAAwG;IACxG,MAAMC,uBAAuB;IAC7B,sFAAsF;IACtF,MAAM,CAACC,MAAMC,UAAUC,MAAMC,cAAc,GACzCL,eAAeM,KAAK,CAAC,CAACL;IACxB,6GAA6G;IAC7G,MAAMM,cAAcP,eAAeM,KAAK,CAAC,GAAG,CAACL;QAUlCM;IARX,OAAO;QACL,kGAAkG;QAClG,sGAAsG;QACtG,qDAAqD;QACrDC,eAAeD,YAAYD,KAAK,CAAC,GAAG,CAAC;QACrCC;QACA,kFAAkF;QAClF,kCAAkC;QAClCE,SAASF,CAAAA,gBAAAA,WAAW,CAACA,YAAYG,MAAM,GAAG,EAAE,YAAnCH,gBAAuC;QAChDL;QACAC;QACAC;QACAC;QACAM,cAAcX,eAA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