Files
baiducom/waf/static/js/9823-558a11c7288b6114.js
T
2024-09-24 17:45:24 +08:00

901 lines
23 KiB
JavaScript

"use strict";
(self.webpackChunk_N_E = self.webpackChunk_N_E || []).push([
[9823],
{
8430: function (e, n, t) {
t.d(n, {
Z: function () {
return U;
},
});
var r = t(51163),
a = t(75782),
i = t(91600),
u = t(68901),
c = t(59496),
o = t(84875),
s = t.n(o),
l = t(48487),
f = t(33750),
E = [
"prefixCls",
"invalidate",
"item",
"renderItem",
"responsive",
"responsiveDisabled",
"registerSize",
"itemKey",
"className",
"style",
"children",
"display",
"order",
"component",
],
d = void 0,
v = c.forwardRef(function (e, n) {
var t,
i = e.prefixCls,
o = e.invalidate,
f = e.item,
v = e.renderItem,
N = e.responsive,
m = e.responsiveDisabled,
h = e.registerSize,
R = e.itemKey,
S = e.className,
M = e.style,
C = e.children,
_ = e.display,
p = e.order,
I = e.component,
Z = (0, u.Z)(e, E),
A = N && !_;
function T(e) {
h(R, e);
}
c.useEffect(function () {
return function () {
T(null);
};
}, []);
var U = v && f !== d ? v(f) : C;
o ||
(t = {
opacity: A ? 0 : 1,
height: A ? 0 : d,
overflowY: A ? "hidden" : d,
order: N ? p : d,
pointerEvents: A ? "none" : d,
position: A ? "absolute" : d,
});
var y = {};
A && (y["aria-hidden"] = !0);
var O = c.createElement(
void 0 === I ? "div" : I,
(0, r.Z)(
{
className: s()(!o && i, S),
style: (0, a.Z)((0, a.Z)({}, t), M),
},
y,
Z,
{ ref: n }
),
U
);
return (
N &&
(O = c.createElement(
l.default,
{
onResize: function (e) {
T(e.offsetWidth);
},
disabled: m,
},
O
)),
O
);
});
v.displayName = "Item";
var N = t(25532),
m = t(93509),
h = ["component"],
R = ["className"],
S = ["className"],
M = function (e, n) {
var t = c.useContext(p);
if (!t) {
var a = e.component,
i = (0, u.Z)(e, h);
return c.createElement(
void 0 === a ? "div" : a,
(0, r.Z)({}, i, { ref: n })
);
}
var o = t.className,
l = (0, u.Z)(t, R),
f = e.className,
E = (0, u.Z)(e, S);
return c.createElement(
p.Provider,
{ value: null },
c.createElement(v, (0, r.Z)({ ref: n, className: s()(o, f) }, l, E))
);
},
C = c.forwardRef(M);
C.displayName = "RawItem";
var _ = [
"prefixCls",
"data",
"renderItem",
"renderRawItem",
"itemKey",
"itemWidth",
"ssr",
"style",
"className",
"maxCount",
"renderRest",
"renderRawRest",
"suffix",
"component",
"itemComponent",
"onVisibleChange",
],
p = c.createContext(null),
I = "responsive",
Z = "invalidate";
function A(e) {
return "+ ".concat(e.length, " ...");
}
var T = c.forwardRef(function (e, n) {
var t,
o,
E,
d,
h,
R,
S = e.prefixCls,
M = void 0 === S ? "rc-overflow" : S,
C = e.data,
T = void 0 === C ? [] : C,
U = e.renderItem,
y = e.renderRawItem,
O = e.itemKey,
g = e.itemWidth,
P = void 0 === g ? 10 : g,
L = e.ssr,
K = e.style,
F = e.className,
b = e.maxCount,
w = e.renderRest,
H = e.renderRawRest,
W = e.suffix,
D = e.component,
k = e.itemComponent,
x = e.onVisibleChange,
G = (0, u.Z)(e, _),
V =
((o = (0, m.Z)({})),
(E = (0, i.Z)(o, 2)[1]),
(d = (0, c.useRef)([])),
(h = 0),
(R = 0),
function (e) {
var n;
return (
(h += 1),
d.current.length < h + 1 && (d.current[h] = e),
[
d.current[h],
function (e) {
(d.current[h] =
"function" == typeof e ? e(d.current[h]) : e),
N.Z.cancel(R),
(R = (0, N.Z)(function () {
E({}, !0);
}));
},
]
);
}),
z = "full" === L,
Q = V(null),
B = (0, i.Z)(Q, 2),
Y = B[0],
X = B[1],
J = Y || 0,
j = V(new Map()),
q = (0, i.Z)(j, 2),
$ = q[0],
ee = q[1],
en = V(0),
et = (0, i.Z)(en, 2),
er = et[0],
ea = et[1],
ei = V(0),
eu = (0, i.Z)(ei, 2),
ec = eu[0],
eo = eu[1],
es = V(0),
el = (0, i.Z)(es, 2),
ef = el[0],
eE = el[1],
ed = (0, c.useState)(null),
ev = (0, i.Z)(ed, 2),
eN = ev[0],
em = ev[1],
eh = (0, c.useState)(null),
eR = (0, i.Z)(eh, 2),
eS = eR[0],
eM = eR[1],
eC = c.useMemo(
function () {
return null === eS && z ? Number.MAX_SAFE_INTEGER : eS || 0;
},
[eS, Y]
),
e_ = (0, c.useState)(!1),
ep = (0, i.Z)(e_, 2),
eI = ep[0],
eZ = ep[1],
eA = "".concat(M, "-item"),
eT = Math.max(er, ec),
eU = b === I,
ey = T.length && eU,
eO = b === Z,
eg = ey || ("number" == typeof b && T.length > b),
eP = (0, c.useMemo)(
function () {
var e = T;
return (
ey
? (e =
null === Y && z
? T
: T.slice(0, Math.min(T.length, J / P)))
: "number" == typeof b && (e = T.slice(0, b)),
e
);
},
[T, P, Y, b, ey]
),
eL = (0, c.useMemo)(
function () {
return ey ? T.slice(eC + 1) : T.slice(eP.length);
},
[T, eP, ey, eC]
),
eK = (0, c.useCallback)(
function (e, n) {
var t;
return "function" == typeof O
? O(e)
: null !== (t = O && (null == e ? void 0 : e[O])) &&
void 0 !== t
? t
: n;
},
[O]
),
eF = (0, c.useCallback)(
U ||
function (e) {
return e;
},
[U]
);
function eb(e, n, t) {
(eS !== e || (void 0 !== n && n !== eN)) &&
(eM(e),
t || (eZ(e < T.length - 1), null == x || x(e)),
void 0 !== n && em(n));
}
function ew(e, n) {
ee(function (t) {
var r = new Map(t);
return null === n ? r.delete(e) : r.set(e, n), r;
});
}
function eH(e, n) {
eE(n);
}
function eW(e) {
return $.get(eK(eP[e], e));
}
(0, f.Z)(
function () {
if (J && eT && eP) {
var e = ef,
n = eP.length,
t = n - 1;
if (!n) {
eb(0, null);
return;
}
for (var r = 0; r < n; r += 1) {
var a = eW(r);
if ((z && (a = a || 0), void 0 === a)) {
eb(r - 1, void 0, !0);
break;
}
if (
((e += a),
(0 === t && e <= J) || (r === t - 1 && e + eW(t) <= J))
) {
eb(t, null);
break;
}
if (e + eT > J) {
eb(r - 1, e - a - ef + ec);
break;
}
}
W && eW(0) + ef > J && em(null);
}
},
[J, $, ec, ef, eK, eP]
);
var eD = eI && !!eL.length,
ek = {};
null !== eN && ey && (ek = { position: "absolute", left: eN, top: 0 });
var ex = {
prefixCls: eA,
responsive: ey,
component: k,
invalidate: eO,
},
eG = y
? function (e, n) {
var t = eK(e, n);
return c.createElement(
p.Provider,
{
key: t,
value: (0, a.Z)(
(0, a.Z)({}, ex),
{},
{
order: n,
item: e,
itemKey: t,
registerSize: ew,
display: n <= eC,
}
),
},
y(e, n)
);
}
: function (e, n) {
var t = eK(e, n);
return c.createElement(
v,
(0, r.Z)({}, ex, {
order: n,
key: t,
item: e,
renderItem: eF,
itemKey: t,
registerSize: ew,
display: n <= eC,
})
);
},
eV = {
order: eD ? eC : Number.MAX_SAFE_INTEGER,
className: "".concat(eA, "-rest"),
registerSize: function (e, n) {
eo(n), ea(ec);
},
display: eD,
};
if (H)
H &&
(t = c.createElement(
p.Provider,
{ value: (0, a.Z)((0, a.Z)({}, ex), eV) },
H(eL)
));
else {
var ez = w || A;
t = c.createElement(
v,
(0, r.Z)({}, ex, eV),
"function" == typeof ez ? ez(eL) : ez
);
}
var eQ = c.createElement(
void 0 === D ? "div" : D,
(0, r.Z)({ className: s()(!eO && M, F), style: K, ref: n }, G),
eP.map(eG),
eg ? t : null,
W &&
c.createElement(
v,
(0, r.Z)({}, ex, {
responsive: eU,
responsiveDisabled: !ey,
order: eC,
className: "".concat(eA, "-suffix"),
registerSize: eH,
display: !0,
style: ek,
}),
W
)
);
return (
eU &&
(eQ = c.createElement(
l.default,
{
onResize: function (e, n) {
X(n.clientWidth);
},
disabled: !ey,
},
eQ
)),
eQ
);
});
(T.displayName = "Overflow"),
(T.Item = C),
(T.RESPONSIVE = I),
(T.INVALIDATE = Z);
var U = T;
},
48487: function (e, n, t) {
t.r(n),
t.d(n, {
default: function () {
return M;
},
});
var r = t(51163),
a = t(59496),
i = t(81706);
t(11317);
var u = t(75782),
c = t(75729),
o = t(47946),
s = t(73023),
l = new Map(),
f = new s.Z(function (e) {
e.forEach(function (e) {
var n,
t = e.target;
null === (n = l.get(t)) ||
void 0 === n ||
n.forEach(function (e) {
return e(t);
});
});
}),
E = t(40936),
d = t(49962),
v = t(65782),
N = t(76614),
m = (function (e) {
(0, v.Z)(t, e);
var n = (0, N.Z)(t);
function t() {
return (0, E.Z)(this, t), n.apply(this, arguments);
}
return (
(0, d.Z)(t, [
{
key: "render",
value: function () {
return this.props.children;
},
},
]),
t
);
})(a.Component),
h = a.createContext(null);
function R(e) {
var n = e.children,
t = e.disabled,
r = a.useRef(null),
i = a.useRef(null),
s = a.useContext(h),
E = "function" == typeof n,
d = E ? n(r) : n,
v = a.useRef({
width: -1,
height: -1,
offsetWidth: -1,
offsetHeight: -1,
}),
N = !E && a.isValidElement(d) && (0, c.Yr)(d),
R = N ? d.ref : null,
S = a.useMemo(
function () {
return (0, c.sQ)(R, r);
},
[R, r]
),
M = a.useRef(e);
M.current = e;
var C = a.useCallback(function (e) {
var n = M.current,
t = n.onResize,
r = n.data,
a = e.getBoundingClientRect(),
i = a.width,
c = a.height,
o = e.offsetWidth,
l = e.offsetHeight,
f = Math.floor(i),
E = Math.floor(c);
if (
v.current.width !== f ||
v.current.height !== E ||
v.current.offsetWidth !== o ||
v.current.offsetHeight !== l
) {
var d = { width: f, height: E, offsetWidth: o, offsetHeight: l };
v.current = d;
var N = (0, u.Z)(
(0, u.Z)({}, d),
{},
{
offsetWidth: o === Math.round(i) ? i : o,
offsetHeight: l === Math.round(c) ? c : l,
}
);
null == s || s(N, e, r),
t &&
Promise.resolve().then(function () {
t(N, e);
});
}
}, []);
return (
a.useEffect(
function () {
var e,
n,
a = (0, o.Z)(r.current) || (0, o.Z)(i.current);
return (
a &&
!t &&
((e = a),
(n = C),
l.has(e) || (l.set(e, new Set()), f.observe(e)),
l.get(e).add(n)),
function () {
var e, n;
l.has(a) &&
(l.get(a).delete(C),
l.get(a).size || (f.unobserve(a), l.delete(a)));
}
);
},
[r.current, t]
),
a.createElement(m, { ref: i }, N ? a.cloneElement(d, { ref: S }) : d)
);
}
function S(e) {
var n,
t = e.children;
return ("function" == typeof t ? [t] : (0, i.Z)(t)).map(function (
n,
t
) {
var i =
(null == n ? void 0 : n.key) ||
"".concat("rc-observer-key", "-").concat(t);
return a.createElement(R, (0, r.Z)({}, e, { key: i }), n);
});
}
S.Collection = function (e) {
var n = e.children,
t = e.onBatchResize,
r = a.useRef(0),
i = a.useRef([]),
u = a.useContext(h),
c = a.useCallback(
function (e, n, a) {
r.current += 1;
var c = r.current;
i.current.push({ size: e, element: n, data: a }),
Promise.resolve().then(function () {
c === r.current &&
(null == t || t(i.current), (i.current = []));
}),
null == u || u(e, n, a);
},
[t, u]
);
return a.createElement(h.Provider, { value: c }, n);
};
var M = S;
},
61950: function (e, n) {
var t = {
MAC_ENTER: 3,
BACKSPACE: 8,
TAB: 9,
NUM_CENTER: 12,
ENTER: 13,
SHIFT: 16,
CTRL: 17,
ALT: 18,
PAUSE: 19,
CAPS_LOCK: 20,
ESC: 27,
SPACE: 32,
PAGE_UP: 33,
PAGE_DOWN: 34,
END: 35,
HOME: 36,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
PRINT_SCREEN: 44,
INSERT: 45,
DELETE: 46,
ZERO: 48,
ONE: 49,
TWO: 50,
THREE: 51,
FOUR: 52,
FIVE: 53,
SIX: 54,
SEVEN: 55,
EIGHT: 56,
NINE: 57,
QUESTION_MARK: 63,
A: 65,
B: 66,
C: 67,
D: 68,
E: 69,
F: 70,
G: 71,
H: 72,
I: 73,
J: 74,
K: 75,
L: 76,
M: 77,
N: 78,
O: 79,
P: 80,
Q: 81,
R: 82,
S: 83,
T: 84,
U: 85,
V: 86,
W: 87,
X: 88,
Y: 89,
Z: 90,
META: 91,
WIN_KEY_RIGHT: 92,
CONTEXT_MENU: 93,
NUM_ZERO: 96,
NUM_ONE: 97,
NUM_TWO: 98,
NUM_THREE: 99,
NUM_FOUR: 100,
NUM_FIVE: 101,
NUM_SIX: 102,
NUM_SEVEN: 103,
NUM_EIGHT: 104,
NUM_NINE: 105,
NUM_MULTIPLY: 106,
NUM_PLUS: 107,
NUM_MINUS: 109,
NUM_PERIOD: 110,
NUM_DIVISION: 111,
F1: 112,
F2: 113,
F3: 114,
F4: 115,
F5: 116,
F6: 117,
F7: 118,
F8: 119,
F9: 120,
F10: 121,
F11: 122,
F12: 123,
NUMLOCK: 144,
SEMICOLON: 186,
DASH: 189,
EQUALS: 187,
COMMA: 188,
PERIOD: 190,
SLASH: 191,
APOSTROPHE: 192,
SINGLE_QUOTE: 222,
OPEN_SQUARE_BRACKET: 219,
BACKSLASH: 220,
CLOSE_SQUARE_BRACKET: 221,
WIN_KEY: 224,
MAC_FF_META: 224,
WIN_IME: 229,
isTextModifyingKeyEvent: function (e) {
var n = e.keyCode;
if (
(e.altKey && !e.ctrlKey) ||
e.metaKey ||
(n >= t.F1 && n <= t.F12)
)
return !1;
switch (n) {
case t.ALT:
case t.CAPS_LOCK:
case t.CONTEXT_MENU:
case t.CTRL:
case t.DOWN:
case t.END:
case t.ESC:
case t.HOME:
case t.INSERT:
case t.LEFT:
case t.MAC_FF_META:
case t.META:
case t.NUMLOCK:
case t.NUM_CENTER:
case t.PAGE_DOWN:
case t.PAGE_UP:
case t.PAUSE:
case t.PRINT_SCREEN:
case t.RIGHT:
case t.SHIFT:
case t.UP:
case t.WIN_KEY:
case t.WIN_KEY_RIGHT:
return !1;
default:
return !0;
}
},
isCharacterKey: function (e) {
if (
(e >= t.ZERO && e <= t.NINE) ||
(e >= t.NUM_ZERO && e <= t.NUM_MULTIPLY) ||
(e >= t.A && e <= t.Z) ||
(-1 !== window.navigator.userAgent.indexOf("WebKit") && 0 === e)
)
return !0;
switch (e) {
case t.SPACE:
case t.QUESTION_MARK:
case t.NUM_PLUS:
case t.NUM_MINUS:
case t.NUM_PERIOD:
case t.NUM_DIVISION:
case t.SEMICOLON:
case t.DASH:
case t.EQUALS:
case t.COMMA:
case t.PERIOD:
case t.SLASH:
case t.APOSTROPHE:
case t.SINGLE_QUOTE:
case t.OPEN_SQUARE_BRACKET:
case t.BACKSLASH:
case t.CLOSE_SQUARE_BRACKET:
return !0;
default:
return !1;
}
},
};
n.Z = t;
},
64333: function (e, n, t) {
t.d(n, {
Z: function () {
return a;
},
});
var r = t(59496);
function a(e) {
var n = r.useRef();
return (
(n.current = e),
r.useCallback(function () {
for (var e, t = arguments.length, r = Array(t), a = 0; a < t; a++)
r[a] = arguments[a];
return null === (e = n.current) || void 0 === e
? void 0
: e.call.apply(e, [n].concat(r));
}, [])
);
}
},
82172: function (e, n, t) {
t.d(n, {
Z: function () {
return o;
},
});
var r = t(91600),
a = t(64333),
i = t(33750),
u = t(93509);
function c(e) {
return void 0 !== e;
}
function o(e, n) {
var t = n || {},
o = t.defaultValue,
s = t.value,
l = t.onChange,
f = t.postState,
E = (0, u.Z)(function () {
return c(s)
? s
: c(o)
? "function" == typeof o
? o()
: o
: "function" == typeof e
? e()
: e;
}),
d = (0, r.Z)(E, 2),
v = d[0],
N = d[1],
m = void 0 !== s ? s : v,
h = f ? f(m) : m,
R = (0, a.Z)(l),
S = (0, u.Z)([m]),
M = (0, r.Z)(S, 2),
C = M[0],
_ = M[1];
(0, i.o)(
function () {
var e = C[0];
v !== e && R(v, e);
},
[C]
),
(0, i.o)(
function () {
c(s) || N(s);
},
[s]
);
var p = (0, a.Z)(function (e, n) {
N(e, n), _([m], n);
});
return [h, p];
}
},
87296: function (e, n, t) {
t.d(n, {
Z: function () {
return a;
},
});
var r = t(75782);
function a(e, n) {
var t = (0, r.Z)({}, e);
return (
Array.isArray(n) &&
n.forEach(function (e) {
delete t[e];
}),
t
);
}
},
},
]);