189 lines
6.3 KiB
JavaScript
189 lines
6.3 KiB
JavaScript
/*
|
|
* Extracted from browser-delivered Turbopack chunk: a3e5634aaf3cd51c.d183579820.js
|
|
* Module id: 688907
|
|
* 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 });
|
|
var n = {
|
|
default: function () {
|
|
return y;
|
|
},
|
|
useLinkStatus: function () {
|
|
return v;
|
|
},
|
|
};
|
|
for (var o in n) Object.defineProperty(r, o, { enumerable: !0, get: n[o] });
|
|
let i = e.r(744066),
|
|
a = e.r(462214),
|
|
l = i._(e.r(358379)),
|
|
s = e.r(390063),
|
|
u = e.r(195436),
|
|
c = e.r(468766),
|
|
f = e.r(911861),
|
|
h = e.r(175744);
|
|
e.r(467858);
|
|
let d = e.r(394096),
|
|
p = e.r(401636),
|
|
m = e.r(393354);
|
|
function g(e) {
|
|
return "string" == typeof e ? e : (0, s.formatUrl)(e);
|
|
}
|
|
function y(t) {
|
|
var r;
|
|
let n,
|
|
o,
|
|
i,
|
|
[s, y] = (0, l.useOptimistic)(d.IDLE_LINK_STATUS),
|
|
v = (0, l.useRef)(null),
|
|
{
|
|
href: C,
|
|
as: P,
|
|
children: M,
|
|
prefetch: b = null,
|
|
passHref: w,
|
|
replace: R,
|
|
shallow: _,
|
|
scroll: A,
|
|
onClick: N,
|
|
onMouseEnter: O,
|
|
onTouchStart: S,
|
|
legacyBehavior: I = !1,
|
|
onNavigate: T,
|
|
ref: x,
|
|
unstable_dynamicOnHover: L,
|
|
...B
|
|
} = t;
|
|
(n = M),
|
|
I &&
|
|
("string" == typeof n || "number" == typeof n) &&
|
|
(n = (0, a.jsx)("a", { children: n }));
|
|
let F = l.default.useContext(u.AppRouterContext),
|
|
j = !1 !== b,
|
|
k =
|
|
!1 !== b
|
|
? null === (r = b) || "auto" === r
|
|
? m.FetchStrategy.PPR
|
|
: m.FetchStrategy.Full
|
|
: m.FetchStrategy.PPR,
|
|
{ href: z, as: U } = l.default.useMemo(() => {
|
|
let e = g(C);
|
|
return { href: e, as: P ? g(P) : e };
|
|
}, [C, P]);
|
|
if (I) {
|
|
if (n?.$$typeof === Symbol.for("react.lazy"))
|
|
throw Object.defineProperty(
|
|
Error(
|
|
"`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag.",
|
|
),
|
|
"__NEXT_ERROR_CODE",
|
|
{ value: "E863", enumerable: !1, configurable: !0 },
|
|
);
|
|
o = l.default.Children.only(n);
|
|
}
|
|
let D = I ? o && "object" == typeof o && o.ref : x,
|
|
$ = l.default.useCallback(
|
|
(e) => (
|
|
null !== F &&
|
|
(v.current = (0, d.mountLinkInstance)(e, z, F, k, j, y)),
|
|
() => {
|
|
v.current &&
|
|
((0, d.unmountLinkForCurrentNavigation)(v.current),
|
|
(v.current = null)),
|
|
(0, d.unmountPrefetchableInstance)(e);
|
|
}
|
|
),
|
|
[j, z, F, k, y],
|
|
),
|
|
H = {
|
|
ref: (0, c.useMergedRef)($, D),
|
|
onClick(t) {
|
|
I || "function" != typeof N || N(t),
|
|
I &&
|
|
o.props &&
|
|
"function" == typeof o.props.onClick &&
|
|
o.props.onClick(t),
|
|
!F ||
|
|
t.defaultPrevented ||
|
|
(function (t, r, n, o, i, a, s) {
|
|
if ("u" > typeof window) {
|
|
let u,
|
|
{ nodeName: c } = t.currentTarget;
|
|
if (
|
|
("A" === c.toUpperCase() &&
|
|
(((u = t.currentTarget.getAttribute("target")) &&
|
|
"_self" !== u) ||
|
|
t.metaKey ||
|
|
t.ctrlKey ||
|
|
t.shiftKey ||
|
|
t.altKey ||
|
|
(t.nativeEvent && 2 === t.nativeEvent.which))) ||
|
|
t.currentTarget.hasAttribute("download")
|
|
)
|
|
return;
|
|
if (!(0, p.isLocalURL)(r)) {
|
|
i && (t.preventDefault(), location.replace(r));
|
|
return;
|
|
}
|
|
if ((t.preventDefault(), s)) {
|
|
let e = !1;
|
|
if (
|
|
(s({
|
|
preventDefault: () => {
|
|
e = !0;
|
|
},
|
|
}),
|
|
e)
|
|
)
|
|
return;
|
|
}
|
|
let { dispatchNavigateAction: f } = e.r(284993);
|
|
l.default.startTransition(() => {
|
|
f(n || r, i ? "replace" : "push", a ?? !0, o.current);
|
|
});
|
|
}
|
|
})(t, z, U, v, R, A, T);
|
|
},
|
|
onMouseEnter(e) {
|
|
I || "function" != typeof O || O(e),
|
|
I &&
|
|
o.props &&
|
|
"function" == typeof o.props.onMouseEnter &&
|
|
o.props.onMouseEnter(e),
|
|
F && j && (0, d.onNavigationIntent)(e.currentTarget, !0 === L);
|
|
},
|
|
onTouchStart: function (e) {
|
|
I || "function" != typeof S || S(e),
|
|
I &&
|
|
o.props &&
|
|
"function" == typeof o.props.onTouchStart &&
|
|
o.props.onTouchStart(e),
|
|
F && j && (0, d.onNavigationIntent)(e.currentTarget, !0 === L);
|
|
},
|
|
};
|
|
return (
|
|
(0, f.isAbsoluteUrl)(U)
|
|
? (H.href = U)
|
|
: (I && !w && ("a" !== o.type || "href" in o.props)) ||
|
|
(H.href = (0, h.addBasePath)(U)),
|
|
(i = I
|
|
? l.default.cloneElement(o, H)
|
|
: (0, a.jsx)("a", { ...B, ...H, children: n })),
|
|
(0, a.jsx)(E.Provider, { value: s, children: i })
|
|
);
|
|
}
|
|
e.r(404287);
|
|
let E = (0, l.createContext)(d.IDLE_LINK_STATUS),
|
|
v = () => (0, l.useContext)(E);
|
|
("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;
|