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

1208 lines
38 KiB
JavaScript

/*
* Extracted from browser-delivered Turbopack chunk: d209710bf7c02a33.1dff92b6be.js
* Module id: 912502
* For reading/searching only; this factory depends on the original Turbopack runtime.
*/
const moduleFactory = (e) => {
"use strict";
var t = e.i(374395),
r = e.i(511334),
n = e.i(54168),
a = e.i(750149);
e.i(23741);
var i = e.i(552659),
o = e.i(673135),
l = e.i(264458),
s = e.i(88112),
u = e.i(573442),
c = e.i(982209),
f = e.i(759313),
d = e.i(57129),
p = e.i(33419),
m = e.i(678788),
h = e.i(358379),
v = e.i(209141),
g = e.i(17940),
b = e.i(367233),
y = e.i(295598),
x = e.i(863265);
function w(e, t, r, n) {
return (
t ||
(r
? { motionName: "".concat(e, "-").concat(r) }
: n
? { motionName: n }
: null)
);
}
function k(e) {
return e.ownerDocument.defaultView;
}
function C(e) {
for (
var t = [],
r = null == e ? void 0 : e.parentElement,
n = ["hidden", "scroll", "clip", "auto"];
r;
) {
var a = k(r).getComputedStyle(r);
[a.overflowX, a.overflowY, a.overflow].some(function (e) {
return n.includes(e);
}) && t.push(r),
(r = r.parentElement);
}
return t;
}
function E(e) {
var t =
arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1;
return Number.isNaN(e) ? t : e;
}
function j(e) {
return E(parseFloat(e), 0);
}
function P(e, t) {
var r = (0, n.default)({}, e);
return (
(t || []).forEach(function (e) {
if (!(e instanceof HTMLBodyElement || e instanceof HTMLHtmlElement)) {
var t = k(e).getComputedStyle(e),
n = t.overflow,
a = t.overflowClipMargin,
i = t.borderTopWidth,
o = t.borderBottomWidth,
l = t.borderLeftWidth,
s = t.borderRightWidth,
u = e.getBoundingClientRect(),
c = e.offsetHeight,
f = e.clientHeight,
d = e.offsetWidth,
p = e.clientWidth,
m = j(i),
h = j(o),
v = j(l),
g = j(s),
b = E(Math.round((u.width / d) * 1e3) / 1e3),
y = E(Math.round((u.height / c) * 1e3) / 1e3),
x = m * y,
w = v * b,
C = 0,
P = 0;
if ("clip" === n) {
var F = j(a);
(C = F * b), (P = F * y);
}
var _ = u.x + w - C,
S = u.y + x - P,
N = _ + u.width + 2 * C - w - g * b - (d - p - v - g) * b,
O = S + u.height + 2 * P - x - h * y - (c - f - m - h) * y;
(r.left = Math.max(r.left, _)),
(r.top = Math.max(r.top, S)),
(r.right = Math.min(r.right, N)),
(r.bottom = Math.min(r.bottom, O));
}
}),
r
);
}
function F(e) {
var t =
arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,
r = "".concat(t),
n = r.match(/^(.*)\%$/);
return n ? e * (parseFloat(n[1]) / 100) : parseFloat(r);
}
function _(e, t) {
var r = (0, i.default)(t || [], 2),
n = r[0],
a = r[1];
return [F(e.width, n), F(e.height, a)];
}
function S() {
var e =
arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "";
return [e[0], e[1]];
}
function N(e, t) {
var r,
n = t[0],
a = t[1];
return (
(r = "t" === n ? e.y : "b" === n ? e.y + e.height : e.y + e.height / 2),
{
x: "l" === a ? e.x : "r" === a ? e.x + e.width : e.x + e.width / 2,
y: r,
}
);
}
function O(e, t) {
var r = { t: "b", b: "t", l: "r", r: "l" };
return e
.map(function (e, n) {
return n === t ? r[e] || "c" : e;
})
.join("");
}
var A = e.i(935492);
e.i(992734);
var M = [
"prefixCls",
"children",
"action",
"showAction",
"hideAction",
"popupVisible",
"defaultPopupVisible",
"onPopupVisibleChange",
"afterPopupVisibleChange",
"mouseEnterDelay",
"mouseLeaveDelay",
"focusDelay",
"blurDelay",
"mask",
"maskClosable",
"getPopupContainer",
"forceRender",
"autoDestroy",
"destroyPopupOnHide",
"popup",
"popupClassName",
"popupStyle",
"popupPlacement",
"builtinPlacements",
"popupAlign",
"zIndex",
"stretch",
"getPopupClassNameFromAlign",
"fresh",
"alignPoint",
"onPopupClick",
"onPopupAlign",
"arrow",
"popupMotion",
"maskMotion",
"popupTransitionName",
"popupAnimation",
"maskTransitionName",
"maskAnimation",
"className",
"getTriggerDOMNode",
];
let T = (function () {
var e =
arguments.length > 0 && void 0 !== arguments[0]
? arguments[0]
: o.default;
return h.forwardRef(function (t, r) {
var o,
j,
F,
T,
$,
I,
R,
D,
V,
L,
B,
z,
U,
H,
q,
W,
Y = t.prefixCls,
K = void 0 === Y ? "rc-trigger-popup" : Y,
G = t.children,
X = t.action,
Z = t.showAction,
J = t.hideAction,
Q = t.popupVisible,
ee = t.defaultPopupVisible,
et = t.onPopupVisibleChange,
er = t.afterPopupVisibleChange,
en = t.mouseEnterDelay,
ea = t.mouseLeaveDelay,
ei = void 0 === ea ? 0.1 : ea,
eo = t.focusDelay,
el = t.blurDelay,
es = t.mask,
eu = t.maskClosable,
ec = t.getPopupContainer,
ef = t.forceRender,
ed = t.autoDestroy,
ep = t.destroyPopupOnHide,
em = t.popup,
eh = t.popupClassName,
ev = t.popupStyle,
eg = t.popupPlacement,
eb = t.builtinPlacements,
ey = void 0 === eb ? {} : eb,
ex = t.popupAlign,
ew = t.zIndex,
ek = t.stretch,
eC = t.getPopupClassNameFromAlign,
eE = t.fresh,
ej = t.alignPoint,
eP = t.onPopupClick,
eF = t.onPopupAlign,
e_ = t.arrow,
eS = t.popupMotion,
eN = t.maskMotion,
eO = t.popupTransitionName,
eA = t.popupAnimation,
eM = t.maskTransitionName,
eT = t.maskAnimation,
e$ = t.className,
eI = t.getTriggerDOMNode,
eR = (0, a.default)(t, M),
eD = h.useState(!1),
eV = (0, i.default)(eD, 2),
eL = eV[0],
eB = eV[1];
(0, p.default)(function () {
eB((0, m.default)());
}, []);
var ez = h.useRef({}),
eU = h.useContext(b.default),
eH = h.useMemo(
function () {
return {
registerSubPopup: function (e, t) {
(ez.current[e] = t), null == eU || eU.registerSubPopup(e, t);
},
};
},
[eU],
),
eq = (0, d.default)(),
eW = h.useState(null),
eY = (0, i.default)(eW, 2),
eK = eY[0],
eG = eY[1],
eX = h.useRef(null),
eZ = (0, f.default)(function (e) {
(eX.current = e),
(0, u.isDOM)(e) && eK !== e && eG(e),
null == eU || eU.registerSubPopup(eq, e);
}),
eJ = h.useState(null),
eQ = (0, i.default)(eJ, 2),
e0 = eQ[0],
e1 = eQ[1],
e2 = h.useRef(null),
e5 = (0, f.default)(function (e) {
(0, u.isDOM)(e) && e0 !== e && (e1(e), (e2.current = e));
}),
e3 = h.Children.only(G),
e4 = (null == e3 ? void 0 : e3.props) || {},
e6 = {},
e7 = (0, f.default)(function (e) {
var t, r;
return (
(null == e0 ? void 0 : e0.contains(e)) ||
(null == (t = (0, c.getShadowRoot)(e0)) ? void 0 : t.host) ===
e ||
e === e0 ||
(null == eK ? void 0 : eK.contains(e)) ||
(null == (r = (0, c.getShadowRoot)(eK)) ? void 0 : r.host) ===
e ||
e === eK ||
Object.values(ez.current).some(function (t) {
return (null == t ? void 0 : t.contains(e)) || e === t;
})
);
}),
e8 = w(K, eS, eA, eO),
e9 = w(K, eN, eT, eM),
te = h.useState(ee || !1),
tt = (0, i.default)(te, 2),
tr = tt[0],
tn = tt[1],
ta = null != Q ? Q : tr,
ti = (0, f.default)(function (e) {
void 0 === Q && tn(e);
});
(0, p.default)(
function () {
tn(Q || !1);
},
[Q],
);
var to = h.useRef(ta);
to.current = ta;
var tl = h.useRef([]);
tl.current = [];
var ts = (0, f.default)(function (e) {
var t;
ti(e),
(null != (t = tl.current[tl.current.length - 1]) ? t : ta) !==
e && (tl.current.push(e), null == et || et(e));
}),
tu = h.useRef(),
tc = function () {
clearTimeout(tu.current);
},
tf = function (e) {
var t =
arguments.length > 1 && void 0 !== arguments[1]
? arguments[1]
: 0;
tc(),
0 === t
? ts(e)
: (tu.current = setTimeout(function () {
ts(e);
}, 1e3 * t));
};
h.useEffect(function () {
return tc;
}, []);
var td = h.useState(!1),
tp = (0, i.default)(td, 2),
tm = tp[0],
th = tp[1];
(0, p.default)(
function (e) {
(!e || ta) && th(!0);
},
[ta],
);
var tv = h.useState(null),
tg = (0, i.default)(tv, 2),
tb = tg[0],
ty = tg[1],
tx = h.useState(null),
tw = (0, i.default)(tx, 2),
tk = tw[0],
tC = tw[1],
tE = function (e) {
tC([e.clientX, e.clientY]);
},
tj =
((o = ej && null !== tk ? tk : e0),
(j = h.useState({
ready: !1,
offsetX: 0,
offsetY: 0,
offsetR: 0,
offsetB: 0,
arrowX: 0,
arrowY: 0,
scaleX: 1,
scaleY: 1,
align: ey[eg] || {},
})),
(T = (F = (0, i.default)(j, 2))[0]),
($ = F[1]),
(I = h.useRef(0)),
(R = h.useMemo(
function () {
return eK ? C(eK) : [];
},
[eK],
)),
(D = h.useRef({})),
ta || (D.current = {}),
(V = (0, f.default)(function () {
if (eK && o && ta) {
var e = eK.ownerDocument,
t = k(eK),
r = t.getComputedStyle(eK).position,
a = eK.style.left,
l = eK.style.top,
s = eK.style.right,
c = eK.style.bottom,
f = eK.style.overflow,
d = (0, n.default)((0, n.default)({}, ey[eg]), ex),
p = e.createElement("div");
if (
(null == (b = eK.parentElement) || b.appendChild(p),
(p.style.left = "".concat(eK.offsetLeft, "px")),
(p.style.top = "".concat(eK.offsetTop, "px")),
(p.style.position = r),
(p.style.height = "".concat(eK.offsetHeight, "px")),
(p.style.width = "".concat(eK.offsetWidth, "px")),
(eK.style.left = "0"),
(eK.style.top = "0"),
(eK.style.right = "auto"),
(eK.style.bottom = "auto"),
(eK.style.overflow = "hidden"),
Array.isArray(o))
)
j = { x: o[0], y: o[1], width: 0, height: 0 };
else {
var m,
h,
v,
g,
b,
y,
w,
C,
j,
F,
A,
M = o.getBoundingClientRect();
(M.x = null != (F = M.x) ? F : M.left),
(M.y = null != (A = M.y) ? A : M.top),
(j = { x: M.x, y: M.y, width: M.width, height: M.height });
}
var T = eK.getBoundingClientRect(),
I = t.getComputedStyle(eK),
V = I.height,
L = I.width;
(T.x = null != (y = T.x) ? y : T.left),
(T.y = null != (w = T.y) ? w : T.top);
var B = e.documentElement,
z = B.clientWidth,
U = B.clientHeight,
H = B.scrollWidth,
q = B.scrollHeight,
W = B.scrollTop,
Y = B.scrollLeft,
K = T.height,
G = T.width,
X = j.height,
Z = j.width,
J = d.htmlRegion,
Q = "visible",
ee = "visibleFirst";
"scroll" !== J && J !== ee && (J = Q);
var et = J === ee,
er = P({ left: -Y, top: -W, right: H - Y, bottom: q - W }, R),
en = P({ left: 0, top: 0, right: z, bottom: U }, R),
ea = J === Q ? en : er,
ei = et ? en : ea;
(eK.style.left = "auto"),
(eK.style.top = "auto"),
(eK.style.right = "0"),
(eK.style.bottom = "0");
var eo = eK.getBoundingClientRect();
(eK.style.left = a),
(eK.style.top = l),
(eK.style.right = s),
(eK.style.bottom = c),
(eK.style.overflow = f),
null == (C = eK.parentElement) || C.removeChild(p);
var el = E(Math.round((G / parseFloat(L)) * 1e3) / 1e3),
es = E(Math.round((K / parseFloat(V)) * 1e3) / 1e3);
if (
!(
0 === el ||
0 === es ||
((0, u.isDOM)(o) && !(0, x.default)(o))
)
) {
var eu = d.offset,
ec = d.targetOffset,
ef = _(T, eu),
ed = (0, i.default)(ef, 2),
ep = ed[0],
em = ed[1],
eh = _(j, ec),
ev = (0, i.default)(eh, 2),
eb = ev[0],
ew = ev[1];
(j.x -= eb), (j.y -= ew);
var ek = d.points || [],
eC = (0, i.default)(ek, 2),
eE = eC[0],
ej = S(eC[1]),
eP = S(eE),
e_ = N(j, ej),
eS = N(T, eP),
eN = (0, n.default)({}, d),
eO = e_.x - eS.x + ep,
eA = e_.y - eS.y + em,
eM = tf(eO, eA),
eT = tf(eO, eA, en),
e$ = N(j, ["t", "l"]),
eI = N(T, ["t", "l"]),
eR = N(j, ["b", "r"]),
eD = N(T, ["b", "r"]),
eV = d.overflow || {},
eL = eV.adjustX,
eB = eV.adjustY,
ez = eV.shiftX,
eU = eV.shiftY,
eH = function (e) {
return "boolean" == typeof e ? e : e >= 0;
};
td();
var eq = eH(eB),
eW = eP[0] === ej[0];
if (eq && "t" === eP[0] && (h > ei.bottom || D.current.bt)) {
var eY = eA;
eW ? (eY -= K - X) : (eY = e$.y - eD.y - em);
var eG = tf(eO, eY),
eX = tf(eO, eY, en);
eG > eM || (eG === eM && (!et || eX >= eT))
? ((D.current.bt = !0),
(eA = eY),
(em = -em),
(eN.points = [O(eP, 0), O(ej, 0)]))
: (D.current.bt = !1);
}
if (eq && "b" === eP[0] && (m < ei.top || D.current.tb)) {
var eZ = eA;
eW ? (eZ += K - X) : (eZ = eR.y - eI.y - em);
var eJ = tf(eO, eZ),
eQ = tf(eO, eZ, en);
eJ > eM || (eJ === eM && (!et || eQ >= eT))
? ((D.current.tb = !0),
(eA = eZ),
(em = -em),
(eN.points = [O(eP, 0), O(ej, 0)]))
: (D.current.tb = !1);
}
var e0 = eH(eL),
e1 = eP[1] === ej[1];
if (e0 && "l" === eP[1] && (g > ei.right || D.current.rl)) {
var e2 = eO;
e1 ? (e2 -= G - Z) : (e2 = e$.x - eD.x - ep);
var e5 = tf(e2, eA),
e3 = tf(e2, eA, en);
e5 > eM || (e5 === eM && (!et || e3 >= eT))
? ((D.current.rl = !0),
(eO = e2),
(ep = -ep),
(eN.points = [O(eP, 1), O(ej, 1)]))
: (D.current.rl = !1);
}
if (e0 && "r" === eP[1] && (v < ei.left || D.current.lr)) {
var e4 = eO;
e1 ? (e4 += G - Z) : (e4 = eR.x - eI.x - ep);
var e6 = tf(e4, eA),
e7 = tf(e4, eA, en);
e6 > eM || (e6 === eM && (!et || e7 >= eT))
? ((D.current.lr = !0),
(eO = e4),
(ep = -ep),
(eN.points = [O(eP, 1), O(ej, 1)]))
: (D.current.lr = !1);
}
td();
var e8 = !0 === ez ? 0 : ez;
"number" == typeof e8 &&
(v < en.left &&
((eO -= v - en.left - ep),
j.x + Z < en.left + e8 && (eO += j.x - en.left + Z - e8)),
g > en.right &&
((eO -= g - en.right - ep),
j.x > en.right - e8 && (eO += j.x - en.right + e8)));
var e9 = !0 === eU ? 0 : eU;
"number" == typeof e9 &&
(m < en.top &&
((eA -= m - en.top - em),
j.y + X < en.top + e9 && (eA += j.y - en.top + X - e9)),
h > en.bottom &&
((eA -= h - en.bottom - em),
j.y > en.bottom - e9 && (eA += j.y - en.bottom + e9)));
var te = T.x + eO,
tt = T.y + eA,
tr = j.x,
tn = j.y,
ti = Math.max(te, tr),
to = Math.min(te + G, tr + Z),
tl = Math.max(tt, tn),
ts = Math.min(tt + K, tn + X);
null == eF || eF(eK, eN);
var tu = eo.right - T.x - (eO + T.width),
tc = eo.bottom - T.y - (eA + T.height);
1 === el && ((eO = Math.floor(eO)), (tu = Math.floor(tu))),
1 === es && ((eA = Math.floor(eA)), (tc = Math.floor(tc))),
$({
ready: !0,
offsetX: eO / el,
offsetY: eA / es,
offsetR: tu / el,
offsetB: tc / es,
arrowX: ((ti + to) / 2 - te) / el,
arrowY: ((tl + ts) / 2 - tt) / es,
scaleX: el,
scaleY: es,
align: eN,
});
}
function tf(e, t) {
var r =
arguments.length > 2 && void 0 !== arguments[2]
? arguments[2]
: ea,
n = T.x + e,
a = T.y + t,
i = Math.max(n, r.left),
o = Math.max(a, r.top);
return Math.max(
0,
(Math.min(n + G, r.right) - i) *
(Math.min(a + K, r.bottom) - o),
);
}
function td() {
(h = (m = T.y + eA) + K), (g = (v = T.x + eO) + G);
}
}
})),
(L = function () {
$(function (e) {
return (0, n.default)((0, n.default)({}, e), {}, { ready: !1 });
});
}),
(0, p.default)(L, [eg]),
(0, p.default)(
function () {
ta || L();
},
[ta],
),
[
T.ready,
T.offsetX,
T.offsetY,
T.offsetR,
T.offsetB,
T.arrowX,
T.arrowY,
T.scaleX,
T.scaleY,
T.align,
function () {
I.current += 1;
var e = I.current;
Promise.resolve().then(function () {
I.current === e && V();
});
},
]),
tP = (0, i.default)(tj, 11),
tF = tP[0],
t_ = tP[1],
tS = tP[2],
tN = tP[3],
tO = tP[4],
tA = tP[5],
tM = tP[6],
tT = tP[7],
t$ = tP[8],
tI = tP[9],
tR = tP[10],
tD = (0, y.default)(eL, void 0 === X ? "hover" : X, Z, J),
tV = (0, i.default)(tD, 2),
tL = tV[0],
tB = tV[1],
tz = tL.has("click"),
tU = tB.has("click") || tB.has("contextMenu"),
tH = (0, f.default)(function () {
tm || tR();
});
(B = function () {
to.current && ej && tU && tf(!1);
}),
(0, p.default)(
function () {
if (ta && e0 && eK) {
var e = C(e0),
t = C(eK),
r = k(eK),
n = new Set([r].concat((0, A.default)(e), (0, A.default)(t)));
function a() {
tH(), B();
}
return (
n.forEach(function (e) {
e.addEventListener("scroll", a, { passive: !0 });
}),
r.addEventListener("resize", a, { passive: !0 }),
tH(),
function () {
n.forEach(function (e) {
e.removeEventListener("scroll", a),
r.removeEventListener("resize", a);
});
}
);
}
},
[ta, e0, eK],
),
(0, p.default)(
function () {
tH();
},
[tk, eg],
),
(0, p.default)(
function () {
ta && !(null != ey && ey[eg]) && tH();
},
[JSON.stringify(ex)],
);
var tq = h.useMemo(
function () {
var e = (function (e, t, r, n) {
for (
var a = r.points, i = Object.keys(e), o = 0;
o < i.length;
o += 1
) {
var l,
s = i[o];
if (
(function () {
var e =
arguments.length > 0 && void 0 !== arguments[0]
? arguments[0]
: [],
t =
arguments.length > 1 && void 0 !== arguments[1]
? arguments[1]
: [],
r = arguments.length > 2 ? arguments[2] : void 0;
return r ? e[0] === t[0] : e[0] === t[0] && e[1] === t[1];
})(null == (l = e[s]) ? void 0 : l.points, a, n)
)
return "".concat(t, "-placement-").concat(s);
}
return "";
})(ey, K, tI, ej);
return (0, l.default)(e, null == eC ? void 0 : eC(tI));
},
[tI, eC, ey, K, ej],
);
h.useImperativeHandle(r, function () {
return {
nativeElement: e2.current,
popupElement: eX.current,
forceAlign: tH,
};
});
var tW = h.useState(0),
tY = (0, i.default)(tW, 2),
tK = tY[0],
tG = tY[1],
tX = h.useState(0),
tZ = (0, i.default)(tX, 2),
tJ = tZ[0],
tQ = tZ[1],
t0 = function () {
if (ek && e0) {
var e = e0.getBoundingClientRect();
tG(e.width), tQ(e.height);
}
};
function t1(e, t, r, n) {
e6[e] = function (a) {
var i;
null == n || n(a), tf(t, r);
for (
var o = arguments.length, l = Array(o > 1 ? o - 1 : 0), s = 1;
s < o;
s++
)
l[s - 1] = arguments[s];
null == (i = e4[e]) || i.call.apply(i, [e4, a].concat(l));
};
}
(0, p.default)(
function () {
tb && (tR(), tb(), ty(null));
},
[tb],
),
(tz || tU) &&
(e6.onClick = function (e) {
var t;
to.current && tU ? tf(!1) : !to.current && tz && (tE(e), tf(!0));
for (
var r = arguments.length, n = Array(r > 1 ? r - 1 : 0), a = 1;
a < r;
a++
)
n[a - 1] = arguments[a];
null == (t = e4.onClick) || t.call.apply(t, [e4, e].concat(n));
});
var t2 =
((z = void 0 === eu || eu),
((U = h.useRef(ta)).current = ta),
(H = h.useRef(!1)),
h.useEffect(
function () {
if (tU && eK && (!es || z)) {
var e = function () {
H.current = !1;
},
t = function (e) {
var t;
!U.current ||
e7(
(null == (t = e.composedPath) ||
null == (t = t.call(e))
? void 0
: t[0]) || e.target,
) ||
H.current ||
tf(!1);
},
r = k(eK);
r.addEventListener("pointerdown", e, !0),
r.addEventListener("mousedown", t, !0),
r.addEventListener("contextmenu", t, !0);
var n = (0, c.getShadowRoot)(e0);
return (
n &&
(n.addEventListener("mousedown", t, !0),
n.addEventListener("contextmenu", t, !0)),
function () {
r.removeEventListener("pointerdown", e, !0),
r.removeEventListener("mousedown", t, !0),
r.removeEventListener("contextmenu", t, !0),
n &&
(n.removeEventListener("mousedown", t, !0),
n.removeEventListener("contextmenu", t, !0));
}
);
}
},
[tU, e0, eK, es, z],
),
function () {
H.current = !0;
}),
t5 = tL.has("hover"),
t3 = tB.has("hover");
t5 &&
(t1("onMouseEnter", !0, en, function (e) {
tE(e);
}),
t1("onPointerEnter", !0, en, function (e) {
tE(e);
}),
(q = function (e) {
(ta || tm) && null != eK && eK.contains(e.target) && tf(!0, en);
}),
ej &&
(e6.onMouseMove = function (e) {
var t;
null == (t = e4.onMouseMove) || t.call(e4, e);
})),
t3 &&
(t1("onMouseLeave", !1, ei),
t1("onPointerLeave", !1, ei),
(W = function () {
tf(!1, ei);
})),
tL.has("focus") && t1("onFocus", !0, eo),
tB.has("focus") && t1("onBlur", !1, el),
tL.has("contextMenu") &&
(e6.onContextMenu = function (e) {
var t;
to.current && tB.has("contextMenu") ? tf(!1) : (tE(e), tf(!0)),
e.preventDefault();
for (
var r = arguments.length, n = Array(r > 1 ? r - 1 : 0), a = 1;
a < r;
a++
)
n[a - 1] = arguments[a];
null == (t = e4.onContextMenu) ||
t.call.apply(t, [e4, e].concat(n));
}),
e$ && (e6.className = (0, l.default)(e4.className, e$));
var t4 = h.useRef(!1);
t4.current || (t4.current = ef || ta || tm);
var t6 = (0, n.default)((0, n.default)({}, e4), e6),
t7 = {};
[
"onContextMenu",
"onClick",
"onMouseDown",
"onTouchStart",
"onMouseEnter",
"onMouseLeave",
"onFocus",
"onBlur",
].forEach(function (e) {
eR[e] &&
(t7[e] = function () {
for (var t, r = arguments.length, n = Array(r), a = 0; a < r; a++)
n[a] = arguments[a];
null == (t = t6[e]) || t.call.apply(t, [t6].concat(n)),
eR[e].apply(eR, n);
});
});
var t8 = h.cloneElement(e3, (0, n.default)((0, n.default)({}, t6), t7)),
t9 = e_ ? (0, n.default)({}, !0 !== e_ ? e_ : {}) : null;
return h.createElement(
h.Fragment,
null,
h.createElement(
s.default,
{
disabled: !ta,
ref: e5,
onResize: function () {
t0(), tH();
},
},
h.createElement(g.default, { getTriggerDOMNode: eI }, t8),
),
t4.current &&
h.createElement(
b.default.Provider,
{ value: eH },
h.createElement(v.default, {
portal: e,
ref: eZ,
prefixCls: K,
popup: em,
className: (0, l.default)(eh, tq),
style: ev,
target: e0,
onMouseEnter: q,
onMouseLeave: W,
onPointerEnter: q,
zIndex: ew,
open: ta,
keepDom: tm,
fresh: eE,
onClick: eP,
onPointerDownCapture: t2,
mask: es,
motion: e8,
maskMotion: e9,
onVisibleChanged: function (e) {
th(!1), tR(), null == er || er(e);
},
onPrepare: function () {
return new Promise(function (e) {
t0(),
ty(function () {
return e;
});
});
},
forceRender: ef,
autoDestroy: ed || ep || !1,
getPopupContainer: ec,
align: tI,
arrow: t9,
arrowPos: { x: tA, y: tM },
ready: tF,
offsetX: t_,
offsetY: tS,
offsetR: tN,
offsetB: tO,
onAlign: tH,
stretch: ek,
targetWidth: tK / tT,
targetHeight: tJ / t$,
}),
),
);
});
})(o.default);
e.s(["default", 0, T], 912502);
var $ = { shiftX: 64, adjustY: 1 },
I = { adjustX: 1, shiftY: !0 },
R = [0, 0],
D = {
left: {
points: ["cr", "cl"],
overflow: I,
offset: [-4, 0],
targetOffset: R,
},
right: {
points: ["cl", "cr"],
overflow: I,
offset: [4, 0],
targetOffset: R,
},
top: {
points: ["bc", "tc"],
overflow: $,
offset: [0, -4],
targetOffset: R,
},
bottom: {
points: ["tc", "bc"],
overflow: $,
offset: [0, 4],
targetOffset: R,
},
topLeft: {
points: ["bl", "tl"],
overflow: $,
offset: [0, -4],
targetOffset: R,
},
leftTop: {
points: ["tr", "tl"],
overflow: I,
offset: [-4, 0],
targetOffset: R,
},
topRight: {
points: ["br", "tr"],
overflow: $,
offset: [0, -4],
targetOffset: R,
},
rightTop: {
points: ["tl", "tr"],
overflow: I,
offset: [4, 0],
targetOffset: R,
},
bottomRight: {
points: ["tr", "br"],
overflow: $,
offset: [0, 4],
targetOffset: R,
},
rightBottom: {
points: ["bl", "br"],
overflow: I,
offset: [4, 0],
targetOffset: R,
},
bottomLeft: {
points: ["tl", "bl"],
overflow: $,
offset: [0, 4],
targetOffset: R,
},
leftBottom: {
points: ["br", "bl"],
overflow: I,
offset: [-4, 0],
targetOffset: R,
},
},
V = [
"overlayClassName",
"trigger",
"mouseEnterDelay",
"mouseLeaveDelay",
"overlayStyle",
"prefixCls",
"children",
"onVisibleChange",
"afterVisibleChange",
"transitionName",
"animation",
"motion",
"placement",
"align",
"destroyTooltipOnHide",
"defaultVisible",
"getTooltipContainer",
"overlayInnerStyle",
"arrowContent",
"overlay",
"id",
"showArrow",
"classNames",
"styles",
];
let L = (0, h.forwardRef)(function (e, i) {
var o,
s,
u,
c = e.overlayClassName,
f = e.trigger,
p = e.mouseEnterDelay,
m = e.mouseLeaveDelay,
v = e.overlayStyle,
g = e.prefixCls,
b = void 0 === g ? "rc-tooltip" : g,
y = e.children,
x = e.onVisibleChange,
w = e.afterVisibleChange,
k = e.transitionName,
C = e.animation,
E = e.motion,
j = e.placement,
P = e.align,
F = e.destroyTooltipOnHide,
_ = e.defaultVisible,
S = e.getTooltipContainer,
N = e.overlayInnerStyle,
O = (e.arrowContent, e.overlay),
A = e.id,
M = e.showArrow,
$ = e.classNames,
I = e.styles,
R = (0, a.default)(e, V),
L = (0, d.default)(A),
B = (0, h.useRef)(null);
(0, h.useImperativeHandle)(i, function () {
return B.current;
});
var z = (0, n.default)({}, R);
return (
"visible" in e && (z.popupVisible = e.visible),
h.createElement(
T,
(0, r.default)(
{
popupClassName: (0, l.default)(c, null == $ ? void 0 : $.root),
prefixCls: b,
popup: function () {
return h.createElement(
t.default,
{
key: "content",
prefixCls: b,
id: L,
bodyClassName: null == $ ? void 0 : $.body,
overlayInnerStyle: (0, n.default)(
(0, n.default)({}, N),
null == I ? void 0 : I.body,
),
},
O,
);
},
action: void 0 === f ? ["hover"] : f,
builtinPlacements: D,
popupPlacement: void 0 === j ? "right" : j,
ref: B,
popupAlign: void 0 === P ? {} : P,
getPopupContainer: S,
onPopupVisibleChange: x,
afterPopupVisibleChange: w,
popupTransitionName: k,
popupAnimation: C,
popupMotion: E,
defaultPopupVisible: _,
autoDestroy: void 0 !== F && F,
mouseLeaveDelay: void 0 === m ? 0.1 : m,
popupStyle: (0, n.default)(
(0, n.default)({}, v),
null == I ? void 0 : I.root,
),
mouseEnterDelay: void 0 === p ? 0 : p,
arrow: void 0 === M || M,
},
z,
),
((s = (null == (o = h.Children.only(y)) ? void 0 : o.props) || {}),
(u = (0, n.default)(
(0, n.default)({}, s),
{},
{ "aria-describedby": O ? L : null },
)),
h.cloneElement(y, u)),
)
);
});
e.s(["default", 0, L], 98464);
};
export default moduleFactory;