77 lines
2.6 KiB
JavaScript
77 lines
2.6 KiB
JavaScript
/*
|
|
* Extracted from browser-delivered Turbopack chunk: 5d5b47876e53e564.da1ba52a93.js
|
|
* Module id: 539533
|
|
* For reading/searching only; this factory depends on the original Turbopack runtime.
|
|
*/
|
|
|
|
const moduleFactory = (e, t, r) => {
|
|
"use strict";
|
|
Object.defineProperty(r, "__esModule", { value: !0 }),
|
|
Object.defineProperty(r, "resolveParamValue", {
|
|
enumerable: !0,
|
|
get: function () {
|
|
return a;
|
|
},
|
|
});
|
|
let n = e.r(498775),
|
|
o = e.r(810276);
|
|
function a(e, t, r, a, i) {
|
|
switch (t) {
|
|
case "catchall":
|
|
case "optional-catchall":
|
|
case "catchall-intercepted-(..)(..)":
|
|
case "catchall-intercepted-(.)":
|
|
case "catchall-intercepted-(..)":
|
|
case "catchall-intercepted-(...)":
|
|
let l = [];
|
|
for (let e = r; e < a.segments.length; e++) {
|
|
let n = a.segments[e];
|
|
if ("static" === n.type) {
|
|
let a = n.name,
|
|
i = (0, o.interceptionPrefixFromParamType)(t);
|
|
i &&
|
|
e === r &&
|
|
i === n.interceptionMarker &&
|
|
(a = a.replace(n.interceptionMarker, "")),
|
|
l.push(a);
|
|
} else {
|
|
if (!i.hasOwnProperty(n.param.paramName)) {
|
|
if ("optional-catchall" === n.param.paramType) break;
|
|
return;
|
|
}
|
|
let e = i[n.param.paramName];
|
|
Array.isArray(e) ? l.push(...e) : l.push(e);
|
|
}
|
|
}
|
|
if (l.length > 0) return l;
|
|
if ("optional-catchall" === t) return;
|
|
throw Object.defineProperty(
|
|
new n.InvariantError(
|
|
`Unexpected empty path segments match for a route "${a.pathname}" with param "${e}" of type "${t}"`,
|
|
),
|
|
"__NEXT_ERROR_CODE",
|
|
{ value: "E931", enumerable: !1, configurable: !0 },
|
|
);
|
|
case "dynamic":
|
|
case "dynamic-intercepted-(..)(..)":
|
|
case "dynamic-intercepted-(.)":
|
|
case "dynamic-intercepted-(..)":
|
|
case "dynamic-intercepted-(...)":
|
|
if (r < a.segments.length) {
|
|
let e = a.segments[r];
|
|
if ("dynamic" === e.type && !i.hasOwnProperty(e.param.paramName))
|
|
return;
|
|
return "dynamic" === e.type
|
|
? i[e.param.paramName]
|
|
: (0, o.interceptionPrefixFromParamType)(t) ===
|
|
e.interceptionMarker
|
|
? e.name.replace(e.interceptionMarker, "")
|
|
: e.name;
|
|
}
|
|
return;
|
|
}
|
|
}
|
|
};
|
|
|
|
export default moduleFactory;
|