301 lines
9.2 KiB
JavaScript
301 lines
9.2 KiB
JavaScript
/*
|
|
* Extracted from browser-delivered Turbopack chunk: f40debd565774e77.35e561bbfd.js
|
|
* Module id: 494309
|
|
* 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, "default", {
|
|
enumerable: !0,
|
|
get: function () {
|
|
return w;
|
|
},
|
|
});
|
|
let n = e.r(481258),
|
|
a = e.r(744066),
|
|
o = e.r(462214),
|
|
i = a._(e.r(358379)),
|
|
s = n._(e.r(111558)),
|
|
c = e.r(195436),
|
|
u = e.r(203356),
|
|
l = e.r(838358),
|
|
d = e.r(414531),
|
|
f = e.r(225185),
|
|
p = e.r(413366),
|
|
h = e.r(910390),
|
|
m = e.r(258740),
|
|
g = e.r(414322);
|
|
e.r(157682);
|
|
let y = e.r(998941),
|
|
b = e.r(600602),
|
|
P = e.r(414964),
|
|
_ =
|
|
s.default.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
|
S = ["bottom", "height", "left", "right", "top", "width", "x", "y"];
|
|
function v(e, t) {
|
|
let r = e.getBoundingClientRect();
|
|
return r.top >= 0 && r.top <= t;
|
|
}
|
|
class O extends i.default.Component {
|
|
componentDidMount() {
|
|
this.handlePotentialScroll();
|
|
}
|
|
componentDidUpdate() {
|
|
this.props.focusAndScrollRef.apply && this.handlePotentialScroll();
|
|
}
|
|
render() {
|
|
return this.props.children;
|
|
}
|
|
constructor(...e) {
|
|
super(...e),
|
|
(this.handlePotentialScroll = () => {
|
|
let { focusAndScrollRef: e, segmentPath: t } = this.props;
|
|
if (e.apply) {
|
|
if (
|
|
0 !== e.segmentPaths.length &&
|
|
!e.segmentPaths.some((e) =>
|
|
t.every((t, r) => (0, d.matchSegment)(t, e[r])),
|
|
)
|
|
)
|
|
return;
|
|
let r = null,
|
|
n = e.hashFragment;
|
|
if (
|
|
(n &&
|
|
(r =
|
|
"top" === n
|
|
? document.body
|
|
: (document.getElementById(n) ??
|
|
document.getElementsByName(n)[0])),
|
|
r ||
|
|
(r = "u" < typeof window ? null : (0, _.findDOMNode)(this)),
|
|
!(r instanceof Element))
|
|
)
|
|
return;
|
|
for (
|
|
;
|
|
!(r instanceof HTMLElement) ||
|
|
(function (e) {
|
|
if (
|
|
["sticky", "fixed"].includes(getComputedStyle(e).position)
|
|
)
|
|
return !0;
|
|
let t = e.getBoundingClientRect();
|
|
return S.every((e) => 0 === t[e]);
|
|
})(r);
|
|
|
|
) {
|
|
if (null === r.nextElementSibling) return;
|
|
r = r.nextElementSibling;
|
|
}
|
|
(e.apply = !1),
|
|
(e.hashFragment = null),
|
|
(e.segmentPaths = []),
|
|
(0, f.disableSmoothScrollDuringRouteTransition)(
|
|
() => {
|
|
if (n) return void r.scrollIntoView();
|
|
let e = document.documentElement,
|
|
t = e.clientHeight;
|
|
!v(r, t) &&
|
|
((e.scrollTop = 0), v(r, t) || r.scrollIntoView());
|
|
},
|
|
{ dontForceLayout: !0, onlyHashChange: e.onlyHashChange },
|
|
),
|
|
(e.onlyHashChange = !1),
|
|
r.focus();
|
|
}
|
|
});
|
|
}
|
|
}
|
|
function E({ segmentPath: e, children: t }) {
|
|
let r = (0, i.useContext)(c.GlobalLayoutRouterContext);
|
|
if (!r)
|
|
throw Object.defineProperty(
|
|
Error("invariant global layout router not mounted"),
|
|
"__NEXT_ERROR_CODE",
|
|
{ value: "E473", enumerable: !1, configurable: !0 },
|
|
);
|
|
return (0, o.jsx)(O, {
|
|
segmentPath: e,
|
|
focusAndScrollRef: r.focusAndScrollRef,
|
|
children: t,
|
|
});
|
|
}
|
|
function R({
|
|
tree: e,
|
|
segmentPath: t,
|
|
debugNameContext: r,
|
|
cacheNode: n,
|
|
params: a,
|
|
url: s,
|
|
isActive: l,
|
|
}) {
|
|
let d,
|
|
f = (0, i.useContext)(c.GlobalLayoutRouterContext);
|
|
if (((0, i.useContext)(y.NavigationPromisesContext), !f))
|
|
throw Object.defineProperty(
|
|
Error("invariant global layout router not mounted"),
|
|
"__NEXT_ERROR_CODE",
|
|
{ value: "E473", enumerable: !1, configurable: !0 },
|
|
);
|
|
let p = null !== n ? n : (0, i.use)(u.unresolvedThenable),
|
|
h = null !== p.prefetchRsc ? p.prefetchRsc : p.rsc,
|
|
m = (0, i.useDeferredValue)(p.rsc, h);
|
|
if ((0, P.isDeferredRsc)(m)) {
|
|
let e = (0, i.use)(m);
|
|
null === e && (0, i.use)(u.unresolvedThenable), (d = e);
|
|
} else null === m && (0, i.use)(u.unresolvedThenable), (d = m);
|
|
let g = d;
|
|
return (0, o.jsx)(c.LayoutRouterContext.Provider, {
|
|
value: {
|
|
parentTree: e,
|
|
parentCacheNode: p,
|
|
parentSegmentPath: t,
|
|
parentParams: a,
|
|
debugNameContext: r,
|
|
url: s,
|
|
isActive: l,
|
|
},
|
|
children: g,
|
|
});
|
|
}
|
|
function j({ name: e, loading: t, children: r }) {
|
|
let n;
|
|
if (
|
|
(n =
|
|
"object" == typeof t && null !== t && "function" == typeof t.then
|
|
? (0, i.use)(t)
|
|
: t)
|
|
) {
|
|
let t = n[0],
|
|
a = n[1],
|
|
s = n[2];
|
|
return (0, o.jsx)(i.Suspense, {
|
|
name: e,
|
|
fallback: (0, o.jsxs)(o.Fragment, { children: [a, s, t] }),
|
|
children: r,
|
|
});
|
|
}
|
|
return (0, o.jsx)(o.Fragment, { children: r });
|
|
}
|
|
function w({
|
|
parallelRouterKey: e,
|
|
error: t,
|
|
errorStyles: r,
|
|
errorScripts: n,
|
|
templateStyles: a,
|
|
templateScripts: s,
|
|
template: d,
|
|
notFound: f,
|
|
forbidden: y,
|
|
unauthorized: P,
|
|
segmentViewBoundaries: _,
|
|
}) {
|
|
let S = (0, i.useContext)(c.LayoutRouterContext);
|
|
if (!S)
|
|
throw Object.defineProperty(
|
|
Error("invariant expected layout router to be mounted"),
|
|
"__NEXT_ERROR_CODE",
|
|
{ value: "E56", enumerable: !1, configurable: !0 },
|
|
);
|
|
let {
|
|
parentTree: v,
|
|
parentCacheNode: O,
|
|
parentSegmentPath: w,
|
|
parentParams: C,
|
|
url: T,
|
|
isActive: x,
|
|
debugNameContext: A,
|
|
} = S,
|
|
M = O.parallelRoutes,
|
|
D = M.get(e);
|
|
D || ((D = new Map()), M.set(e, D));
|
|
let F = v[0],
|
|
I = null === w ? [e] : w.concat([F, e]),
|
|
k = v[1][e];
|
|
void 0 === k && (0, i.use)(u.unresolvedThenable);
|
|
let N = k[0],
|
|
U = (0, m.createRouterCacheKey)(N, !0),
|
|
L = (0, g.useRouterBFCache)(k, U),
|
|
X = [];
|
|
do {
|
|
let e = L.tree,
|
|
i = L.stateKey,
|
|
u = e[0],
|
|
g = (0, m.createRouterCacheKey)(u),
|
|
_ = D.get(g) ?? null,
|
|
S = C;
|
|
if (Array.isArray(u)) {
|
|
let e = u[0],
|
|
t = u[1],
|
|
r = u[2],
|
|
n = (0, b.getParamValueFromCacheKey)(t, r);
|
|
null !== n && (S = { ...C, [e]: n });
|
|
}
|
|
let v = (function (e) {
|
|
if ("/" === e) return "/";
|
|
if ("string" == typeof e)
|
|
if ("(slot)" === e) return;
|
|
else return e + "/";
|
|
return e[1] + "/";
|
|
})(u),
|
|
w = v ?? A,
|
|
M = void 0 === v ? void 0 : A,
|
|
F = O.loading,
|
|
k = (0, o.jsxs)(
|
|
c.TemplateContext.Provider,
|
|
{
|
|
value: (0, o.jsxs)(E, {
|
|
segmentPath: I,
|
|
children: [
|
|
(0, o.jsx)(l.ErrorBoundary, {
|
|
errorComponent: t,
|
|
errorStyles: r,
|
|
errorScripts: n,
|
|
children: (0, o.jsx)(j, {
|
|
name: M,
|
|
loading: F,
|
|
children: (0, o.jsx)(h.HTTPAccessFallbackBoundary, {
|
|
notFound: f,
|
|
forbidden: y,
|
|
unauthorized: P,
|
|
children: (0, o.jsxs)(p.RedirectBoundary, {
|
|
children: [
|
|
(0, o.jsx)(R, {
|
|
url: T,
|
|
tree: e,
|
|
params: S,
|
|
cacheNode: _,
|
|
segmentPath: I,
|
|
debugNameContext: w,
|
|
isActive: x && i === U,
|
|
}),
|
|
null,
|
|
],
|
|
}),
|
|
}),
|
|
}),
|
|
}),
|
|
null,
|
|
],
|
|
}),
|
|
children: [a, s, d],
|
|
},
|
|
i,
|
|
);
|
|
X.push(k), (L = L.next);
|
|
} while (null !== L);
|
|
return X;
|
|
}
|
|
("function" == typeof r.default ||
|
|
("object" == typeof r.default && null !== r.default)) &&
|
|
void 0 === r.default.__esModule &&
|
|
(Object.defineProperty(r.default, "__esModule", { value: !0 }),
|
|
Object.assign(r.default, r),
|
|
(t.exports = r.default));
|
|
};
|
|
|
|
export default moduleFactory;
|