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

403 lines
11 KiB
JavaScript

/*
* Extracted from browser-delivered Turbopack chunk: 2af97222b2982846.43dcb21113.js
* Module id: 129128
* For reading/searching only; this factory depends on the original Turbopack runtime.
*/
const moduleFactory = (e) => {
"use strict";
var t = e.i(462214),
r = e.i(358379),
o = e.i(192830),
s = e.i(403557),
n = e.i(855698),
i = e.i(938202);
e.i(7284);
var a = e.i(620428),
l = e.i(479324),
c = e.i(450943),
u = e.i(511859),
d = e.i(124859),
p = e.i(593307),
m = e.i(525230),
g = {
root: "m_5f75b09e",
body: "m_5f6e695e",
labelWrapper: "m_d3ea56bb",
label: "m_8ee546b8",
description: "m_328f68c0",
error: "m_8e8a99cc",
};
let f = (0, r.forwardRef)(
(
{
__staticSelector: e,
__stylesApiProps: r,
className: o,
classNames: s,
styles: i,
unstyled: a,
children: l,
label: u,
description: p,
id: f,
disabled: h,
error: v,
size: b,
labelPosition: C = "left",
bodyElement: y = "div",
labelElement: w = "label",
variant: S,
style: x,
vars: F,
mod: I,
attributes: k,
...z
},
_,
) => {
let j = (0, c.useStyles)({
name: e,
props: r,
className: o,
style: x,
classes: g,
classNames: s,
styles: i,
unstyled: a,
attributes: k,
});
return (0, t.jsx)(d.Box, {
...j("root"),
ref: _,
__vars: {
"--label-fz": (0, n.getFontSize)(b),
"--label-lh": (0, n.getSize)(b, "label-lh"),
},
mod: [{ "label-position": C }, I],
variant: S,
size: b,
...z,
children: (0, t.jsxs)(d.Box, {
component: y,
htmlFor: "label" === y ? f : void 0,
...j("body"),
children: [
l,
(0, t.jsxs)("div", {
...j("labelWrapper"),
"data-disabled": h || void 0,
children: [
u &&
(0, t.jsx)(d.Box, {
component: w,
htmlFor: "label" === w ? f : void 0,
...j("label"),
"data-disabled": h || void 0,
children: u,
}),
p &&
(0, t.jsx)(m.Input.Description, {
size: b,
__inheritStyles: !1,
...j("description"),
children: p,
}),
v &&
"boolean" != typeof v &&
(0, t.jsx)(m.Input.Error, {
size: b,
__inheritStyles: !1,
...j("error"),
children: v,
}),
],
}),
],
}),
});
},
);
(f.displayName = "@mantine/core/InlineInput"),
e.s(["InlineInput", () => f, "InlineInputClasses", () => g], 11010);
var h = {
root: "m_5f93f3bb",
input: "m_926b4011",
track: "m_9307d992",
thumb: "m_93039a1d",
trackLabel: "m_8277e082",
};
let v = (0, r.createContext)(null),
b = v.Provider;
var C = e.i(710242);
function y({ children: e, role: r }) {
let o = (0, C.useInputWrapperContext)();
return o
? (0, t.jsx)("div", {
role: r,
"aria-labelledby": o.labelId,
"aria-describedby": o.describedBy,
children: e,
})
: (0, t.jsx)(t.Fragment, { children: e });
}
e.s(["InputsGroupFieldset", () => y], 129128);
let w = (0, p.factory)((e, r) => {
let {
value: o,
defaultValue: n,
onChange: i,
size: a,
wrapperProps: c,
children: u,
readOnly: d,
disabled: p,
...g
} = (0, l.useProps)("SwitchGroup", null, e),
[f, h] = (0, s.useUncontrolled)({
value: o,
defaultValue: n,
finalValue: [],
onChange: i,
});
return (0, t.jsx)(b, {
value: {
value: f,
onChange: (e) => {
let t = e.currentTarget.value;
d || h(f.includes(t) ? f.filter((e) => e !== t) : [...f, t]);
},
size: a,
disabled: p,
},
children: (0, t.jsx)(m.Input.Wrapper, {
size: a,
ref: r,
...c,
...g,
labelElement: "div",
__staticSelector: "SwitchGroup",
children: (0, t.jsx)(y, { role: "group", children: u }),
}),
});
});
(w.classes = m.Input.Wrapper.classes),
(w.displayName = "@mantine/core/SwitchGroup");
let S = { labelPosition: "right", withThumbIndicator: !0 },
x = (0, i.createVarsResolver)((e, { radius: t, color: r, size: o }) => ({
root: {
"--switch-radius": void 0 === t ? void 0 : (0, n.getRadius)(t),
"--switch-height": (0, n.getSize)(o, "switch-height"),
"--switch-width": (0, n.getSize)(o, "switch-width"),
"--switch-thumb-size": (0, n.getSize)(o, "switch-thumb-size"),
"--switch-label-font-size": (0, n.getSize)(
o,
"switch-label-font-size",
),
"--switch-track-label-padding": (0, n.getSize)(
o,
"switch-track-label-padding",
),
"--switch-color": r ? (0, a.getThemeColor)(r, e) : void 0,
},
})),
F = (0, p.factory)((e, n) => {
let i = (0, l.useProps)("Switch", S, e),
{
classNames: a,
className: p,
style: m,
styles: g,
unstyled: b,
vars: C,
color: y,
label: w,
offLabel: F,
onLabel: I,
id: k,
size: z,
radius: _,
wrapperProps: j,
thumbIcon: P,
checked: B,
defaultChecked: E,
onChange: N,
labelPosition: T,
description: A,
error: L,
disabled: W,
variant: R,
rootRef: U,
mod: $,
withThumbIndicator: O,
attributes: D,
...M
} = i,
G = (0, r.useContext)(v),
V = z || G?.size,
J = (0, c.useStyles)({
name: "Switch",
props: i,
classes: h,
className: p,
style: m,
classNames: a,
styles: g,
unstyled: b,
attributes: D,
vars: C,
varsResolver: x,
}),
{ styleProps: q, rest: Z } = (0, u.extractStyleProps)(M),
K = (0, o.useId)(k),
H = {
checked: G?.value.includes(Z.value) ?? B,
onChange: (e) => {
G?.onChange(e), N?.(e);
},
disabled: G?.disabled ?? W,
},
[Q, X] = (0, s.useUncontrolled)({
value: H.checked ?? B,
defaultValue: E,
finalValue: !1,
});
return (0, t.jsxs)(f, {
...J("root"),
__staticSelector: "Switch",
__stylesApiProps: i,
id: K,
size: V,
labelPosition: T,
label: w,
description: A,
error: L,
disabled: H.disabled,
bodyElement: "label",
labelElement: "span",
classNames: a,
styles: g,
unstyled: b,
"data-checked": H.checked,
variant: R,
ref: U,
mod: $,
...q,
...j,
children: [
(0, t.jsx)("input", {
...Z,
...H,
checked: Q,
"data-checked": H.checked,
onChange: (e) => {
H.onChange?.(e), X(e.currentTarget.checked);
},
id: K,
ref: n,
type: "checkbox",
role: "switch",
...J("input"),
}),
(0, t.jsxs)(d.Box, {
"aria-hidden": "true",
component: "span",
mod: {
error: L,
"label-position": T,
"without-labels": !I && !F,
},
...J("track"),
children: [
(0, t.jsx)(d.Box, {
component: "span",
mod: { "reduce-motion": !0, "with-thumb-indicator": O && !P },
...J("thumb"),
children: P,
}),
(0, t.jsx)("span", { ...J("trackLabel"), children: Q ? I : F }),
],
}),
],
});
});
(F.classes = { ...h, ...g }),
(F.displayName = "@mantine/core/Switch"),
(F.Group = w);
let I = {
backgroundColor: "var(--switch-track-bg)",
borderColor: "transparent",
},
k = {
backgroundColor: "var(--switch-track-bg-checked)",
borderColor: "transparent",
},
z = {
backgroundColor: "var(--switch-thumb-bg)",
borderColor: "transparent",
},
_ = {
backgroundColor: "var(--switch-track-bg)",
borderColor: "transparent",
opacity: 0.5,
},
j = {
backgroundColor: "var(--switch-thumb-bg)",
borderColor: "transparent",
};
function P({
compact: e,
checked: o,
disabled: s,
styles: n,
vars: i,
size: a = "sm",
...l
}) {
let c = (0, r.useMemo)(() => {
let e = s ? _ : o ? k : I,
t = s ? j : z;
return "function" == typeof n
? (r, o, s) => {
let i = n(r, o, s);
return {
...i,
track: { ...e, ...i?.track },
thumb: { ...t, ...i?.thumb },
};
}
: {
...n,
track: { ...e, ...n?.track },
thumb: { ...t, ...n?.thumb },
};
}, [o, s, n]),
u = (0, r.useMemo)(
() =>
e
? (e, t, r) => ({
root: {
"--switch-height": "14px",
"--switch-width": "24.5px",
"--switch-thumb-size": "10.5px",
...("function" == typeof i ? i(e, t, r)?.root : void 0),
},
})
: i,
[e, i],
);
return (0, t.jsx)(F, {
checked: o,
disabled: s,
size: e ? "xs" : a,
withThumbIndicator: !1,
styles: c,
vars: u,
...l,
});
}
e.s(["Switch", () => P], 384916);
};
export default moduleFactory;