Your Name 1912bcd25b
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
chore: sync all remaining local workspace changes
2026-05-08 11:26:57 +08:00

189 lines
6.3 KiB
JavaScript

/*
* Extracted from browser-delivered Turbopack chunk: c412b79b8f787345.3b8bfd201f.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 a = {
default: function () {
return x;
},
useLinkStatus: function () {
return v;
},
};
for (var n in a) Object.defineProperty(r, n, { enumerable: !0, get: a[n] });
let s = e.r(744066),
l = e.r(462214),
i = s._(e.r(358379)),
o = e.r(390063),
u = e.r(195436),
d = e.r(468766),
c = e.r(911861),
f = e.r(175744);
e.r(467858);
let p = e.r(394096),
m = e.r(401636),
h = e.r(393354);
function g(e) {
return "string" == typeof e ? e : (0, o.formatUrl)(e);
}
function x(t) {
var r;
let a,
n,
s,
[o, x] = (0, i.useOptimistic)(p.IDLE_LINK_STATUS),
v = (0, i.useRef)(null),
{
href: w,
as: y,
children: j,
prefetch: N = null,
passHref: k,
replace: P,
shallow: S,
scroll: C,
onClick: O,
onMouseEnter: _,
onTouchStart: E,
legacyBehavior: R = !1,
onNavigate: D,
ref: M,
unstable_dynamicOnHover: T,
...A
} = t;
(a = j),
R &&
("string" == typeof a || "number" == typeof a) &&
(a = (0, l.jsx)("a", { children: a }));
let I = i.default.useContext(u.AppRouterContext),
$ = !1 !== N,
B =
!1 !== N
? null === (r = N) || "auto" === r
? h.FetchStrategy.PPR
: h.FetchStrategy.Full
: h.FetchStrategy.PPR,
{ href: L, as: U } = i.default.useMemo(() => {
let e = g(w);
return { href: e, as: y ? g(y) : e };
}, [w, y]);
if (R) {
if (a?.$$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 },
);
n = i.default.Children.only(a);
}
let z = R ? n && "object" == typeof n && n.ref : M,
F = i.default.useCallback(
(e) => (
null !== I &&
(v.current = (0, p.mountLinkInstance)(e, L, I, B, $, x)),
() => {
v.current &&
((0, p.unmountLinkForCurrentNavigation)(v.current),
(v.current = null)),
(0, p.unmountPrefetchableInstance)(e);
}
),
[$, L, I, B, x],
),
K = {
ref: (0, d.useMergedRef)(F, z),
onClick(t) {
R || "function" != typeof O || O(t),
R &&
n.props &&
"function" == typeof n.props.onClick &&
n.props.onClick(t),
!I ||
t.defaultPrevented ||
(function (t, r, a, n, s, l, o) {
if ("u" > typeof window) {
let u,
{ nodeName: d } = t.currentTarget;
if (
("A" === d.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, m.isLocalURL)(r)) {
s && (t.preventDefault(), location.replace(r));
return;
}
if ((t.preventDefault(), o)) {
let e = !1;
if (
(o({
preventDefault: () => {
e = !0;
},
}),
e)
)
return;
}
let { dispatchNavigateAction: c } = e.r(284993);
i.default.startTransition(() => {
c(a || r, s ? "replace" : "push", l ?? !0, n.current);
});
}
})(t, L, U, v, P, C, D);
},
onMouseEnter(e) {
R || "function" != typeof _ || _(e),
R &&
n.props &&
"function" == typeof n.props.onMouseEnter &&
n.props.onMouseEnter(e),
I && $ && (0, p.onNavigationIntent)(e.currentTarget, !0 === T);
},
onTouchStart: function (e) {
R || "function" != typeof E || E(e),
R &&
n.props &&
"function" == typeof n.props.onTouchStart &&
n.props.onTouchStart(e),
I && $ && (0, p.onNavigationIntent)(e.currentTarget, !0 === T);
},
};
return (
(0, c.isAbsoluteUrl)(U)
? (K.href = U)
: (R && !k && ("a" !== n.type || "href" in n.props)) ||
(K.href = (0, f.addBasePath)(U)),
(s = R
? i.default.cloneElement(n, K)
: (0, l.jsx)("a", { ...A, ...K, children: a })),
(0, l.jsx)(b.Provider, { value: o, children: s })
);
}
e.r(404287);
let b = (0, i.createContext)(p.IDLE_LINK_STATUS),
v = () => (0, i.useContext)(b);
("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;