1673 lines
65 KiB
JavaScript
1673 lines
65 KiB
JavaScript
/*
|
|
* Extracted from browser-delivered Turbopack chunk: 6bda54b11da9026f.d09ee8321c.js
|
|
* Module id: 223703
|
|
* For reading/searching only; this factory depends on the original Turbopack runtime.
|
|
*/
|
|
|
|
const moduleFactory = (e) => {
|
|
"use strict";
|
|
var t,
|
|
a,
|
|
l,
|
|
r,
|
|
s,
|
|
i,
|
|
n = e.i(462214),
|
|
o = e.i(358379),
|
|
c = e.i(192830),
|
|
p = e.i(909243),
|
|
d = e.i(938202),
|
|
h = e.i(7284),
|
|
u = e.i(479324),
|
|
f = e.i(450943),
|
|
x = e.i(124859),
|
|
m = e.i(593307);
|
|
let [b, g] = (0, e.i(559394).createSafeContext)(
|
|
"AppShell was not found in tree",
|
|
);
|
|
var v = {
|
|
root: "m_89ab340",
|
|
navbar: "m_45252eee",
|
|
aside: "m_9cdde9a",
|
|
header: "m_3b16f56b",
|
|
main: "m_8983817",
|
|
footer: "m_3840c879",
|
|
section: "m_6dcfc7c7",
|
|
},
|
|
w = e.i(948833);
|
|
let y = (0, m.factory)((e, t) => {
|
|
let {
|
|
classNames: a,
|
|
className: l,
|
|
style: r,
|
|
styles: s,
|
|
unstyled: i,
|
|
vars: o,
|
|
withBorder: c,
|
|
zIndex: p,
|
|
mod: d,
|
|
...f
|
|
} = (0, u.useProps)("AppShellAside", null, e),
|
|
m = g();
|
|
return m.disabled
|
|
? null
|
|
: (0, n.jsx)(x.Box, {
|
|
component: "aside",
|
|
ref: t,
|
|
mod: [{ "with-border": c ?? m.withBorder }, d],
|
|
...m.getStyles("aside", {
|
|
className: (0, h.default)(
|
|
{ [w.RemoveScroll.classNames.zeroRight]: m.offsetScrollbars },
|
|
l,
|
|
),
|
|
classNames: a,
|
|
styles: s,
|
|
style: r,
|
|
}),
|
|
...f,
|
|
__vars: {
|
|
"--app-shell-aside-z-index": `calc(${p ?? m.zIndex} + 1)`,
|
|
},
|
|
});
|
|
});
|
|
(y.classes = v), (y.displayName = "@mantine/core/AppShellAside");
|
|
let k = (0, m.factory)((e, t) => {
|
|
let {
|
|
classNames: a,
|
|
className: l,
|
|
style: r,
|
|
styles: s,
|
|
unstyled: i,
|
|
vars: o,
|
|
withBorder: c,
|
|
zIndex: p,
|
|
mod: d,
|
|
...f
|
|
} = (0, u.useProps)("AppShellFooter", null, e),
|
|
m = g();
|
|
return m.disabled
|
|
? null
|
|
: (0, n.jsx)(x.Box, {
|
|
component: "footer",
|
|
ref: t,
|
|
mod: [{ "with-border": c ?? m.withBorder }, d],
|
|
...m.getStyles("footer", {
|
|
className: (0, h.default)(
|
|
{ [w.RemoveScroll.classNames.zeroRight]: m.offsetScrollbars },
|
|
l,
|
|
),
|
|
classNames: a,
|
|
styles: s,
|
|
style: r,
|
|
}),
|
|
...f,
|
|
__vars: {
|
|
"--app-shell-footer-z-index": (p ?? m.zIndex)?.toString(),
|
|
},
|
|
});
|
|
});
|
|
(k.classes = v), (k.displayName = "@mantine/core/AppShellFooter");
|
|
let j = (0, m.factory)((e, t) => {
|
|
let {
|
|
classNames: a,
|
|
className: l,
|
|
style: r,
|
|
styles: s,
|
|
unstyled: i,
|
|
vars: o,
|
|
withBorder: c,
|
|
zIndex: p,
|
|
mod: d,
|
|
...f
|
|
} = (0, u.useProps)("AppShellHeader", null, e),
|
|
m = g();
|
|
return m.disabled
|
|
? null
|
|
: (0, n.jsx)(x.Box, {
|
|
component: "header",
|
|
ref: t,
|
|
mod: [{ "with-border": c ?? m.withBorder }, d],
|
|
...m.getStyles("header", {
|
|
className: (0, h.default)(
|
|
{ [w.RemoveScroll.classNames.zeroRight]: m.offsetScrollbars },
|
|
l,
|
|
),
|
|
classNames: a,
|
|
styles: s,
|
|
style: r,
|
|
}),
|
|
...f,
|
|
__vars: {
|
|
"--app-shell-header-z-index": (p ?? m.zIndex)?.toString(),
|
|
},
|
|
});
|
|
});
|
|
(j.classes = v), (j.displayName = "@mantine/core/AppShellHeader");
|
|
let N = (0, m.factory)((e, t) => {
|
|
let {
|
|
classNames: a,
|
|
className: l,
|
|
style: r,
|
|
styles: s,
|
|
vars: i,
|
|
...o
|
|
} = (0, u.useProps)("AppShellMain", null, e),
|
|
c = g();
|
|
return (0, n.jsx)(x.Box, {
|
|
component: "main",
|
|
ref: t,
|
|
...c.getStyles("main", {
|
|
className: l,
|
|
style: r,
|
|
classNames: a,
|
|
styles: s,
|
|
}),
|
|
...o,
|
|
});
|
|
});
|
|
(N.classes = v), (N.displayName = "@mantine/core/AppShellMain");
|
|
var S = e.i(978459),
|
|
C = e.i(830744),
|
|
A = e.i(288974),
|
|
I = e.i(889403),
|
|
B = e.i(389435),
|
|
H = e.i(362727);
|
|
function T(e, t) {
|
|
return e in t ? (0, H.px)(t[e]) : (0, H.px)(e);
|
|
}
|
|
function _(e, t) {
|
|
let a = e.map((e) => ({ value: e, px: T(e, t) }));
|
|
return a.sort((e, t) => e.px - t.px), a;
|
|
}
|
|
function E(e) {
|
|
return "object" == typeof e ? e.base : e;
|
|
}
|
|
function F(e) {
|
|
let t =
|
|
"object" == typeof e &&
|
|
null !== e &&
|
|
void 0 !== e.base &&
|
|
1 === Object.keys(e).length;
|
|
return "number" == typeof e || "string" == typeof e || t;
|
|
}
|
|
function M(e) {
|
|
return (
|
|
"object" == typeof e &&
|
|
null !== e &&
|
|
(1 !== Object.keys(e).length || !("base" in e))
|
|
);
|
|
}
|
|
var z = e.i(855698);
|
|
function D(e) {
|
|
return 0 === Number(e) ? "0px" : (0, z.getSpacing)(e);
|
|
}
|
|
function L({
|
|
navbar: e,
|
|
header: t,
|
|
aside: a,
|
|
footer: l,
|
|
padding: r,
|
|
mode: s,
|
|
selector: i,
|
|
}) {
|
|
let o = (0, C.useMantineTheme)(),
|
|
c = (0, S.useMantineContext)(),
|
|
{ media: p, baseStyles: d } = (function ({
|
|
navbar: e,
|
|
header: t,
|
|
footer: a,
|
|
aside: l,
|
|
padding: r,
|
|
theme: s,
|
|
mode: i,
|
|
}) {
|
|
let n = {},
|
|
o = {},
|
|
c = {};
|
|
return (
|
|
"static" === i &&
|
|
((c["--app-shell-main-grid-column"] = "1 / -1"),
|
|
(c["--app-shell-main-grid-row"] = "2")),
|
|
(function ({
|
|
baseStyles: e,
|
|
minMediaStyles: t,
|
|
maxMediaStyles: a,
|
|
navbar: l,
|
|
theme: r,
|
|
mode: s,
|
|
}) {
|
|
let i = l?.width,
|
|
n = "translateX(calc(var(--app-shell-navbar-width) * -1))",
|
|
o = "translateX(var(--app-shell-navbar-width))";
|
|
if (
|
|
(l?.breakpoint &&
|
|
!l?.collapsed?.mobile &&
|
|
((a[l?.breakpoint] = a[l?.breakpoint] || {}),
|
|
(a[l?.breakpoint]["--app-shell-navbar-offset"] = "0px"),
|
|
(a[l?.breakpoint]["--app-shell-navbar-width"] = "100%"),
|
|
"static" === s &&
|
|
(a[l?.breakpoint]["--app-shell-navbar-grid-width"] =
|
|
"0px")),
|
|
F(i))
|
|
) {
|
|
let t = (0, B.rem)(E(i));
|
|
(e["--app-shell-navbar-width"] = t),
|
|
(e["--app-shell-navbar-offset"] = t),
|
|
"static" === s && (e["--app-shell-navbar-grid-width"] = t);
|
|
}
|
|
if (
|
|
(M(i) &&
|
|
(void 0 !== i.base &&
|
|
((e["--app-shell-navbar-width"] = (0, B.rem)(i.base)),
|
|
(e["--app-shell-navbar-offset"] = (0, B.rem)(i.base)),
|
|
"static" === s &&
|
|
(e["--app-shell-navbar-grid-width"] = (0, B.rem)(
|
|
i.base,
|
|
))),
|
|
(0, I.keys)(i).forEach((e) => {
|
|
"base" !== e &&
|
|
((t[e] = t[e] || {}),
|
|
(t[e]["--app-shell-navbar-width"] = (0, B.rem)(i[e])),
|
|
(t[e]["--app-shell-navbar-offset"] = (0, B.rem)(i[e])),
|
|
"static" === s &&
|
|
(t[e]["--app-shell-navbar-grid-width"] = (0, B.rem)(
|
|
i[e],
|
|
)));
|
|
})),
|
|
l?.breakpoint &&
|
|
"static" === s &&
|
|
((t[l.breakpoint] = t[l.breakpoint] || {}),
|
|
(t[l.breakpoint]["--app-shell-navbar-position"] = "sticky"),
|
|
(t[l.breakpoint]["--app-shell-navbar-grid-row"] = "2"),
|
|
(t[l.breakpoint]["--app-shell-navbar-grid-column"] = "1"),
|
|
(t[l.breakpoint]["--app-shell-main-column-start"] = "2")),
|
|
l?.collapsed?.desktop)
|
|
) {
|
|
let e = l.breakpoint;
|
|
(t[e] = t[e] || {}),
|
|
(t[e]["--app-shell-navbar-transform"] = n),
|
|
(t[e]["--app-shell-navbar-transform-rtl"] = o),
|
|
"fixed" === s
|
|
? (t[e]["--app-shell-navbar-offset"] = "0px !important")
|
|
: ((t[e]["--app-shell-navbar-width"] = "0px"),
|
|
(t[e]["--app-shell-navbar-display"] = "none"),
|
|
(t[e]["--app-shell-main-column-start"] = "1"));
|
|
}
|
|
if (l?.collapsed?.mobile) {
|
|
let e = T(l.breakpoint, r.breakpoints) - 0.1;
|
|
(a[e] = a[e] || {}),
|
|
(a[e]["--app-shell-navbar-width"] = "100%"),
|
|
(a[e]["--app-shell-navbar-offset"] = "0px"),
|
|
"static" === s &&
|
|
(a[e]["--app-shell-navbar-grid-width"] = "0px"),
|
|
(a[e]["--app-shell-navbar-transform"] = n),
|
|
(a[e]["--app-shell-navbar-transform-rtl"] = o);
|
|
}
|
|
})({
|
|
baseStyles: c,
|
|
minMediaStyles: n,
|
|
maxMediaStyles: o,
|
|
navbar: e,
|
|
theme: s,
|
|
mode: i,
|
|
}),
|
|
(function ({
|
|
baseStyles: e,
|
|
minMediaStyles: t,
|
|
maxMediaStyles: a,
|
|
aside: l,
|
|
theme: r,
|
|
mode: s,
|
|
}) {
|
|
let i = l?.width,
|
|
n = "translateX(var(--app-shell-aside-width))",
|
|
o = "translateX(calc(var(--app-shell-aside-width) * -1))";
|
|
if (
|
|
(l?.breakpoint &&
|
|
!l?.collapsed?.mobile &&
|
|
((a[l?.breakpoint] = a[l?.breakpoint] || {}),
|
|
"fixed" === s
|
|
? (a[l?.breakpoint]["--app-shell-aside-width"] = "100%")
|
|
: (a[l?.breakpoint]["--app-shell-aside-width"] = "0px"),
|
|
(a[l?.breakpoint]["--app-shell-aside-offset"] = "0px")),
|
|
F(i))
|
|
) {
|
|
let t = (0, B.rem)(E(i));
|
|
(e["--app-shell-aside-width"] = t),
|
|
(e["--app-shell-aside-offset"] = t);
|
|
}
|
|
if (
|
|
(M(i) &&
|
|
(void 0 !== i.base &&
|
|
((e["--app-shell-aside-width"] = (0, B.rem)(i.base)),
|
|
(e["--app-shell-aside-offset"] = (0, B.rem)(i.base))),
|
|
(0, I.keys)(i).forEach((e) => {
|
|
"base" !== e &&
|
|
((t[e] = t[e] || {}),
|
|
(t[e]["--app-shell-aside-width"] = (0, B.rem)(i[e])),
|
|
(t[e]["--app-shell-aside-offset"] = (0, B.rem)(i[e])));
|
|
})),
|
|
l?.breakpoint &&
|
|
"static" === s &&
|
|
((t[l.breakpoint] = t[l.breakpoint] || {}),
|
|
(t[l.breakpoint]["--app-shell-aside-position"] = "sticky"),
|
|
(t[l.breakpoint]["--app-shell-aside-grid-row"] = "2"),
|
|
(t[l.breakpoint]["--app-shell-aside-grid-column"] = "3"),
|
|
(t[l.breakpoint]["--app-shell-main-column-end"] = "3")),
|
|
l?.collapsed?.desktop)
|
|
) {
|
|
let e = l.breakpoint;
|
|
(t[e] = t[e] || {}),
|
|
(t[e]["--app-shell-aside-transform"] = n),
|
|
(t[e]["--app-shell-aside-transform-rtl"] = o),
|
|
"fixed" === s
|
|
? (t[e]["--app-shell-aside-offset"] = "0px !important")
|
|
: ((t[e]["--app-shell-aside-width"] = "0px"),
|
|
(t[e]["--app-shell-aside-display"] = "none"),
|
|
(t[e]["--app-shell-main-column-end"] = "-1")),
|
|
(t[e]["--app-shell-aside-scroll-locked-visibility"] =
|
|
"hidden");
|
|
}
|
|
if (l?.collapsed?.mobile) {
|
|
let e = T(l.breakpoint, r.breakpoints) - 0.1;
|
|
(a[e] = a[e] || {}),
|
|
"fixed" === s
|
|
? ((a[e]["--app-shell-aside-width"] = "100%"),
|
|
(a[e]["--app-shell-aside-offset"] = "0px"))
|
|
: (a[e]["--app-shell-aside-width"] = "0px"),
|
|
(a[e]["--app-shell-aside-transform"] = n),
|
|
(a[e]["--app-shell-aside-transform-rtl"] = o),
|
|
(a[e]["--app-shell-aside-scroll-locked-visibility"] =
|
|
"hidden");
|
|
}
|
|
})({
|
|
baseStyles: c,
|
|
minMediaStyles: n,
|
|
maxMediaStyles: o,
|
|
aside: l,
|
|
theme: s,
|
|
mode: i,
|
|
}),
|
|
(function ({
|
|
baseStyles: e,
|
|
minMediaStyles: t,
|
|
header: a,
|
|
mode: l,
|
|
}) {
|
|
let r = a?.height,
|
|
s = "static" === l || (a?.offset ?? !0);
|
|
if (
|
|
("static" === l &&
|
|
a &&
|
|
((e["--app-shell-header-position"] = "sticky"),
|
|
(e["--app-shell-header-grid-column"] = "1 / -1"),
|
|
(e["--app-shell-header-grid-row"] = "1")),
|
|
F(r))
|
|
) {
|
|
let t = (0, B.rem)(E(r));
|
|
(e["--app-shell-header-height"] = t),
|
|
s && (e["--app-shell-header-offset"] = t);
|
|
}
|
|
M(r) &&
|
|
(void 0 !== r.base &&
|
|
((e["--app-shell-header-height"] = (0, B.rem)(r.base)),
|
|
s && (e["--app-shell-header-offset"] = (0, B.rem)(r.base))),
|
|
(0, I.keys)(r).forEach((e) => {
|
|
"base" !== e &&
|
|
((t[e] = t[e] || {}),
|
|
(t[e]["--app-shell-header-height"] = (0, B.rem)(r[e])),
|
|
s &&
|
|
(t[e]["--app-shell-header-offset"] = (0, B.rem)(r[e])));
|
|
})),
|
|
a?.collapsed &&
|
|
((e["--app-shell-header-transform"] =
|
|
"translateY(calc(var(--app-shell-header-height) * -1))"),
|
|
"fixed" === l &&
|
|
(e["--app-shell-header-offset"] = "0px !important"));
|
|
})({ baseStyles: c, minMediaStyles: n, header: t, mode: i }),
|
|
(function ({
|
|
baseStyles: e,
|
|
minMediaStyles: t,
|
|
footer: a,
|
|
mode: l,
|
|
}) {
|
|
let r = a?.height,
|
|
s = "static" === l || (a?.offset ?? !0);
|
|
if (
|
|
("static" === l &&
|
|
a &&
|
|
((e["--app-shell-footer-position"] = "sticky"),
|
|
(e["--app-shell-footer-grid-column"] = "1 / -1"),
|
|
(e["--app-shell-footer-grid-row"] = "3")),
|
|
F(r))
|
|
) {
|
|
let t = (0, B.rem)(E(r));
|
|
(e["--app-shell-footer-height"] = t),
|
|
s && (e["--app-shell-footer-offset"] = t);
|
|
}
|
|
M(r) &&
|
|
(void 0 !== r.base &&
|
|
((e["--app-shell-footer-height"] = (0, B.rem)(r.base)),
|
|
s && (e["--app-shell-footer-offset"] = (0, B.rem)(r.base))),
|
|
(0, I.keys)(r).forEach((e) => {
|
|
"base" !== e &&
|
|
((t[e] = t[e] || {}),
|
|
(t[e]["--app-shell-footer-height"] = (0, B.rem)(r[e])),
|
|
s &&
|
|
(t[e]["--app-shell-footer-offset"] = (0, B.rem)(r[e])));
|
|
})),
|
|
a?.collapsed &&
|
|
((e["--app-shell-footer-transform"] =
|
|
"translateY(var(--app-shell-footer-height))"),
|
|
"fixed" === l &&
|
|
(e["--app-shell-footer-offset"] = "0px !important"));
|
|
})({ baseStyles: c, minMediaStyles: n, footer: a, mode: i }),
|
|
(function ({ padding: e, baseStyles: t, minMediaStyles: a }) {
|
|
F(e) && (t["--app-shell-padding"] = D(E(e))),
|
|
M(e) &&
|
|
(e.base && (t["--app-shell-padding"] = D(e.base)),
|
|
(0, I.keys)(e).forEach((t) => {
|
|
"base" !== t &&
|
|
((a[t] = a[t] || {}),
|
|
(a[t]["--app-shell-padding"] = D(e[t])));
|
|
}));
|
|
})({ baseStyles: c, minMediaStyles: n, padding: r }),
|
|
{
|
|
baseStyles: c,
|
|
media: [
|
|
..._((0, I.keys)(n), s.breakpoints).map((e) => ({
|
|
query: `(min-width: ${(0, B.em)(e.px)})`,
|
|
styles: n[e.value],
|
|
})),
|
|
..._((0, I.keys)(o), s.breakpoints).map((e) => ({
|
|
query: `(max-width: ${(0, B.em)(e.px)})`,
|
|
styles: o[e.value],
|
|
})),
|
|
],
|
|
}
|
|
);
|
|
})({
|
|
navbar: e,
|
|
header: t,
|
|
footer: l,
|
|
aside: a,
|
|
padding: r,
|
|
theme: o,
|
|
mode: s,
|
|
});
|
|
return (0, n.jsx)(A.InlineStyles, {
|
|
media: p,
|
|
styles: d,
|
|
selector: i || c.cssVariablesSelector,
|
|
});
|
|
}
|
|
let R = (0, m.factory)((e, t) => {
|
|
let {
|
|
classNames: a,
|
|
className: l,
|
|
style: r,
|
|
styles: s,
|
|
unstyled: i,
|
|
vars: o,
|
|
withBorder: c,
|
|
zIndex: p,
|
|
mod: d,
|
|
...h
|
|
} = (0, u.useProps)("AppShellNavbar", null, e),
|
|
f = g();
|
|
return f.disabled
|
|
? null
|
|
: (0, n.jsx)(x.Box, {
|
|
component: "nav",
|
|
ref: t,
|
|
mod: [{ "with-border": c ?? f.withBorder }, d],
|
|
...f.getStyles("navbar", {
|
|
className: l,
|
|
classNames: a,
|
|
styles: s,
|
|
style: r,
|
|
}),
|
|
...h,
|
|
__vars: {
|
|
"--app-shell-navbar-z-index": `calc(${p ?? f.zIndex} + 1)`,
|
|
},
|
|
});
|
|
});
|
|
(R.classes = v), (R.displayName = "@mantine/core/AppShellNavbar");
|
|
let V = (0, e.i(910655).polymorphicFactory)((e, t) => {
|
|
let {
|
|
classNames: a,
|
|
className: l,
|
|
style: r,
|
|
styles: s,
|
|
vars: i,
|
|
grow: o,
|
|
mod: c,
|
|
...p
|
|
} = (0, u.useProps)("AppShellSection", null, e),
|
|
d = g();
|
|
return (0, n.jsx)(x.Box, {
|
|
ref: t,
|
|
mod: [{ grow: o }, c],
|
|
...d.getStyles("section", {
|
|
className: l,
|
|
style: r,
|
|
classNames: a,
|
|
styles: s,
|
|
}),
|
|
...p,
|
|
});
|
|
});
|
|
(V.classes = v), (V.displayName = "@mantine/core/AppShellSection");
|
|
var $ = e.i(899789),
|
|
O = e.i(883787);
|
|
let P = {
|
|
withBorder: !0,
|
|
padding: 0,
|
|
transitionDuration: 200,
|
|
transitionTimingFunction: "ease",
|
|
zIndex: (0, p.getDefaultZIndex)("app"),
|
|
mode: "fixed",
|
|
},
|
|
U = (0, d.createVarsResolver)(
|
|
(e, { transitionDuration: t, transitionTimingFunction: a }) => ({
|
|
root: {
|
|
"--app-shell-transition-duration": `${t}ms`,
|
|
"--app-shell-transition-timing-function": a,
|
|
},
|
|
}),
|
|
),
|
|
W = (0, m.factory)((e, t) => {
|
|
let a = (0, u.useProps)("AppShell", P, e),
|
|
{
|
|
classNames: l,
|
|
className: r,
|
|
style: s,
|
|
styles: i,
|
|
unstyled: p,
|
|
vars: d,
|
|
navbar: h,
|
|
withBorder: m,
|
|
padding: g,
|
|
transitionDuration: w,
|
|
transitionTimingFunction: y,
|
|
header: k,
|
|
zIndex: j,
|
|
layout: N,
|
|
disabled: S,
|
|
aside: C,
|
|
footer: A,
|
|
offsetScrollbars: I = !0,
|
|
mode: B,
|
|
mod: H,
|
|
attributes: T,
|
|
id: _,
|
|
...E
|
|
} = a,
|
|
F = (0, f.useStyles)({
|
|
name: "AppShell",
|
|
classes: v,
|
|
props: a,
|
|
className: r,
|
|
style: s,
|
|
classNames: l,
|
|
styles: i,
|
|
unstyled: p,
|
|
attributes: T,
|
|
vars: d,
|
|
varsResolver: U,
|
|
}),
|
|
M = (function ({ transitionDuration: e, disabled: t }) {
|
|
let [a, l] = (0, o.useState)(!0),
|
|
r = (0, o.useRef)(-1),
|
|
s = (0, o.useRef)(-1);
|
|
return (
|
|
(0, $.useWindowEvent)("resize", () => {
|
|
l(!0),
|
|
clearTimeout(r.current),
|
|
(r.current = window.setTimeout(
|
|
() =>
|
|
(0, o.startTransition)(() => {
|
|
l(!1);
|
|
}),
|
|
200,
|
|
));
|
|
}),
|
|
(0, O.useIsomorphicEffect)(() => {
|
|
l(!0),
|
|
clearTimeout(s.current),
|
|
(s.current = window.setTimeout(
|
|
() =>
|
|
(0, o.startTransition)(() => {
|
|
l(!1);
|
|
}),
|
|
e || 0,
|
|
));
|
|
}, [t, e]),
|
|
a
|
|
);
|
|
})({ disabled: S, transitionDuration: w }),
|
|
z = (0, c.useId)(_);
|
|
return (0, n.jsxs)(b, {
|
|
value: {
|
|
getStyles: F,
|
|
withBorder: m,
|
|
zIndex: j,
|
|
disabled: S,
|
|
offsetScrollbars: I,
|
|
mode: B,
|
|
},
|
|
children: [
|
|
(0, n.jsx)(L, {
|
|
navbar: h,
|
|
header: k,
|
|
aside: C,
|
|
footer: A,
|
|
padding: g,
|
|
mode: B,
|
|
selector: "static" === B ? `#${z}` : void 0,
|
|
}),
|
|
(0, n.jsx)(x.Box, {
|
|
ref: t,
|
|
...F("root"),
|
|
mod: [{ resizing: M, layout: N, disabled: S, mode: B }, H],
|
|
id: z,
|
|
...E,
|
|
}),
|
|
],
|
|
});
|
|
});
|
|
(W.classes = v),
|
|
(W.displayName = "@mantine/core/AppShell"),
|
|
(W.Navbar = R),
|
|
(W.Header = j),
|
|
(W.Main = N),
|
|
(W.Aside = y),
|
|
(W.Footer = k),
|
|
(W.Section = V);
|
|
var G = e.i(505e3),
|
|
J = e.i(41114),
|
|
K = e.i(963527),
|
|
X = e.i(99500),
|
|
Y = e.i(841183),
|
|
Z = e.i(243531),
|
|
q = e.i(552119),
|
|
Q = e.i(904472),
|
|
ee = e.i(433761);
|
|
let et = (0, q.Logger)("@liblibaix/services-ts/banner"),
|
|
ea = (e) => ({
|
|
id: e.url,
|
|
title: e.title,
|
|
image: e.pic,
|
|
link: e.url,
|
|
startTime: e.startTime,
|
|
endTime: e.endTime,
|
|
extendInfo: e.extendInfo,
|
|
enTitle: e.enTitle,
|
|
});
|
|
async function el(e) {
|
|
et.info("getBanner", e);
|
|
let t = (0, ee.getUrl)(Q.urls.bannerGetBanner),
|
|
a = await (0, Z.postWithToken)(t, { bannerType: e });
|
|
return (a.data?.banners || []).map(ea);
|
|
}
|
|
var er = e.i(254119),
|
|
es = e.i(216257),
|
|
ei = e.i(290456);
|
|
function en({ endTime: e, countdownStyle: t }) {
|
|
let [a, l] = (0, o.useState)({
|
|
days: 0,
|
|
hours: 0,
|
|
minutes: 0,
|
|
seconds: 0,
|
|
}),
|
|
r = (0, o.useRef)(0),
|
|
s = `<svg xmlns="http://www.w3.org/2000/svg" width="10" height="13" viewBox="0 0 10 13" fill="none">
|
|
<path d="M8.69238 0C8.98211 0.000263646 9.2168 0.235604 9.2168 0.525391C9.21671 0.815103 8.98205 1.05052 8.69238 1.05078H8.05078V2.95898C8.05064 3.4075 7.87186 3.83815 7.55469 4.15527L5.35156 6.3584L7.55469 8.5625C7.8718 8.87965 8.05069 9.31029 8.05078 9.75879V11.667H8.69238C8.98211 11.6673 9.2168 11.9026 9.2168 12.1924C9.21653 12.4819 8.98195 12.7165 8.69238 12.7168H0.525391C0.235604 12.7168 0.000263516 12.4821 0 12.1924C0 11.9024 0.235441 11.667 0.525391 11.667H1.16699V9.75879C1.16709 9.31036 1.3451 8.87964 1.66211 8.5625L3.86621 6.3584L1.66211 4.15527C1.34493 3.83815 1.16713 3.4075 1.16699 2.95898V1.05078H0.525391C0.235495 1.05078 8.80085e-05 0.815265 0 0.525391C0 0.235441 0.235441 0 0.525391 0H8.69238ZM2.40527 9.30469C2.28494 9.42499 2.21684 9.58864 2.2168 9.75879V11.667H7V9.75879L6.99707 9.69531C6.98249 9.54845 6.91774 9.40997 6.8125 9.30469L4.6084 7.10156L2.40527 9.30469ZM2.2168 2.95898L2.21973 3.02246C2.23439 3.16925 2.30003 3.30689 2.40527 3.41211L4.6084 5.61621L6.8125 3.41211C6.93259 3.29188 6.99991 3.12892 7 2.95898V1.05078H2.2168V2.95898Z" fill="white"/>
|
|
</svg>`;
|
|
(0, o.useEffect)(() => {
|
|
let t = "string" == typeof e ? new Date(e).getTime() : e,
|
|
a = () => {
|
|
let e = Math.max(0, t - Date.now());
|
|
l({
|
|
days: Math.floor(e / 864e5),
|
|
hours: Math.floor((e % 864e5) / 36e5),
|
|
minutes: Math.floor((e % 36e5) / 6e4),
|
|
seconds: Math.floor((e % 6e4) / 1e3),
|
|
}),
|
|
e > 0 && (r.current = window.setTimeout(a, 1e3));
|
|
};
|
|
return a(), () => clearTimeout(r.current);
|
|
}, [e]);
|
|
let i = (e) => String(e).padStart(2, "0"),
|
|
c = `${i(a.hours)}时 ${i(a.minutes)}分 ${i(a.seconds)}秒`;
|
|
return (0, n.jsxs)("div", {
|
|
className:
|
|
"flex items-center gap-1 whitespace-nowrap rounded-full px-4 py-1",
|
|
style: t,
|
|
children: [
|
|
(0, n.jsx)("span", {
|
|
className: "flex shrink-0 items-center",
|
|
dangerouslySetInnerHTML: { __html: s },
|
|
}),
|
|
(0, n.jsx)("span", { className: "shrink-0", children: "活动剩余" }),
|
|
(0, n.jsxs)("div", {
|
|
className: "ml-1.5 shrink-0",
|
|
style: { fontVariantNumeric: "tabular-nums" },
|
|
children: [
|
|
a.days > 0 ? `${a.days}天\u2007` : "",
|
|
(0, n.jsx)("span", {
|
|
className: "inline-block min-w-[60px]",
|
|
children: c,
|
|
}),
|
|
],
|
|
}),
|
|
],
|
|
});
|
|
}
|
|
let eo = {
|
|
once: 1 / 0,
|
|
daily: 864e5,
|
|
weekly: 6048e5,
|
|
monthly: 2592e6,
|
|
yearly: 31536e6,
|
|
};
|
|
function ec(e) {
|
|
return `activity_banner_dismissed_${e}`;
|
|
}
|
|
function ep({ onHeightChange: e }) {
|
|
let t = (0, er.useIsMobileSimple)(),
|
|
{ isVip: a } = (0, Y.useUserIdentificationHooks)(),
|
|
l = (0, es.useUiStore)((e) => e.setActivityBannerHeight),
|
|
[r, s] = (0, o.useState)(0),
|
|
[i, c] = (0, o.useState)(null),
|
|
[p, d] = (0, o.useState)(!0),
|
|
[h, u] = (0, o.useState)(!1),
|
|
f = (0, o.useRef)("daily"),
|
|
x = (0, o.useRef)(),
|
|
[m, b] = (0, o.useState)(null),
|
|
g = (0, o.useCallback)((e) => {
|
|
b(e);
|
|
}, []);
|
|
(0, o.useEffect)(() => {
|
|
let e = !1;
|
|
return (
|
|
el(32)
|
|
.then((t = []) => {
|
|
if (e || !t.length) return;
|
|
let a = t[0];
|
|
try {
|
|
let e = JSON.parse(a.extendInfo),
|
|
t =
|
|
e?.countdownEndTime != null
|
|
? (0, ee.resolveCountdownEndTime)(e.countdownEndTime)
|
|
: void 0,
|
|
l = a.endTime;
|
|
if (null != t) {
|
|
let e = new Date(t).getTime(),
|
|
a = new Date(l).getTime();
|
|
s(e <= a ? t : l);
|
|
} else s(l);
|
|
e?.showCountdown && u(!0),
|
|
e?.countdownStyle && (x.current = e.countdownStyle),
|
|
e?.text && c({ item: a, info: e }),
|
|
e?.showDuration && (f.current = e.showDuration),
|
|
(function (e, t) {
|
|
try {
|
|
let e = localStorage.getItem(ec(32));
|
|
if (!e) return !1;
|
|
let l = JSON.parse(e);
|
|
if (null != t && l.itemId !== t)
|
|
return localStorage.removeItem(ec(32)), !1;
|
|
if ("vip" === l.type) return !0;
|
|
if ("normal" === l.type && l.ts) {
|
|
var a;
|
|
let e =
|
|
((a = l.duration ?? "daily"),
|
|
"number" == typeof a
|
|
? 60 * a * 6e4
|
|
: (eo[a] ?? 864e5));
|
|
if (e === 1 / 0 || Date.now() - l.ts < e) return !0;
|
|
}
|
|
return localStorage.removeItem(ec(32)), !1;
|
|
} catch {
|
|
return !1;
|
|
}
|
|
})(0, e.id) && d(!1);
|
|
} catch {}
|
|
})
|
|
.catch(() => {}),
|
|
() => {
|
|
e = !0;
|
|
}
|
|
);
|
|
}, []);
|
|
let v = (0, o.useCallback)(
|
|
(t) => {
|
|
e?.(t), l(t);
|
|
},
|
|
[e, l],
|
|
);
|
|
(0, o.useEffect)(() => {
|
|
if (!m) return void v(0);
|
|
let e = new ResizeObserver(() => {
|
|
v(m.offsetHeight);
|
|
});
|
|
return e.observe(m), () => e.disconnect();
|
|
}, [m, v]);
|
|
let w = (0, o.useCallback)(() => {
|
|
!(function (e, t, a = "daily", l) {
|
|
try {
|
|
let e = t
|
|
? { type: "vip", itemId: l }
|
|
: { type: "normal", ts: Date.now(), duration: a, itemId: l };
|
|
localStorage.setItem(ec(32), JSON.stringify(e));
|
|
} catch {}
|
|
})(0, a, f.current, i?.info.id),
|
|
d(!1),
|
|
v(0);
|
|
}, [a, v, i?.info.id]);
|
|
if (i && p && !t) {
|
|
let { info: e } = i;
|
|
return (0, n.jsxs)("div", {
|
|
ref: g,
|
|
className:
|
|
"relative flex w-full cursor-pointer items-center justify-center overflow-hidden py-[10px]",
|
|
style: {
|
|
backgroundImage: e.bg?.length
|
|
? `linear-gradient(90deg, ${e.bg.join(",")})`
|
|
: void 0,
|
|
color: e.color || "#fff",
|
|
},
|
|
onClick: () => {
|
|
let t = (0, X.parseBannerAction)(e.action);
|
|
t
|
|
? (0, K.openVipModel)((0, X.toVipParams)(t))
|
|
: e.link && window.open(e.link, "_blank");
|
|
},
|
|
children: [
|
|
(0, n.jsx)("button", {
|
|
className:
|
|
"absolute right-3 top-1/2 z-10 flex h-5 w-5 -translate-y-1/2 items-center justify-center text-[#141414] hover:text-black",
|
|
onClick: (e) => {
|
|
e.stopPropagation(), w();
|
|
},
|
|
children: "✕",
|
|
}),
|
|
(0, n.jsxs)("div", {
|
|
className: "flex items-center gap-3",
|
|
children: [
|
|
h && (0, n.jsx)(en, { endTime: r, countdownStyle: x.current }),
|
|
(0, n.jsx)("span", {
|
|
className: "text-sm",
|
|
style: e.textStyle || {},
|
|
dangerouslySetInnerHTML: {
|
|
__html: (0, ei.sanitizeHtml)(e.text),
|
|
},
|
|
}),
|
|
e.btn &&
|
|
(0, n.jsx)("span", {
|
|
className: "rounded px-3 py-0.5 text-xs font-medium",
|
|
style: {
|
|
backgroundColor: e.btBg || "rgba(255,255,255,0.2)",
|
|
color: e.btColor || "#fff",
|
|
...e.btStyle,
|
|
flexShrink: 0,
|
|
},
|
|
children: e.btn,
|
|
}),
|
|
],
|
|
}),
|
|
],
|
|
});
|
|
}
|
|
return null;
|
|
}
|
|
var ed = e.i(549116),
|
|
eh = e.i(325528);
|
|
e.i(606823);
|
|
var eu = e.i(471454),
|
|
ef = e.i(687517),
|
|
ex = e.i(252474);
|
|
e.i(370357);
|
|
var em = e.i(492394);
|
|
e.i(693602);
|
|
var eb = e.i(452678),
|
|
eg = e.i(40456),
|
|
ev = e.i(691411),
|
|
ew = e.i(143216),
|
|
ey = e.i(422676),
|
|
ek = e.i(844567),
|
|
ej = e.i(11623),
|
|
eN = e.i(688907),
|
|
eS = e.i(284309),
|
|
eC = e.i(532354),
|
|
eA = e.i(407519),
|
|
eI = e.i(41671),
|
|
eB = e.i(777784);
|
|
function eH({
|
|
href: e,
|
|
className: t,
|
|
activeClassName: a = "",
|
|
disableI18n: l = !1,
|
|
...r
|
|
}) {
|
|
let { lang: s } = (0, ev.useI18n)(),
|
|
i = (0, eS.usePathname)(),
|
|
o = "";
|
|
o =
|
|
e.startsWith("mailto:") || e.startsWith("http") || l || "zh" === s
|
|
? e
|
|
: `/${s}${e}`;
|
|
let c =
|
|
!1 === r.prefetch ||
|
|
e.startsWith("/debug") ||
|
|
e.startsWith("/developer")
|
|
? { ...r, prefetch: !1 }
|
|
: r;
|
|
return (0, n.jsx)(eN.default, {
|
|
href: o,
|
|
className: `${t} ${
|
|
(() => {
|
|
if (l) return i === e;
|
|
let t = "zh" === s ? e : `/${s}${e}`;
|
|
return "/" === e
|
|
? "zh" === s
|
|
? "/" === i
|
|
: i === `/${s}`
|
|
: i.startsWith(t);
|
|
})()
|
|
? a
|
|
: ""
|
|
}`,
|
|
...c,
|
|
});
|
|
}
|
|
var eT = e.i(646554),
|
|
e_ = e.i(944733),
|
|
eE = e.i(930686),
|
|
eF = e.i(677588),
|
|
eM = e.i(637591),
|
|
ez = e.i(373518);
|
|
e.i(135623);
|
|
var eD = e.i(168823);
|
|
function eL() {
|
|
return (eL = Object.assign.bind()).apply(null, arguments);
|
|
}
|
|
let eR = function (e) {
|
|
return o.createElement(
|
|
"svg",
|
|
eL(
|
|
{
|
|
xmlns: "http://www.w3.org/2000/svg",
|
|
fill: "none",
|
|
viewBox: "0 0 16 16",
|
|
},
|
|
e,
|
|
),
|
|
t ||
|
|
(t = o.createElement("path", {
|
|
stroke: "currentColor",
|
|
strokeLinecap: "round",
|
|
strokeLinejoin: "round",
|
|
d: "M6 12.667 10.667 8 6 3.333",
|
|
})),
|
|
);
|
|
};
|
|
function eV() {
|
|
return (eV = Object.assign.bind()).apply(null, arguments);
|
|
}
|
|
let e$ = function (e) {
|
|
return o.createElement(
|
|
"svg",
|
|
eV(
|
|
{
|
|
xmlns: "http://www.w3.org/2000/svg",
|
|
fill: "none",
|
|
viewBox: "0 0 18 18",
|
|
},
|
|
e,
|
|
),
|
|
a ||
|
|
(a = o.createElement("path", {
|
|
stroke: "currentColor",
|
|
strokeLinecap: "round",
|
|
strokeLinejoin: "round",
|
|
strokeWidth: 1.88,
|
|
d: "M15.019 4.481h-12M11.252 9H3.377M15.019 13.481h-12",
|
|
})),
|
|
);
|
|
};
|
|
var eO = e.i(458390);
|
|
function eP() {
|
|
return (eP = Object.assign.bind()).apply(null, arguments);
|
|
}
|
|
function eU() {
|
|
return (eU = Object.assign.bind()).apply(null, arguments);
|
|
}
|
|
function eW() {
|
|
return (eW = Object.assign.bind()).apply(null, arguments);
|
|
}
|
|
let eG = {
|
|
xiaohongshu: {
|
|
name: "小红书",
|
|
url: "https://www.xiaohongshu.com/user/profile/5fe24c55000000000101cd56",
|
|
Icon: function (e) {
|
|
return o.createElement(
|
|
"svg",
|
|
eW(
|
|
{
|
|
xmlns: "http://www.w3.org/2000/svg",
|
|
width: 28,
|
|
height: 16,
|
|
fill: "none",
|
|
viewBox: "0 0 28 16",
|
|
},
|
|
e,
|
|
),
|
|
s ||
|
|
(s = o.createElement("path", {
|
|
fill: "#A4A9B2",
|
|
d: "M1.489 5.683h1.728s-.202 2.894-.255 3.402c-.053.51-.243 1.876-.996 2.745l-.88-1.918s.201-.191.403-4.229m2.9-2.295h1.738v7.998s-.353 1.258-1.328 1.244h-.933l-.759-1.507h1.12c.12 0 .117-.166.117-.122zm8.705-.072-.877 1.978s-.155.396.099.41 1.455 0 1.455 0L12.555 8.43s-.127.353.113.353h.904l-.602 1.412h-1.982s-.863-.126-.51-.904c.354-.778.877-2.006.877-2.006l-.89.014s-.806-.17-.41-.99c.395-.82 1.384-2.995 1.384-2.995zM7.286 5.663h1.71s.226 4.133.406 4.148l-.874 1.97s-.804-.607-1.017-3.059a93 93 0 0 1-.225-3.06m2.925 5.086s.056.155.706.155h1.978l-.79 1.71H9.999s-.615.013-.597-.185zm8.04-6.783v1.71h-1.074v5.229h1.668v1.71h-5.723l.748-1.696h1.47l.029-5.256-1.032-.014-.042-1.683zM27 11.116V8.714c0-1.426-1.515-1.484-1.515-1.484h-.438V5.647c.014-1.455-1.752-1.68-1.752-1.68h-1.087v-.665h-1.696l.028.664H19.34v1.681h1.16v1.597h-1.755v1.71l1.752.014v3.645h1.71V8.955h2.726c.367 0 .396.367.396.367s.092 1 .067 1.427c-.025.423-.336.395-.336.395h-1.413l.678 1.47h1.286c1.5 0 1.39-1.498 1.39-1.498m-3.621-5.32V7.21h-1.2V5.67h1.024c.198 0 .176.127.176.127",
|
|
})),
|
|
i ||
|
|
(i = o.createElement("path", {
|
|
fill: "#A4A9B2",
|
|
d: "M26.188 5.62h-.813v-.813c0-.446.366-.813.813-.813s.812.367.812.813a.815.815 0 0 1-.812.812",
|
|
})),
|
|
);
|
|
},
|
|
},
|
|
tiktok: {
|
|
name: "抖音",
|
|
url: "https://www.douyin.com/user/MS4wLjABAAAAK_KRudpMILz7oekcDQf3k-98vyGlSmiOc2dIPvhMCxpJYNEC26EcE2WugBcsJLZb",
|
|
Icon: function (e) {
|
|
return o.createElement(
|
|
"svg",
|
|
eU(
|
|
{
|
|
xmlns: "http://www.w3.org/2000/svg",
|
|
width: 12,
|
|
height: 16,
|
|
fill: "none",
|
|
viewBox: "0 0 12 16",
|
|
},
|
|
e,
|
|
),
|
|
r ||
|
|
(r = o.createElement("path", {
|
|
fill: "#A4A9B2",
|
|
d: "M8.536 2H6.514v8.174c0 .974-.778 1.774-1.746 1.774s-1.746-.8-1.746-1.774c0-.957.76-1.74 1.694-1.774V6.348C2.66 6.383 1 8.07 1 10.174 1 12.296 2.694 14 4.785 14s3.786-1.722 3.786-3.826V5.983c.76.556 1.694.887 2.679.904V4.835A2.82 2.82 0 0 1 8.536 2",
|
|
})),
|
|
);
|
|
},
|
|
},
|
|
bilibili: {
|
|
name: "B站",
|
|
url: "https://space.bilibili.com/482619845",
|
|
Icon: function (e) {
|
|
return o.createElement(
|
|
"svg",
|
|
eP(
|
|
{
|
|
xmlns: "http://www.w3.org/2000/svg",
|
|
width: 26,
|
|
height: 16,
|
|
fill: "none",
|
|
viewBox: "0 0 26 16",
|
|
},
|
|
e,
|
|
),
|
|
l ||
|
|
(l = o.createElement("path", {
|
|
fill: "#A4A9B2",
|
|
d: "M19.539 6.027c.062.01.554-.1.575-.063.032.047.252 1.624.194 1.635s-.466.104-.466.104c-.031-.214-.298-1.54-.303-1.677m.785-.152.214 1.697c.11-.005.555-.036.597-.041-.063-.643-.173-1.656-.173-1.656a1.6 1.6 0 0 0-.638 0M19.9 8.23s.968-.245 1.319-.125c.178.643.502 4.246.534 4.392-.22.026-.943.09-1 .105-.047-.272-.853-4.2-.853-4.372m3.585-2.162c.058.016.57-.052.576-.015.01.125.063 1.64.005 1.645l-.466.042c-.01-.21-.125-1.53-.115-1.672m.79-.041.042 1.676c.11 0 .55.026.597.02-.01-.641 0-1.655 0-1.655a3 3 0 0 0-.639-.042m-.675 2.25s.99-.13 1.324.027c.074.752.063 4.256.074 4.402-.226 0-.943.01-1 .021-.01-.271-.414-4.277-.398-4.45M21.302 3.97c.57 2.904 1.005 7.865 1.021 8.184 0 0 .45.01.958.041-.298-3.128-.665-8.126-.66-8.288-.125-.14-1.319.063-1.319.063m-1.256 6.868c-.11-.815-3.03-1.74-4.674-1.442 0 0-.204-1.796-.282-3.536a36 36 0 0 1 .005-3.185c-.11-.079-1.293.485-1.931.72 0 0 .764 3.228 1.319 9.923 0 0 .884.094 2.402-.198s3.313-1.207 3.161-2.282m-3.57 1.467-.256-1.843c.063-.032 1.638.553 1.806.657-.026.115-1.55 1.186-1.55 1.186M7.376 6.026c.063.01.555-.099.576-.062.031.047.25 1.624.193 1.635s-.466.104-.466.104c-.03-.214-.298-1.54-.303-1.677m.785-.15.215 1.696c.11-.005.554-.036.596-.041l-.173-1.656a1.6 1.6 0 0 0-.638 0M7.736 8.23s.968-.245 1.32-.125c.177.643.502 4.246.533 4.392-.22.026-.942.09-1 .105-.047-.272-.853-4.2-.853-4.372m3.585-2.162c.058.016.57-.052.576-.015.01.125.063 1.64.005 1.645l-.466.042c-.01-.21-.12-1.53-.115-1.672m.79-.041.042 1.676c.11 0 .55.026.597.02-.01-.641 0-1.655 0-1.655a3.3 3.3 0 0 0-.639-.042m-.675 2.25s.99-.13 1.325.027c.073.752.062 4.256.073 4.402-.225 0-.942.01-1 .021-.005-.271-.413-4.277-.398-4.45M9.14 3.97c.57 2.904 1.005 7.865 1.02 8.184 0 0 .45.01.958.041-.298-3.128-.665-8.126-.66-8.293-.125-.136-1.318.068-1.318.068m-1.256 6.868c-.11-.815-3.03-1.74-4.674-1.442 0 0-.204-1.796-.283-3.536a36 36 0 0 1 .005-3.185c-.11-.073-1.292.485-1.931.72 0 0 .764 3.228 1.319 9.923 0 0 .884.094 2.402-.198s3.313-1.207 3.162-2.282m-3.57 1.467-.256-1.843c.062-.032 1.638.553 1.805.657-.026.115-1.549 1.186-1.549 1.186",
|
|
})),
|
|
);
|
|
},
|
|
},
|
|
};
|
|
function eJ() {
|
|
let { t: e } = (0, ev.useI18n)(),
|
|
t = "/" === (0, eS.usePathname)(),
|
|
a = (0, n.jsx)(eC.default, {
|
|
className: `h-6 ${t ? "" : "cursor-pointer"}`,
|
|
}),
|
|
[l, { open: r, close: s }] = (0, ej.useDisclosure)(!1),
|
|
{ isLogin: i } = (0, ef.useLoginHook)(),
|
|
{ currentLoginUserInfo: c } = (0, em.usePersonalInfo)(),
|
|
{ isOrdinaryUser: p, isTeamUser: d } = (0,
|
|
Y.useUserIdentificationHooks)(),
|
|
{ personalAccount: h } = (0, eu.useAccountHooks)(),
|
|
u = h?.source === 2,
|
|
{ remoteConfig: f } = (0, ex.useRemoteConfigHooks)("206", !0),
|
|
m =
|
|
f?.url ||
|
|
"https://liblibai-online.liblib.cloud/web/ef0097ae9da74189a0f5d604e98c77cd/0e049bea-8d16-4cd6-a13d-a838adff5805.png",
|
|
b = (0, o.useMemo)(() => (p ? "开通会员" : "会员中心"), [p]),
|
|
[g, v] = (0, o.useState)(!1),
|
|
[w, y] = (0, o.useState)(null),
|
|
k = (0, o.useRef)(!1);
|
|
(0, o.useEffect)(() => {
|
|
u &&
|
|
!k.current &&
|
|
((k.current = !0),
|
|
(0, eM.getInviteCodeDetails)(ez.TEAM_FISSION_BATCH_NO)
|
|
.then((e) => y(e?.data ?? null))
|
|
.catch(() => {}));
|
|
}, [u]),
|
|
(0, o.useCallback)((e) => {
|
|
e
|
|
? navigator.clipboard.writeText(e).then(
|
|
() => eB.Notify.success("邀请链接已复制"),
|
|
() => eB.Notify.error("复制失败,请手动复制"),
|
|
)
|
|
: eB.Notify.warn("暂无邀请链接");
|
|
}, []),
|
|
(0, o.useCallback)(() => {
|
|
(0, ed.openTeamPaywall)({ paywall: "group" });
|
|
}, []);
|
|
let j = (0, o.useCallback)(() => {
|
|
window.open(
|
|
"https://liblibai.feishu.cn/wiki/Loxfw6XHziYRk0kKzdjcFfp9nhb",
|
|
"_blank",
|
|
);
|
|
}, []),
|
|
N = (0, o.useCallback)(() => {
|
|
(0, eg.getSSOClient)({
|
|
siteId: eh.config.tv.domain,
|
|
bridgeUrl: eh.config.tv.bridgeUrl,
|
|
}).notifyLogout(),
|
|
setTimeout(() => {
|
|
let e = localStorage.getItem("cid");
|
|
localStorage.clear(),
|
|
(0, eD.deleteCookie)("usertoken"),
|
|
(0, eD.deleteCookie)("usertoken_pre"),
|
|
e && localStorage.setItem("cid", e),
|
|
window.location.reload();
|
|
}, 500);
|
|
}, []),
|
|
S = (0, o.useCallback)(() => {
|
|
s(), (0, e_.confirm)({ message: e("logoutConfirm"), onConfirm: N });
|
|
}, [s, e, N]),
|
|
C = (0, o.useMemo)(
|
|
() => [
|
|
{
|
|
label: e("nav_home"),
|
|
icon: (0, n.jsx)(eI.Icons.Home, { width: 20, height: 20 }),
|
|
onClick: () => {
|
|
(window.location.href = "/"), s();
|
|
},
|
|
},
|
|
],
|
|
[e, s],
|
|
);
|
|
return (0, n.jsxs)(n.Fragment, {
|
|
children: [
|
|
(0, n.jsx)("header", {
|
|
className:
|
|
"b768:px-4 bg-bg-page text-fg-default mx-auto h-[var(--libtv-header-height)] px-[10px]",
|
|
children: (0, n.jsxs)(ey.Group, {
|
|
justify: "space-between",
|
|
h: "100%",
|
|
children: [
|
|
(0, n.jsxs)(ey.Group, {
|
|
children: [
|
|
(0, n.jsx)(x.Box, {
|
|
hiddenFrom: "md",
|
|
children: (0, n.jsx)("div", {
|
|
className:
|
|
"cursor-pointer rounded-[8px] bg-[var(--color-pagination-bg)] p-[6px]",
|
|
onClick: r,
|
|
children: (0, n.jsx)(e$, {
|
|
className: "h-[18px] w-[18px]",
|
|
}),
|
|
}),
|
|
}),
|
|
t
|
|
? a
|
|
: (0, n.jsx)(eH, {
|
|
href: "/",
|
|
"aria-label": e("nav_home"),
|
|
children: a,
|
|
}),
|
|
],
|
|
}),
|
|
(0, n.jsxs)(ey.Group, {
|
|
gap: 8,
|
|
children: [
|
|
(0, n.jsx)(x.Box, {
|
|
visibleFrom: "md",
|
|
children: (0, n.jsxs)("button", {
|
|
type: "button",
|
|
className:
|
|
"dark:border-(--topnav-btn-border) dark:border-hair flex h-10 cursor-pointer items-center justify-center gap-[2px] rounded-xl border-[0.5px] border-[rgba(245,174,13,0.30)] bg-[#FFF3CF] px-3 text-[13px] font-[400] text-[#773E00] hover:bg-[#FFEDAB] dark:bg-[rgba(255,198,93,0.10)] dark:text-[#FFC65D] dark:hover:bg-[rgba(255,198,93,0.15)]",
|
|
"aria-label": "创作者挑战赛",
|
|
onClick: () => {
|
|
try {
|
|
(0, eF.reportLog)({
|
|
e: "libtv.activity.challenge.click",
|
|
});
|
|
} catch {
|
|
console.error(
|
|
"libtv.activity.challenge.click 上报失败",
|
|
);
|
|
}
|
|
window.open("/activity", "_blank");
|
|
},
|
|
children: [
|
|
(0, n.jsx)(eI.Icons.RiceEar, {
|
|
className: "text-[14px]",
|
|
}),
|
|
"创作者挑战赛",
|
|
(0, n.jsx)(eI.Icons.RiceEar, {
|
|
className: "scale-x-[-1] text-[14px]",
|
|
}),
|
|
],
|
|
}),
|
|
}),
|
|
(0, n.jsx)("a", {
|
|
href: eh.config.siteUrl,
|
|
target: "_blank",
|
|
rel: "noreferrer",
|
|
className:
|
|
"bg-panel-background border-(--topnav-btn-border) border-hair hover:bg-(--topnav-btn-hover-bg) text-fg-default flex size-10 cursor-pointer items-center justify-center rounded-xl",
|
|
"aria-label": "回到主站",
|
|
onClick: () => {
|
|
(0, eF.reportLog)({ e: "libtv.return_to_main.click" });
|
|
},
|
|
children: (0, n.jsx)(eI.Icons.GoLiblib, {
|
|
width: 14,
|
|
height: 14,
|
|
}),
|
|
}),
|
|
(0, n.jsx)(x.Box, {
|
|
visibleFrom: "md",
|
|
children: (0, n.jsxs)(ek.HoverCard, {
|
|
position: "bottom-start",
|
|
radius: 12,
|
|
width: 120,
|
|
openDelay: 80,
|
|
closeDelay: 120,
|
|
offset: { mainAxis: 8, crossAxis: 0 },
|
|
children: [
|
|
(0, n.jsx)(ek.HoverCard.Target, {
|
|
children: (0, n.jsx)("button", {
|
|
type: "button",
|
|
className:
|
|
"bg-panel-background border-(--topnav-btn-border) border-hair hover:bg-(--topnav-btn-hover-bg) flex size-10 cursor-pointer items-center justify-center rounded-xl",
|
|
"aria-label": "帮助信息",
|
|
children: (0, n.jsx)(eI.Icons.helpCircle, {
|
|
width: 14,
|
|
height: 14,
|
|
}),
|
|
}),
|
|
}),
|
|
(0, n.jsxs)(ek.HoverCard.Dropdown, {
|
|
p: 4,
|
|
className:
|
|
"bg-panel-background border-(--topnav-btn-border) rounded-xl backdrop-blur-[16px]",
|
|
style: {
|
|
boxShadow:
|
|
"0px 4px 10px rgba(0,0,0,0.12), 0px 2px 4px rgba(0,0,0,0.2)",
|
|
},
|
|
children: [
|
|
(0, n.jsx)("button", {
|
|
type: "button",
|
|
className:
|
|
"text-fg-default hover:bg-(--topnav-btn-hover-bg) flex h-8 w-full items-center rounded-lg px-2 text-left text-[13px]",
|
|
onClick: j,
|
|
children: "使用教程",
|
|
}),
|
|
(0, n.jsxs)(ek.HoverCard, {
|
|
position: "right-start",
|
|
radius: 12,
|
|
width: 240,
|
|
openDelay: 80,
|
|
closeDelay: 120,
|
|
offset: { mainAxis: 8, crossAxis: 0 },
|
|
children: [
|
|
(0, n.jsx)(ek.HoverCard.Target, {
|
|
children: (0, n.jsx)("div", {
|
|
className:
|
|
"text-fg-default hover:bg-(--topnav-btn-hover-bg) mt-1 flex h-8 w-full cursor-pointer items-center rounded-lg px-2 text-left text-[13px]",
|
|
children: "备案信息",
|
|
}),
|
|
}),
|
|
(0, n.jsxs)(ek.HoverCard.Dropdown, {
|
|
px: 4,
|
|
py: 12,
|
|
className:
|
|
"bg-panel-background border-(--topnav-btn-border) rounded-xl",
|
|
children: [
|
|
(0, n.jsxs)("div", {
|
|
className:
|
|
"border-(--topnav-btn-border) border-b pb-3",
|
|
children: [
|
|
(0, n.jsxs)("a", {
|
|
href: "https://www.liblib.art/activities/468ad794ccc7408d81757fd91be003ec",
|
|
target: "_blank",
|
|
rel: "noreferrer",
|
|
className:
|
|
"text-fg-default hover:bg-(--topnav-btn-hover-bg) mb-1 flex h-8 items-center rounded-lg px-2 text-[13px]",
|
|
children: [
|
|
"用户协议",
|
|
(0, n.jsx)("span", {
|
|
className:
|
|
"ml-auto text-neutral-500",
|
|
children: (0, n.jsx)(
|
|
eI.Icons.arrowRightUp,
|
|
{ width: 14, height: 14 },
|
|
),
|
|
}),
|
|
],
|
|
}),
|
|
(0, n.jsxs)("a", {
|
|
href: "https://www.liblib.art/activities/7a354f41ead34f719eb49576e5292d00",
|
|
target: "_blank",
|
|
rel: "noreferrer",
|
|
className:
|
|
"text-fg-default hover:bg-(--topnav-btn-hover-bg) flex h-8 items-center rounded-lg px-2 text-[13px]",
|
|
children: [
|
|
"隐私政策",
|
|
(0, n.jsx)("span", {
|
|
className:
|
|
"ml-auto text-neutral-500",
|
|
children: (0, n.jsx)(
|
|
eI.Icons.arrowRightUp,
|
|
{ width: 14, height: 14 },
|
|
),
|
|
}),
|
|
],
|
|
}),
|
|
],
|
|
}),
|
|
(0, n.jsxs)("div", {
|
|
className:
|
|
"mt-3 px-2 text-[12px] leading-5 text-neutral-500",
|
|
children: [
|
|
(0, n.jsx)("div", {
|
|
className: "mt-2",
|
|
children:
|
|
"北京奇点星宇科技有限公司",
|
|
}),
|
|
(0, n.jsx)("div", {
|
|
className: "mt-2",
|
|
children:
|
|
"地址: 北京市海淀区上地信息路12号1号楼3层B301室 ",
|
|
}),
|
|
(0, n.jsx)("div", {
|
|
className: "mt-2",
|
|
children: "电话: 010-62020220",
|
|
}),
|
|
(0, n.jsx)("div", {
|
|
className: "mt-2",
|
|
children: "沪ICP备2025147903号-7",
|
|
}),
|
|
],
|
|
}),
|
|
],
|
|
}),
|
|
],
|
|
}),
|
|
(0, n.jsxs)(ek.HoverCard, {
|
|
position: "left-start",
|
|
radius: 12,
|
|
width: 140,
|
|
openDelay: 80,
|
|
closeDelay: 120,
|
|
offset: { mainAxis: 8, crossAxis: 0 },
|
|
children: [
|
|
(0, n.jsx)(ek.HoverCard.Target, {
|
|
children: (0, n.jsx)("div", {
|
|
className:
|
|
"text-fg-default hover:bg-(--topnav-btn-hover-bg) mt-1 flex h-8 w-full cursor-pointer items-center rounded-lg px-2 text-left text-[13px]",
|
|
children: "联系客服",
|
|
}),
|
|
}),
|
|
(0, n.jsx)(ek.HoverCard.Dropdown, {
|
|
p: 4,
|
|
className:
|
|
"bg-panel-background border-(--topnav-btn-border) size-[140px] rounded-xl",
|
|
children: (0, n.jsx)("img", {
|
|
className:
|
|
"size-full rounded-lg object-contain",
|
|
src: m,
|
|
alt: "联系客服",
|
|
}),
|
|
}),
|
|
],
|
|
}),
|
|
],
|
|
}),
|
|
],
|
|
}),
|
|
}),
|
|
(0, n.jsx)(eO.default, {}),
|
|
],
|
|
}),
|
|
],
|
|
}),
|
|
}),
|
|
(0, n.jsx)(ew.Drawer, {
|
|
opened: l,
|
|
onClose: s,
|
|
trapFocus: !1,
|
|
position: "left",
|
|
size: "70%",
|
|
withCloseButton: !1,
|
|
classNames: { body: "h-full bg-white dark:bg-black" },
|
|
styles: { overlay: { zIndex: 400 }, inner: { zIndex: 401 } },
|
|
children: (0, n.jsxs)("div", {
|
|
className: "flex h-full flex-col gap-3 pt-[var(--safe-area-top)]",
|
|
children: [
|
|
i &&
|
|
c &&
|
|
(0, n.jsxs)("div", {
|
|
className:
|
|
"flex w-full items-center justify-start gap-3 overflow-hidden",
|
|
children: [
|
|
(0, n.jsx)("img", {
|
|
src: (0, eb.compressByFormatAndResizeWidth)(
|
|
c.avatar || eE.DEFAULT_AVATAR,
|
|
100,
|
|
),
|
|
alt: c?.nickname || "avatar",
|
|
className:
|
|
"h-[38px] w-[38px] rounded-full object-cover",
|
|
}),
|
|
(0, n.jsx)("div", {
|
|
className:
|
|
"flex flex-col justify-between overflow-hidden",
|
|
children: (0, n.jsx)("div", {
|
|
className: "truncate text-[13px] font-[500]",
|
|
children: c?.nickname,
|
|
}),
|
|
}),
|
|
],
|
|
}),
|
|
(0, n.jsxs)("div", {
|
|
onClick: () => {
|
|
if (d) {
|
|
(0, ed.openTeamPaywall)({ paywall: "group" }), s();
|
|
return;
|
|
}
|
|
(0, K.openVipModel)({
|
|
intent: "purchase_vip",
|
|
paywall: "personal",
|
|
}),
|
|
s();
|
|
},
|
|
className:
|
|
"flex cursor-pointer items-center justify-center gap-1 rounded-lg bg-[#303030] py-2",
|
|
children: [
|
|
(0, n.jsx)(eA.default, { className: "h-4 w-4" }),
|
|
(0, n.jsx)("span", {
|
|
className: "text-[14px] font-[500] text-[#FFAB0D]",
|
|
children: b,
|
|
}),
|
|
],
|
|
}),
|
|
(0, n.jsx)("div", {
|
|
className:
|
|
"hide-scrollbar flex flex-1 flex-col gap-2 overflow-y-auto",
|
|
children: C.map((e) =>
|
|
(0, n.jsxs)(
|
|
"div",
|
|
{
|
|
className:
|
|
"flex cursor-pointer items-center justify-between border-b border-[#E7E7E9] pb-[10px] pt-[14px] last:border-b-0 dark:border-[#2D2E33]",
|
|
onClick: e.onClick,
|
|
children: [
|
|
(0, n.jsxs)("div", {
|
|
className: "flex flex-1 items-center gap-3",
|
|
children: [e.icon, e.label],
|
|
}),
|
|
(0, n.jsx)(eR, {
|
|
className:
|
|
"h-[16px] w-[16px] text-[var(--color-pagination-text)]",
|
|
}),
|
|
],
|
|
},
|
|
e.label,
|
|
),
|
|
),
|
|
}),
|
|
i &&
|
|
(0, n.jsxs)("div", {
|
|
className:
|
|
"flex cursor-pointer items-center justify-between pb-[10px] pt-[14px]",
|
|
onClick: S,
|
|
children: [
|
|
(0, n.jsxs)("div", {
|
|
className: "flex items-center gap-3",
|
|
children: [
|
|
(0, n.jsx)(eI.Icons.LogOut, {
|
|
width: 20,
|
|
height: 20,
|
|
}),
|
|
"退出登录",
|
|
],
|
|
}),
|
|
(0, n.jsx)(eR, {
|
|
className:
|
|
"h-[16px] w-[16px] text-[var(--color-pagination-text)]",
|
|
}),
|
|
],
|
|
}),
|
|
(0, n.jsxs)("div", {
|
|
className: "flex flex-col gap-2 rounded-xl",
|
|
children: [
|
|
(0, n.jsx)("div", {
|
|
className:
|
|
"flex flex-wrap justify-start gap-2 text-[#A4A9B2] dark:text-[#FFFFFF99]",
|
|
children: Object.keys(eG).map((e) => {
|
|
let { Icon: t, url: a } = eG[e];
|
|
return (0, n.jsx)(
|
|
eN.default,
|
|
{
|
|
href: a,
|
|
target: "_blank",
|
|
className:
|
|
"flex h-[24px] w-[36px] items-center justify-center rounded-[4px] bg-[#F5F5F5] text-[#A4A9B2] dark:bg-[#3E3B4B] dark:text-[#FFFFFF99]",
|
|
children: (0, n.jsx)(t, { className: "" }),
|
|
},
|
|
e,
|
|
);
|
|
}),
|
|
}),
|
|
(0, n.jsxs)("div", {
|
|
className:
|
|
"text-[11px] leading-[16px] text-[#999] dark:text-[#fff]",
|
|
children: [
|
|
(0, n.jsx)(eN.default, {
|
|
href: "https://www.liblib.art/activities/468ad794ccc7408d81757fd91be003ec",
|
|
target: "_blank",
|
|
className: "text-[var(--color-primary)]",
|
|
children: "《用户协议》",
|
|
}),
|
|
(0, n.jsx)("span", { children: "|" }),
|
|
(0, n.jsx)(eN.default, {
|
|
href: "https://www.liblib.art/activities/7a354f41ead34f719eb49576e5292d00",
|
|
target: "_blank",
|
|
className: "text-[var(--color-primary)]",
|
|
children: "《隐私政策》",
|
|
}),
|
|
],
|
|
}),
|
|
(0, n.jsxs)("div", {
|
|
className:
|
|
"text-[11px] leading-[16px] text-[#999] dark:text-[#fff]",
|
|
suppressHydrationWarning: !0,
|
|
children: [new Date().getFullYear(), " © 哩布哩布AI"],
|
|
}),
|
|
(0, n.jsx)("div", {
|
|
className:
|
|
"text-[11px] leading-[16px] text-[#999] dark:text-[#fff]",
|
|
children: "北京奇点星宇科技有限公司",
|
|
}),
|
|
(0, n.jsx)("div", {
|
|
className:
|
|
"text-[11px] leading-[16px] text-[#999] dark:text-[#fff]",
|
|
children:
|
|
"地址: 北京市海淀区上地信息路12号1号楼3层B301室",
|
|
}),
|
|
(0, n.jsx)("div", {
|
|
className:
|
|
"text-[11px] leading-[16px] text-[#999] dark:text-[#fff]",
|
|
children: "电话: 010-62020220",
|
|
}),
|
|
(0, n.jsx)("div", {
|
|
className:
|
|
"text-[11px] leading-[16px] text-[#999] dark:text-[#fff]",
|
|
children: "沪ICP备2025147903号-7",
|
|
}),
|
|
],
|
|
}),
|
|
],
|
|
}),
|
|
}),
|
|
(0, n.jsx)(eT.default, { opened: g, onClose: () => v(!1) }),
|
|
],
|
|
});
|
|
}
|
|
function eK(e) {
|
|
let { children: t, variant: a = "default" } = e,
|
|
[l, r] = (0, o.useState)(0),
|
|
s = (0, o.useCallback)((e) => {
|
|
r(e);
|
|
}, []);
|
|
return (0, n.jsxs)(W, {
|
|
header: { height: G.HEADER_HEIGHT + l },
|
|
navbar: { width: 0, breakpoint: "md" },
|
|
className: (0, J.cn)(
|
|
"bg-bg-page text-fg-default",
|
|
"home" === a && "libtv-home-light",
|
|
),
|
|
style: { "--home-header-height": "0px" },
|
|
children: [
|
|
(0, n.jsxs)(W.Header, {
|
|
className: "bg-bg-page! border-none",
|
|
styles: {
|
|
header: { border: "none", backgroundColor: "var(--bg-page)" },
|
|
},
|
|
children: [
|
|
(0, n.jsx)(ep, { onHeightChange: s }),
|
|
(0, n.jsx)(eJ, {}),
|
|
],
|
|
}),
|
|
(0, n.jsx)(W.Main, {
|
|
className: "bg-bg-page",
|
|
children: (0, n.jsx)("div", {
|
|
className: "b768:px-[10px] px-3",
|
|
children: t,
|
|
}),
|
|
}),
|
|
],
|
|
});
|
|
}
|
|
e.s(["default", () => eK], 223703);
|
|
};
|
|
|
|
export default moduleFactory;
|