/opt/canhelp/node_modules/next/dist/esm/shared/lib/router/utils
NameSizeModeActions
add-locale.js10200644editdlrm
add-locale.js.map17200644editdlrm
add-path-prefix.js4320644editdlrm
add-path-prefix.js.map8880644editdlrm
add-path-suffix.js4900644editdlrm
add-path-suffix.js.map9480644editdlrm
app-paths.js17680644editdlrm
app-paths.js.map27220644editdlrm
as-path-to-search-params.js2620644editdlrm
as-path-to-search-params.js.map5490644editdlrm
cache-busting-search-param.js5800644editdlrm
cache-busting-search-param.js.map13070644editdlrm
compare-states.js8500644editdlrm
compare-states.js.map19140644editdlrm
disable-smooth-scroll.js23760644editdlrm
disable-smooth-scroll.js.map36260644editdlrm
escape-path-delimiters.js3070644editdlrm
escape-path-delimiters.js.map7370644editdlrm
format-next-pathname-info.js9080644editdlrm
format-next-pathname-info.js.map20790644editdlrm
format-url.js32690644editdlrm
format-url.js.map56970644editdlrm
get-asset-path-from-route.js4370644editdlrm
get-asset-path-from-route.js.map8300644editdlrm
get-dynamic-param.js53080644editdlrm
get-dynamic-param.js.map74360644editdlrm
get-next-pathname-info.js21580644editdlrm
get-next-pathname-info.js.map51770644editdlrm
get-route-from-asset-path.js7160644editdlrm
get-route-from-asset-path.js.map13160644editdlrm
html-bots.js9090644editdlrm
html-bots.js.map11360644editdlrm
index.js1550644editdlrm
index.js.map3890644editdlrm
interception-routes.js37080644editdlrm
interception-routes.js.map50160644editdlrm
interpolate-as.js20000644editdlrm
interpolate-as.js.map38050644editdlrm
is-bot.js11000644editdlrm
is-bot.js.map19470644editdlrm
is-dynamic.js8840644editdlrm
is-dynamic.js.map15040644editdlrm
is-local-url.js7220644editdlrm
is-local-url.js.map12820644editdlrm
middleware-route-matcher.js6780644editdlrm
middleware-route-matcher.js.map17550644editdlrm
omit.js2500644editdlrm
omit.js.map7610644editdlrm
parse-path.js8410644editdlrm
parse-path.js.map14950644editdlrm
parse-relative-url.js12510644editdlrm
parse-relative-url.js.map30150644editdlrm
parse-url.js7220644editdlrm
parse-url.js.map18500644editdlrm
path-has-prefix.js5950644editdlrm
path-has-prefix.js.map10020644editdlrm
path-match.js19700644editdlrm
path-match.js.map37910644editdlrm
prepare-destination.js98280644editdlrm
prepare-destination.js.map171430644editdlrm
querystring.js17030644editdlrm
querystring.js.map32240644editdlrm
relativize-url.js8510644editdlrm
relativize-url.js.map18390644editdlrm
remove-path-prefix.js13340644editdlrm
remove-path-prefix.js.map20090644editdlrm
remove-trailing-slash.js3320644editdlrm
remove-trailing-slash.js.map5830644editdlrm
resolve-rewrites.js42400644editdlrm
resolve-rewrites.js.map78050644editdlrm
route-match-utils.js33610644editdlrm
route-match-utils.js.map56600644editdlrm
route-matcher.js12710644editdlrm
route-matcher.js.map25670644editdlrm
route-regex.js93150644editdlrm
route-regex.js.map175260644editdlrm
sortable-routes.js85020644editdlrm
sortable-routes.js.map125360644editdlrm
sorted-routes.js113320644editdlrm
sorted-routes.js.map147570644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/esm/shared/lib/router/utils/interception-routes.js (3708B)
import { normalizeAppPath } from './app-paths'; // order matters here, the first match will be used export const INTERCEPTION_ROUTE_MARKERS = [ '(..)(..)', '(.)', '(..)', '(...)' ]; export function isInterceptionRouteAppPath(path) { // TODO-APP: add more serious validation return path.split('/').find((segment)=>INTERCEPTION_ROUTE_MARKERS.find((m)=>segment.startsWith(m))) !== undefined; } export function extractInterceptionRouteInformation(path) { let interceptingRoute, marker, interceptedRoute; for (const segment of path.split('/')){ marker = INTERCEPTION_ROUTE_MARKERS.find((m)=>segment.startsWith(m)); if (marker) { ; [interceptingRoute, interceptedRoute] = path.split(marker, 2); break; } } if (!interceptingRoute || !marker || !interceptedRoute) { throw Object.defineProperty(new Error("Invalid interception route: " + path + ". Must be in the format //(..|...|..)(..)/"), "__NEXT_ERROR_CODE", { value: "E269", enumerable: false, configurable: true }); } interceptingRoute = normalizeAppPath(interceptingRoute) // normalize the path, e.g. /(blog)/feed -> /feed ; switch(marker){ case '(.)': // (.) indicates that we should match with sibling routes, so we just need to append the intercepted route to the intercepting route if (interceptingRoute === '/') { interceptedRoute = "/" + interceptedRoute; } else { interceptedRoute = interceptingRoute + '/' + interceptedRoute; } break; case '(..)': // (..) indicates that we should match at one level up, so we need to remove the last segment of the intercepting route if (interceptingRoute === '/') { throw Object.defineProperty(new Error("Invalid interception route: " + path + ". Cannot use (..) marker at the root level, use (.) instead."), "__NEXT_ERROR_CODE", { value: "E207", enumerable: false, configurable: true }); } interceptedRoute = interceptingRoute.split('/').slice(0, -1).concat(interceptedRoute).join('/'); break; case '(...)': // (...) will match the route segment in the root directory, so we need to use the root directory to prepend the intercepted route interceptedRoute = '/' + interceptedRoute; break; case '(..)(..)': // (..)(..) indicates that we should match at two levels up, so we need to remove the last two segments of the intercepting route const splitInterceptingRoute = interceptingRoute.split('/'); if (splitInterceptingRoute.length <= 2) { throw Object.defineProperty(new Error("Invalid interception route: " + path + ". Cannot use (..)(..) marker at the root level or one level up."), "__NEXT_ERROR_CODE", { value: "E486", enumerable: false, configurable: true }); } interceptedRoute = splitInterceptingRoute.slice(0, -2).concat(interceptedRoute).join('/'); break; default: throw Object.defineProperty(new Error('Invariant: unexpected marker'), "__NEXT_ERROR_CODE", { value: "E112", enumerable: false, configurable: true }); } return { interceptingRoute, interceptedRoute }; } //# sourceMappingURL=interception-routes.js.map