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

310 lines
10 KiB
JavaScript

/*
* Extracted from browser-delivered Turbopack chunk: d209710bf7c02a33.1dff92b6be.js
* Module id: 5213
* For reading/searching only; this factory depends on the original Turbopack runtime.
*/
const moduleFactory = (e) => {
"use strict";
e.i(6177);
var t = e.i(723378);
function r(e) {
let { sizePopupArrow: t, borderRadiusXS: r, borderRadiusOuter: n } = e,
a = t / 2,
i = n / Math.sqrt(2),
o = a - n * (1 - 1 / Math.sqrt(2)),
l = a - (1 / Math.sqrt(2)) * r,
s = n * (Math.sqrt(2) - 1) + (1 / Math.sqrt(2)) * r,
u = a * Math.sqrt(2) + n * (Math.sqrt(2) - 2),
c = n * (Math.sqrt(2) - 1),
f = `polygon(${c}px 100%, 50% ${c}px, ${2 * a - c}px 100%, ${c}px 100%)`;
return {
arrowShadowWidth: u,
arrowPath: `path('M 0 ${a} A ${n} ${n} 0 0 0 ${i} ${o} L ${l} ${s} A ${r} ${r} 0 0 1 ${2 * a - l} ${s} L ${2 * a - i} ${o} A ${n} ${n} 0 0 0 ${2 * a - 0} ${a} Z')`,
arrowPolygon: f,
};
}
let n = (e, r, n) => {
let {
sizePopupArrow: a,
arrowPolygon: i,
arrowPath: o,
arrowShadowWidth: l,
borderRadiusXS: s,
calc: u,
} = e;
return {
pointerEvents: "none",
width: a,
height: a,
overflow: "hidden",
"&::before": {
position: "absolute",
bottom: 0,
insetInlineStart: 0,
width: a,
height: u(a).div(2).equal(),
background: r,
clipPath: { _multi_value_: !0, value: [i, o] },
content: '""',
},
"&::after": {
content: '""',
position: "absolute",
width: l,
height: l,
bottom: 0,
insetInline: 0,
margin: "auto",
borderRadius: { _skip_check_: !0, value: `0 0 ${(0, t.unit)(s)} 0` },
transform: "translateY(50%) rotate(-135deg)",
boxShadow: n,
zIndex: 0,
background: "transparent",
},
};
};
function a(e) {
let { contentRadius: t, limitVerticalRadius: r } = e,
n = t > 12 ? t + 2 : 12;
return { arrowOffsetHorizontal: n, arrowOffsetVertical: r ? 8 : n };
}
function i(e, r, a) {
var i, o, l, s, u, c, f, d;
let {
componentCls: p,
boxShadowPopoverArrow: m,
arrowOffsetVertical: h,
arrowOffsetHorizontal: v,
} = e,
{
arrowDistance: g = 0,
arrowPlacement: b = { left: !0, right: !0, top: !0, bottom: !0 },
} = a || {};
return {
[p]: Object.assign(
Object.assign(
Object.assign(
Object.assign(
{
[`${p}-arrow`]: [
Object.assign(
Object.assign(
{ position: "absolute", zIndex: 1, display: "block" },
n(e, r, m),
),
{ "&:before": { background: r } },
),
],
},
((i = !!b.top),
(o = {
[`&-placement-top > ${p}-arrow,&-placement-topLeft > ${p}-arrow,&-placement-topRight > ${p}-arrow`]:
{ bottom: g, transform: "translateY(100%) rotate(180deg)" },
[`&-placement-top > ${p}-arrow`]: {
left: { _skip_check_: !0, value: "50%" },
transform:
"translateX(-50%) translateY(100%) rotate(180deg)",
},
"&-placement-topLeft": {
"--arrow-offset-horizontal": v,
[`> ${p}-arrow`]: { left: { _skip_check_: !0, value: v } },
},
"&-placement-topRight": {
"--arrow-offset-horizontal": `calc(100% - ${(0, t.unit)(v)})`,
[`> ${p}-arrow`]: { right: { _skip_check_: !0, value: v } },
},
}),
i ? o : {}),
),
((l = !!b.bottom),
(s = {
[`&-placement-bottom > ${p}-arrow,&-placement-bottomLeft > ${p}-arrow,&-placement-bottomRight > ${p}-arrow`]:
{ top: g, transform: "translateY(-100%)" },
[`&-placement-bottom > ${p}-arrow`]: {
left: { _skip_check_: !0, value: "50%" },
transform: "translateX(-50%) translateY(-100%)",
},
"&-placement-bottomLeft": {
"--arrow-offset-horizontal": v,
[`> ${p}-arrow`]: { left: { _skip_check_: !0, value: v } },
},
"&-placement-bottomRight": {
"--arrow-offset-horizontal": `calc(100% - ${(0, t.unit)(v)})`,
[`> ${p}-arrow`]: { right: { _skip_check_: !0, value: v } },
},
}),
l ? s : {}),
),
((u = !!b.left),
(c = {
[`&-placement-left > ${p}-arrow,&-placement-leftTop > ${p}-arrow,&-placement-leftBottom > ${p}-arrow`]:
{
right: { _skip_check_: !0, value: g },
transform: "translateX(100%) rotate(90deg)",
},
[`&-placement-left > ${p}-arrow`]: {
top: { _skip_check_: !0, value: "50%" },
transform: "translateY(-50%) translateX(100%) rotate(90deg)",
},
[`&-placement-leftTop > ${p}-arrow`]: { top: h },
[`&-placement-leftBottom > ${p}-arrow`]: { bottom: h },
}),
u ? c : {}),
),
((f = !!b.right),
(d = {
[`&-placement-right > ${p}-arrow,&-placement-rightTop > ${p}-arrow,&-placement-rightBottom > ${p}-arrow`]:
{
left: { _skip_check_: !0, value: g },
transform: "translateX(-100%) rotate(-90deg)",
},
[`&-placement-right > ${p}-arrow`]: {
top: { _skip_check_: !0, value: "50%" },
transform: "translateY(-50%) translateX(-100%) rotate(-90deg)",
},
[`&-placement-rightTop > ${p}-arrow`]: { top: h },
[`&-placement-rightBottom > ${p}-arrow`]: { bottom: h },
}),
f ? d : {}),
),
};
}
e.s(["genRoundedArrow", 0, n, "getArrowToken", () => r], 306134),
e.s(
[
"MAX_VERTICAL_CONTENT_RADIUS",
0,
8,
"default",
() => i,
"getArrowOffsetToken",
() => a,
],
5213,
);
let o = {
left: { points: ["cr", "cl"] },
right: { points: ["cl", "cr"] },
top: { points: ["bc", "tc"] },
bottom: { points: ["tc", "bc"] },
topLeft: { points: ["bl", "tl"] },
leftTop: { points: ["tr", "tl"] },
topRight: { points: ["br", "tr"] },
rightTop: { points: ["tl", "tr"] },
bottomRight: { points: ["tr", "br"] },
rightBottom: { points: ["bl", "br"] },
bottomLeft: { points: ["tl", "bl"] },
leftBottom: { points: ["br", "bl"] },
},
l = {
topLeft: { points: ["bl", "tc"] },
leftTop: { points: ["tr", "cl"] },
topRight: { points: ["br", "tc"] },
rightTop: { points: ["tl", "cr"] },
bottomRight: { points: ["tr", "bc"] },
rightBottom: { points: ["bl", "cr"] },
bottomLeft: { points: ["tl", "bc"] },
leftBottom: { points: ["br", "cl"] },
},
s = new Set([
"topLeft",
"topRight",
"bottomLeft",
"bottomRight",
"leftTop",
"leftBottom",
"rightTop",
"rightBottom",
]);
function u(e) {
let {
arrowWidth: t,
autoAdjustOverflow: r,
arrowPointAtCenter: n,
offset: i,
borderRadius: u,
visibleFirst: c,
} = e,
f = t / 2,
d = {},
p = a({ contentRadius: u, limitVerticalRadius: !0 });
return (
Object.keys(o).forEach((e) => {
let a = Object.assign(Object.assign({}, (n && l[e]) || o[e]), {
offset: [0, 0],
dynamicInset: !0,
});
switch (((d[e] = a), s.has(e) && (a.autoArrow = !1), e)) {
case "top":
case "topLeft":
case "topRight":
a.offset[1] = -f - i;
break;
case "bottom":
case "bottomLeft":
case "bottomRight":
a.offset[1] = f + i;
break;
case "left":
case "leftTop":
case "leftBottom":
a.offset[0] = -f - i;
break;
case "right":
case "rightTop":
case "rightBottom":
a.offset[0] = f + i;
}
if (n)
switch (e) {
case "topLeft":
case "bottomLeft":
a.offset[0] = -p.arrowOffsetHorizontal - f;
break;
case "topRight":
case "bottomRight":
a.offset[0] = p.arrowOffsetHorizontal + f;
break;
case "leftTop":
case "rightTop":
a.offset[1] = -(2 * p.arrowOffsetHorizontal) + f;
break;
case "leftBottom":
case "rightBottom":
a.offset[1] = 2 * p.arrowOffsetHorizontal - f;
}
(a.overflow = (function (e, t, r, n) {
if (!1 === n) return { adjustX: !1, adjustY: !1 };
let a = {};
switch (e) {
case "top":
case "bottom":
(a.shiftX = 2 * t.arrowOffsetHorizontal + r),
(a.shiftY = !0),
(a.adjustY = !0);
break;
case "left":
case "right":
(a.shiftY = 2 * t.arrowOffsetVertical + r),
(a.shiftX = !0),
(a.adjustX = !0);
}
let i = Object.assign(
Object.assign({}, a),
n && "object" == typeof n ? n : {},
);
return (
i.shiftX || (i.adjustX = !0), i.shiftY || (i.adjustY = !0), i
);
})(e, p, t, r)),
c && (a.htmlRegion = "visibleFirst");
}),
d
);
}
e.s(["default", () => u], 50702);
};
export default moduleFactory;