build/vendors~p__Competitions__En...

7749 lines
267 KiB
JavaScript

(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[16],{
/***/ "5Uyt":
/*!********************************************************!*\
!*** ./node_modules/@ant-design/icons/FilterFilled.js ***!
\********************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _FilterFilled = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/FilterFilled */ "KmBX"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _default = _FilterFilled;
exports.default = _default;
module.exports = _default;
/***/ }),
/***/ "6SEX":
/*!*************************************************************!*\
!*** ./node_modules/@ant-design/icons/CaretDownOutlined.js ***!
\*************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _CaretDownOutlined = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/CaretDownOutlined */ "qWUW"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _default = _CaretDownOutlined;
exports.default = _default;
module.exports = _default;
/***/ }),
/***/ "7Kak":
/*!***************************************************!*\
!*** ./node_modules/antd/es/radio/style/index.js ***!
\***************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH");
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "KPFz");
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);
/***/ }),
/***/ "9yH6":
/*!*********************************************************!*\
!*** ./node_modules/antd/es/radio/index.js + 5 modules ***!
\*********************************************************/
/*! exports provided: Button, Group, default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/typeof.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-checkbox/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMergedState.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// UNUSED EXPORTS: Button, Group
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
var defineProperty = __webpack_require__("lSNA");
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
var helpers_extends = __webpack_require__("pVnL");
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
// EXTERNAL MODULE: ./node_modules/rc-checkbox/es/index.js
var es = __webpack_require__("x1Ya");
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("TSYQ");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js + 1 modules
var config_provider_context = __webpack_require__("H84U");
// CONCATENATED MODULE: ./node_modules/antd/es/radio/context.js
var RadioGroupContext = /*#__PURE__*/react["createContext"](null);
var RadioGroupContextProvider = RadioGroupContext.Provider;
/* harmony default export */ var radio_context = (RadioGroupContext);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/typeof.js
var helpers_typeof = __webpack_require__("cDf5");
var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);
// CONCATENATED MODULE: ./node_modules/antd/es/_util/ref.js
function fillRef(ref, node) {
if (typeof ref === 'function') {
ref(node);
} else if (typeof_default()(ref) === 'object' && ref && 'current' in ref) {
ref.current = node;
}
}
function composeRef() {
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
refs[_key] = arguments[_key];
}
return function (node) {
refs.forEach(function (ref) {
fillRef(ref, node);
});
};
}
// EXTERNAL MODULE: ./node_modules/antd/es/_util/devWarning.js
var devWarning = __webpack_require__("uaoM");
// CONCATENATED MODULE: ./node_modules/antd/es/radio/radio.js
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var radio_InternalRadio = function InternalRadio(props, ref) {
var _classNames;
var context = react["useContext"](radio_context);
var _React$useContext = react["useContext"](config_provider_context["b" /* ConfigContext */]),
getPrefixCls = _React$useContext.getPrefixCls,
direction = _React$useContext.direction;
var innerRef = react["useRef"]();
var mergedRef = composeRef(ref, innerRef);
react["useEffect"](function () {
Object(devWarning["a" /* default */])(!('optionType' in props), 'Radio', '`optionType` is only support in Radio.Group.');
}, []);
var onChange = function onChange(e) {
if (props.onChange) {
props.onChange(e);
}
if (context === null || context === void 0 ? void 0 : context.onChange) {
context.onChange(e);
}
};
var customizePrefixCls = props.prefixCls,
className = props.className,
children = props.children,
style = props.style,
restProps = __rest(props, ["prefixCls", "className", "children", "style"]);
var prefixCls = getPrefixCls('radio', customizePrefixCls);
var radioProps = extends_default()({}, restProps);
if (context) {
radioProps.name = context.name;
radioProps.onChange = onChange;
radioProps.checked = props.value === context.value;
radioProps.disabled = props.disabled || context.disabled;
}
var wrapperClassString = classnames_default()(className, (_classNames = {}, defineProperty_default()(_classNames, "".concat(prefixCls, "-wrapper"), true), defineProperty_default()(_classNames, "".concat(prefixCls, "-wrapper-checked"), radioProps.checked), defineProperty_default()(_classNames, "".concat(prefixCls, "-wrapper-disabled"), radioProps.disabled), defineProperty_default()(_classNames, "".concat(prefixCls, "-wrapper-rtl"), direction === 'rtl'), _classNames));
return (
/*#__PURE__*/
// eslint-disable-next-line jsx-a11y/label-has-associated-control
react["createElement"]("label", {
className: wrapperClassString,
style: style,
onMouseEnter: props.onMouseEnter,
onMouseLeave: props.onMouseLeave
}, /*#__PURE__*/react["createElement"](es["a" /* default */], extends_default()({}, radioProps, {
prefixCls: prefixCls,
ref: mergedRef
})), children !== undefined ? /*#__PURE__*/react["createElement"]("span", null, children) : null)
);
};
var Radio = /*#__PURE__*/react["forwardRef"](radio_InternalRadio);
Radio.displayName = 'Radio';
Radio.defaultProps = {
type: 'radio'
};
/* harmony default export */ var radio_radio = (Radio);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__("J4zp");
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMergedState.js
var useMergedState = __webpack_require__("6cGi");
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/SizeContext.js
var SizeContext = __webpack_require__("3Nzz");
// CONCATENATED MODULE: ./node_modules/antd/es/radio/group.js
var RadioGroup = /*#__PURE__*/react["forwardRef"](function (props, ref) {
var _React$useContext = react["useContext"](config_provider_context["b" /* ConfigContext */]),
getPrefixCls = _React$useContext.getPrefixCls,
direction = _React$useContext.direction;
var size = react["useContext"](SizeContext["b" /* default */]);
var _useMergedState = Object(useMergedState["a" /* default */])(props.defaultValue, {
value: props.value
}),
_useMergedState2 = slicedToArray_default()(_useMergedState, 2),
value = _useMergedState2[0],
setValue = _useMergedState2[1];
var onRadioChange = function onRadioChange(ev) {
var lastValue = value;
var val = ev.target.value;
if (!('value' in props)) {
setValue(val);
}
var onChange = props.onChange;
if (onChange && val !== lastValue) {
onChange(ev);
}
};
var renderGroup = function renderGroup() {
var _classNames;
var customizePrefixCls = props.prefixCls,
_props$className = props.className,
className = _props$className === void 0 ? '' : _props$className,
options = props.options,
optionType = props.optionType,
buttonStyle = props.buttonStyle,
disabled = props.disabled,
children = props.children,
customizeSize = props.size,
style = props.style,
id = props.id,
onMouseEnter = props.onMouseEnter,
onMouseLeave = props.onMouseLeave;
var prefixCls = getPrefixCls('radio', customizePrefixCls);
var groupPrefixCls = "".concat(prefixCls, "-group");
var childrenToRender = children; // 如果存在 options, 优先使用
if (options && options.length > 0) {
var optionsPrefixCls = optionType === 'button' ? "".concat(prefixCls, "-button") : prefixCls;
childrenToRender = options.map(function (option) {
if (typeof option === 'string') {
// 此处类型自动推导为 string
return /*#__PURE__*/react["createElement"](radio_radio, {
ref: ref,
key: option,
prefixCls: optionsPrefixCls,
disabled: disabled,
value: option,
checked: value === option
}, option);
} // 此处类型自动推导为 { label: string value: string }
return /*#__PURE__*/react["createElement"](radio_radio, {
ref: ref,
key: "radio-group-value-options-".concat(option.value),
prefixCls: optionsPrefixCls,
disabled: option.disabled || disabled,
value: option.value,
checked: value === option.value,
style: option.style
}, option.label);
});
}
var mergedSize = customizeSize || size;
var classString = classnames_default()(groupPrefixCls, "".concat(groupPrefixCls, "-").concat(buttonStyle), (_classNames = {}, defineProperty_default()(_classNames, "".concat(groupPrefixCls, "-").concat(mergedSize), mergedSize), defineProperty_default()(_classNames, "".concat(groupPrefixCls, "-rtl"), direction === 'rtl'), _classNames), className);
return /*#__PURE__*/react["createElement"]("div", {
className: classString,
style: style,
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
id: id
}, childrenToRender);
};
return /*#__PURE__*/react["createElement"](RadioGroupContextProvider, {
value: {
onChange: onRadioChange,
value: value,
disabled: props.disabled,
name: props.name
}
}, renderGroup());
});
RadioGroup.defaultProps = {
buttonStyle: 'outline'
};
/* harmony default export */ var group = (/*#__PURE__*/react["memo"](RadioGroup));
// CONCATENATED MODULE: ./node_modules/antd/es/radio/radioButton.js
var radioButton_rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var radioButton_RadioButton = function RadioButton(props, ref) {
var radioGroupContext = react["useContext"](radio_context);
var _React$useContext = react["useContext"](config_provider_context["b" /* ConfigContext */]),
getPrefixCls = _React$useContext.getPrefixCls;
var customizePrefixCls = props.prefixCls,
radioProps = radioButton_rest(props, ["prefixCls"]);
var prefixCls = getPrefixCls('radio-button', customizePrefixCls);
if (radioGroupContext) {
radioProps.checked = props.value === radioGroupContext.value;
radioProps.disabled = props.disabled || radioGroupContext.disabled;
}
return /*#__PURE__*/react["createElement"](radio_radio, extends_default()({
prefixCls: prefixCls
}, radioProps, {
type: "radio",
ref: ref
}));
};
/* harmony default export */ var radioButton = (/*#__PURE__*/react["forwardRef"](radioButton_RadioButton));
// CONCATENATED MODULE: ./node_modules/antd/es/radio/index.js
var radio_Radio = radio_radio;
radio_Radio.Button = radioButton;
radio_Radio.Group = group;
/* harmony default export */ var es_radio = __webpack_exports__["a"] = (radio_Radio);
/***/ }),
/***/ "AOa7":
/*!**********************************************************!*\
!*** ./node_modules/antd/es/breadcrumb/style/index.less ***!
\**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "Awhp":
/*!***************************************************!*\
!*** ./node_modules/antd/es/badge/style/index.js ***!
\***************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH");
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "PQMj");
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);
/***/ }),
/***/ "CP8R":
/*!********************************************************************!*\
!*** ./node_modules/@ant-design/icons-svg/lib/asn/FilterFilled.js ***!
\********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// This icon file is generated automatically.
Object.defineProperty(exports, "__esModule", { value: true });
var FilterFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z" } }] }, "name": "filter", "theme": "filled" };
exports.default = FilterFilled;
/***/ }),
/***/ "DL4k":
/*!*************************************************************************!*\
!*** ./node_modules/@ant-design/icons-svg/lib/asn/CaretDownOutlined.js ***!
\*************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// This icon file is generated automatically.
Object.defineProperty(exports, "__esModule", { value: true });
var CaretDownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" } }] }, "name": "caret-down", "theme": "outlined" };
exports.default = CaretDownOutlined;
/***/ }),
/***/ "Fm1+":
/*!*********************************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/icons/CaretUpOutlined.js ***!
\*********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "284h");
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9"));
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI"));
var _CaretUpOutlined = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/CaretUpOutlined */ "a7Wl"));
var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl"));
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var CaretUpOutlined = function CaretUpOutlined(props, ref) {
return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
ref: ref,
icon: _CaretUpOutlined.default
}));
};
CaretUpOutlined.displayName = 'CaretUpOutlined';
var _default = /*#__PURE__*/React.forwardRef(CaretUpOutlined);
exports.default = _default;
/***/ }),
/***/ "KPFz":
/*!*****************************************************!*\
!*** ./node_modules/antd/es/radio/style/index.less ***!
\*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "KmBX":
/*!******************************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/icons/FilterFilled.js ***!
\******************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "284h");
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9"));
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI"));
var _FilterFilled = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/FilterFilled */ "CP8R"));
var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl"));
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var FilterFilled = function FilterFilled(props, ref) {
return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
ref: ref,
icon: _FilterFilled.default
}));
};
FilterFilled.displayName = 'FilterFilled';
var _default = /*#__PURE__*/React.forwardRef(FilterFilled);
exports.default = _default;
/***/ }),
/***/ "KrTs":
/*!*********************************************************!*\
!*** ./node_modules/antd/es/badge/index.js + 3 modules ***!
\*********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/typeof.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/colors.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-animate/es/Animate.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
var defineProperty = __webpack_require__("lSNA");
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/typeof.js
var helpers_typeof = __webpack_require__("cDf5");
var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
var helpers_extends = __webpack_require__("pVnL");
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
// EXTERNAL MODULE: ./node_modules/rc-animate/es/Animate.js + 5 modules
var Animate = __webpack_require__("MFj2");
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("TSYQ");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__("J4zp");
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js + 1 modules
var context = __webpack_require__("H84U");
// EXTERNAL MODULE: ./node_modules/antd/es/_util/reactNode.js
var reactNode = __webpack_require__("0n0R");
// CONCATENATED MODULE: ./node_modules/antd/es/badge/ScrollNumber.js
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
function getNumberArray(num) {
return num ? num.toString().split('').reverse().map(function (i) {
var current = Number(i);
return isNaN(current) ? i : current;
}) : [];
}
function renderNumberList(position, className) {
var childrenToReturn = [];
for (var i = 0; i < 30; i++) {
childrenToReturn.push( /*#__PURE__*/react["createElement"]("p", {
key: i.toString(),
className: classnames_default()(className, {
current: position === i
})
}, i % 10));
}
return childrenToReturn;
}
var ScrollNumber_ScrollNumber = function ScrollNumber(_a) {
var customizePrefixCls = _a.prefixCls,
customizeCount = _a.count,
className = _a.className,
style = _a.style,
title = _a.title,
_a$component = _a.component,
component = _a$component === void 0 ? 'sup' : _a$component,
displayComponent = _a.displayComponent,
_a$onAnimated = _a.onAnimated,
onAnimated = _a$onAnimated === void 0 ? function () {} : _a$onAnimated,
restProps = __rest(_a, ["prefixCls", "count", "className", "style", "title", "component", "displayComponent", "onAnimated"]);
var _React$useState = react["useState"](true),
_React$useState2 = slicedToArray_default()(_React$useState, 2),
animateStarted = _React$useState2[0],
setAnimateStarted = _React$useState2[1];
var _React$useState3 = react["useState"](customizeCount),
_React$useState4 = slicedToArray_default()(_React$useState3, 2),
count = _React$useState4[0],
setCount = _React$useState4[1];
var _React$useState5 = react["useState"](customizeCount),
_React$useState6 = slicedToArray_default()(_React$useState5, 2),
prevCount = _React$useState6[0],
setPrevCount = _React$useState6[1];
var _React$useState7 = react["useState"](customizeCount),
_React$useState8 = slicedToArray_default()(_React$useState7, 2),
lastCount = _React$useState8[0],
setLastCount = _React$useState8[1];
var _React$useContext = react["useContext"](context["b" /* ConfigContext */]),
getPrefixCls = _React$useContext.getPrefixCls;
var prefixCls = getPrefixCls('scroll-number', customizePrefixCls);
if (prevCount !== customizeCount) {
setAnimateStarted(true);
setPrevCount(customizeCount);
}
react["useEffect"](function () {
setLastCount(count);
var timeout;
if (animateStarted) {
// Let browser has time to reset the scroller before actually
// performing the transition.
timeout = setTimeout(function () {
setAnimateStarted(false);
setCount(customizeCount);
onAnimated();
});
}
return function () {
if (timeout) {
clearTimeout(timeout);
}
};
}, [animateStarted, customizeCount, onAnimated]);
var getPositionByNum = function getPositionByNum(num, i) {
var currentCount = Math.abs(Number(count));
var lstCount = Math.abs(Number(lastCount));
var currentDigit = Math.abs(getNumberArray(count)[i]);
var lastDigit = Math.abs(getNumberArray(lstCount)[i]);
if (animateStarted) {
return 10 + num;
} // 同方向则在同一侧切换数字
if (currentCount > lstCount) {
if (currentDigit >= lastDigit) {
return 10 + num;
}
return 20 + num;
}
if (currentDigit <= lastDigit) {
return 10 + num;
}
return num;
};
var renderCurrentNumber = function renderCurrentNumber(num, i) {
if (typeof num === 'number') {
var position = getPositionByNum(num, i);
var removeTransition = animateStarted || getNumberArray(lastCount)[i] === undefined;
return /*#__PURE__*/react["createElement"]('span', {
className: "".concat(prefixCls, "-only"),
style: {
transition: removeTransition ? 'none' : undefined,
msTransform: "translateY(".concat(-position * 100, "%)"),
WebkitTransform: "translateY(".concat(-position * 100, "%)"),
transform: "translateY(".concat(-position * 100, "%)")
},
key: i
}, renderNumberList(position, "".concat(prefixCls, "-only-unit")));
}
return /*#__PURE__*/react["createElement"]("span", {
key: "symbol",
className: "".concat(prefixCls, "-symbol")
}, num);
};
var renderNumberElement = function renderNumberElement() {
if (count && Number(count) % 1 === 0) {
return getNumberArray(count).map(function (num, i) {
return renderCurrentNumber(num, i);
}).reverse();
}
return count;
};
var newProps = extends_default()(extends_default()({}, restProps), {
style: style,
className: classnames_default()(prefixCls, className),
title: title
}); // allow specify the border
// mock border-color by box-shadow for compatible with old usage:
// <Badge count={4} style={{ backgroundColor: '#fff', color: '#999', borderColor: '#d9d9d9' }} />
if (style && style.borderColor) {
newProps.style = extends_default()(extends_default()({}, style), {
boxShadow: "0 0 0 1px ".concat(style.borderColor, " inset")
});
}
if (displayComponent) {
return Object(reactNode["a" /* cloneElement */])(displayComponent, {
className: classnames_default()("".concat(prefixCls, "-custom-component"), displayComponent.props && displayComponent.props.className)
});
}
return /*#__PURE__*/react["createElement"](component, newProps, renderNumberElement());
};
/* harmony default export */ var badge_ScrollNumber = (ScrollNumber_ScrollNumber);
// EXTERNAL MODULE: ./node_modules/antd/es/_util/colors.js
var colors = __webpack_require__("09Wf");
// CONCATENATED MODULE: ./node_modules/antd/es/badge/utils.js
// eslint-disable-next-line import/prefer-default-export
function isPresetColor(color) {
return colors["a" /* PresetColorTypes */].indexOf(color) !== -1;
}
// CONCATENATED MODULE: ./node_modules/antd/es/badge/Ribbon.js
var Ribbon_Ribbon = function Ribbon(_ref) {
var _classNames;
var className = _ref.className,
customizePrefixCls = _ref.prefixCls,
style = _ref.style,
color = _ref.color,
children = _ref.children,
text = _ref.text,
_ref$placement = _ref.placement,
placement = _ref$placement === void 0 ? 'end' : _ref$placement;
var _React$useContext = react["useContext"](context["b" /* ConfigContext */]),
getPrefixCls = _React$useContext.getPrefixCls,
direction = _React$useContext.direction;
var prefixCls = getPrefixCls('ribbon', customizePrefixCls);
var colorInPreset = isPresetColor(color);
var ribbonCls = classnames_default()(prefixCls, className, "".concat(prefixCls, "-placement-").concat(placement), (_classNames = {}, defineProperty_default()(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), defineProperty_default()(_classNames, "".concat(prefixCls, "-color-").concat(color), colorInPreset), _classNames));
var colorStyle = {};
var cornerColorStyle = {};
if (color && !colorInPreset) {
colorStyle.background = color;
cornerColorStyle.color = color;
}
return /*#__PURE__*/react["createElement"]("div", {
className: "".concat(prefixCls, "-wrapper")
}, children, /*#__PURE__*/react["createElement"]("div", {
className: ribbonCls,
style: extends_default()(extends_default()({}, colorStyle), style)
}, text, /*#__PURE__*/react["createElement"]("div", {
className: "".concat(prefixCls, "-corner"),
style: cornerColorStyle
})));
};
/* harmony default export */ var badge_Ribbon = (Ribbon_Ribbon);
// CONCATENATED MODULE: ./node_modules/antd/es/badge/index.js
var badge_rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var badge_Badge = function Badge(_a) {
var _classNames2, _classNames3;
var customizePrefixCls = _a.prefixCls,
customizeScrollNumberPrefixCls = _a.scrollNumberPrefixCls,
children = _a.children,
status = _a.status,
text = _a.text,
color = _a.color,
_a$count = _a.count,
count = _a$count === void 0 ? null : _a$count,
_a$overflowCount = _a.overflowCount,
overflowCount = _a$overflowCount === void 0 ? 99 : _a$overflowCount,
_a$dot = _a.dot,
dot = _a$dot === void 0 ? false : _a$dot,
_a$size = _a.size,
size = _a$size === void 0 ? 'default' : _a$size,
title = _a.title,
offset = _a.offset,
style = _a.style,
className = _a.className,
_a$showZero = _a.showZero,
showZero = _a$showZero === void 0 ? false : _a$showZero,
restProps = badge_rest(_a, ["prefixCls", "scrollNumberPrefixCls", "children", "status", "text", "color", "count", "overflowCount", "dot", "size", "title", "offset", "style", "className", "showZero"]);
var _React$useContext = react["useContext"](context["b" /* ConfigContext */]),
getPrefixCls = _React$useContext.getPrefixCls,
direction = _React$useContext.direction;
var prefixCls = getPrefixCls('badge', customizePrefixCls);
var getNumberedDisplayCount = function getNumberedDisplayCount() {
var displayCount = count > overflowCount ? "".concat(overflowCount, "+") : count;
return displayCount;
};
var hasStatus = function hasStatus() {
return !!status || !!color;
};
var isZero = function isZero() {
var numberedDisplayCount = getNumberedDisplayCount();
return numberedDisplayCount === '0' || numberedDisplayCount === 0;
};
var isDot = function isDot() {
return dot && !isZero() || hasStatus();
};
var getDisplayCount = function getDisplayCount() {
// dot mode don't need count
if (isDot()) {
return '';
}
return getNumberedDisplayCount();
};
var getScrollNumberTitle = function getScrollNumberTitle() {
if (title) {
return title;
}
return typeof count === 'string' || typeof count === 'number' ? count : undefined;
};
var getStyleWithOffset = function getStyleWithOffset() {
if (direction === 'rtl') {
return offset ? extends_default()({
left: parseInt(offset[0], 10),
marginTop: offset[1]
}, style) : style;
}
return offset ? extends_default()({
right: -parseInt(offset[0], 10),
marginTop: offset[1]
}, style) : style;
};
var isHidden = function isHidden() {
var displayCount = getDisplayCount();
var isEmpty = displayCount === null || displayCount === undefined || displayCount === '';
return (isEmpty || isZero() && !showZero) && !isDot();
};
var renderStatusText = function renderStatusText() {
var hidden = isHidden();
return hidden || !text ? null : /*#__PURE__*/react["createElement"]("span", {
className: "".concat(prefixCls, "-status-text")
}, text);
};
var renderDisplayComponent = function renderDisplayComponent() {
var customNode = count;
if (!customNode || typeof_default()(customNode) !== 'object') {
return undefined;
}
return Object(reactNode["a" /* cloneElement */])(customNode, {
style: extends_default()(extends_default()({}, getStyleWithOffset()), customNode.props && customNode.props.style)
});
};
var renderBadgeNumber = function renderBadgeNumber() {
var _classNames;
var scrollNumberPrefixCls = getPrefixCls('scroll-number', customizeScrollNumberPrefixCls);
var displayCount = getDisplayCount();
var bDot = isDot();
var hidden = isHidden();
var scrollNumberCls = classnames_default()((_classNames = {}, defineProperty_default()(_classNames, "".concat(prefixCls, "-dot"), bDot), defineProperty_default()(_classNames, "".concat(prefixCls, "-count"), !bDot), defineProperty_default()(_classNames, "".concat(prefixCls, "-count-sm"), size === 'small'), defineProperty_default()(_classNames, "".concat(prefixCls, "-multiple-words"), !bDot && count && count.toString && count.toString().length > 1), defineProperty_default()(_classNames, "".concat(prefixCls, "-status-").concat(status), !!status), defineProperty_default()(_classNames, "".concat(prefixCls, "-status-").concat(color), isPresetColor(color)), _classNames));
var statusStyle = getStyleWithOffset();
if (color && !isPresetColor(color)) {
statusStyle = statusStyle || {};
statusStyle.background = color;
}
return hidden ? null : /*#__PURE__*/react["createElement"](badge_ScrollNumber, {
prefixCls: scrollNumberPrefixCls,
"data-show": !hidden,
className: scrollNumberCls,
count: displayCount,
displayComponent: renderDisplayComponent() // <Badge status="success" count={<Icon type="xxx" />}></Badge>
,
title: getScrollNumberTitle(),
style: statusStyle,
key: "scrollNumber"
});
};
var statusCls = classnames_default()((_classNames2 = {}, defineProperty_default()(_classNames2, "".concat(prefixCls, "-status-dot"), hasStatus()), defineProperty_default()(_classNames2, "".concat(prefixCls, "-status-").concat(status), !!status), defineProperty_default()(_classNames2, "".concat(prefixCls, "-status-").concat(color), isPresetColor(color)), _classNames2));
var statusStyle = {};
if (color && !isPresetColor(color)) {
statusStyle.background = color;
}
var badgeClassName = classnames_default()(className, prefixCls, (_classNames3 = {}, defineProperty_default()(_classNames3, "".concat(prefixCls, "-status"), hasStatus()), defineProperty_default()(_classNames3, "".concat(prefixCls, "-not-a-wrapper"), !children), defineProperty_default()(_classNames3, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames3)); // <Badge status="success" />
if (!children && hasStatus()) {
var styleWithOffset = getStyleWithOffset();
var statusTextColor = styleWithOffset && styleWithOffset.color;
return /*#__PURE__*/react["createElement"]("span", extends_default()({}, restProps, {
className: badgeClassName,
style: styleWithOffset
}), /*#__PURE__*/react["createElement"]("span", {
className: statusCls,
style: statusStyle
}), /*#__PURE__*/react["createElement"]("span", {
style: {
color: statusTextColor
},
className: "".concat(prefixCls, "-status-text")
}, text));
}
return /*#__PURE__*/react["createElement"]("span", extends_default()({}, restProps, {
className: badgeClassName
}), children, /*#__PURE__*/react["createElement"](Animate["a" /* default */], {
component: "",
showProp: "data-show",
transitionName: children ? "".concat(prefixCls, "-zoom") : '',
transitionAppear: true
}, renderBadgeNumber()), renderStatusText());
};
badge_Badge.Ribbon = badge_Ribbon;
/* harmony default export */ var badge = __webpack_exports__["a"] = (badge_Badge);
/***/ }),
/***/ "PQMj":
/*!*****************************************************!*\
!*** ./node_modules/antd/es/badge/style/index.less ***!
\*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "SA+Z":
/*!********************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/toArray.js ***!
\********************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "wTVA");
var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "EbDI");
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "ZhPi");
var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "wkBT");
function _toArray(arr) {
return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();
}
module.exports = _toArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "a7Wl":
/*!***********************************************************************!*\
!*** ./node_modules/@ant-design/icons-svg/lib/asn/CaretUpOutlined.js ***!
\***********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// This icon file is generated automatically.
Object.defineProperty(exports, "__esModule", { value: true });
var CaretUpOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z" } }] }, "name": "caret-up", "theme": "outlined" };
exports.default = CaretUpOutlined;
/***/ }),
/***/ "bE4q":
/*!**************************************************************!*\
!*** ./node_modules/antd/es/breadcrumb/index.js + 3 modules ***!
\**************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/DownOutlined.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toConsumableArray.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/dropdown.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
var helpers_extends = __webpack_require__("pVnL");
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
var defineProperty = __webpack_require__("lSNA");
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js
var toConsumableArray = __webpack_require__("RIqP");
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("TSYQ");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js
var toArray = __webpack_require__("Zm9Q");
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/DownOutlined.js
var DownOutlined = __webpack_require__("HQEm");
var DownOutlined_default = /*#__PURE__*/__webpack_require__.n(DownOutlined);
// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/dropdown.js + 1 modules
var dropdown = __webpack_require__("XBQK");
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js + 1 modules
var context = __webpack_require__("H84U");
// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/BreadcrumbItem.js
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var BreadcrumbItem_BreadcrumbItem = function BreadcrumbItem(_a) {
var customizePrefixCls = _a.prefixCls,
_a$separator = _a.separator,
separator = _a$separator === void 0 ? '/' : _a$separator,
children = _a.children,
overlay = _a.overlay,
dropdownProps = _a.dropdownProps,
restProps = __rest(_a, ["prefixCls", "separator", "children", "overlay", "dropdownProps"]);
var _React$useContext = react["useContext"](context["b" /* ConfigContext */]),
getPrefixCls = _React$useContext.getPrefixCls;
var prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
/**
* if overlay is have
* Wrap a DropDown
*/
var renderBreadcrumbNode = function renderBreadcrumbNode(breadcrumbItem) {
if (overlay) {
return /*#__PURE__*/react["createElement"](dropdown["a" /* default */], extends_default()({
overlay: overlay,
placement: "bottomCenter"
}, dropdownProps), /*#__PURE__*/react["createElement"]("span", {
className: "".concat(prefixCls, "-overlay-link")
}, breadcrumbItem, /*#__PURE__*/react["createElement"](DownOutlined_default.a, null)));
}
return breadcrumbItem;
};
var link;
if ('href' in restProps) {
link = /*#__PURE__*/react["createElement"]("a", extends_default()({
className: "".concat(prefixCls, "-link")
}, restProps), children);
} else {
link = /*#__PURE__*/react["createElement"]("span", extends_default()({
className: "".concat(prefixCls, "-link")
}, restProps), children);
} // wrap to dropDown
link = renderBreadcrumbNode(link);
if (children) {
return /*#__PURE__*/react["createElement"]("span", null, link, separator && separator !== '' && /*#__PURE__*/react["createElement"]("span", {
className: "".concat(prefixCls, "-separator")
}, separator));
}
return null;
};
BreadcrumbItem_BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;
/* harmony default export */ var breadcrumb_BreadcrumbItem = (BreadcrumbItem_BreadcrumbItem);
// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/BreadcrumbSeparator.js
var BreadcrumbSeparator_BreadcrumbSeparator = function BreadcrumbSeparator(_ref) {
var children = _ref.children;
var _React$useContext = react["useContext"](context["b" /* ConfigContext */]),
getPrefixCls = _React$useContext.getPrefixCls;
var prefixCls = getPrefixCls('breadcrumb');
return /*#__PURE__*/react["createElement"]("span", {
className: "".concat(prefixCls, "-separator")
}, children || '/');
};
BreadcrumbSeparator_BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true;
/* harmony default export */ var breadcrumb_BreadcrumbSeparator = (BreadcrumbSeparator_BreadcrumbSeparator);
// EXTERNAL MODULE: ./node_modules/antd/es/menu/index.js + 16 modules
var menu = __webpack_require__("BvKs");
// EXTERNAL MODULE: ./node_modules/antd/es/_util/devWarning.js
var devWarning = __webpack_require__("uaoM");
// EXTERNAL MODULE: ./node_modules/antd/es/_util/reactNode.js
var reactNode = __webpack_require__("0n0R");
// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/Breadcrumb.js
var Breadcrumb_rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
function getBreadcrumbName(route, params) {
if (!route.breadcrumbName) {
return null;
}
var paramsKeys = Object.keys(params).join('|');
var name = route.breadcrumbName.replace(new RegExp(":(".concat(paramsKeys, ")"), 'g'), function (replacement, key) {
return params[key] || replacement;
});
return name;
}
function defaultItemRender(route, params, routes, paths) {
var isLastItem = routes.indexOf(route) === routes.length - 1;
var name = getBreadcrumbName(route, params);
return isLastItem ? /*#__PURE__*/react["createElement"]("span", null, name) : /*#__PURE__*/react["createElement"]("a", {
href: "#/".concat(paths.join('/'))
}, name);
}
var getPath = function getPath(path, params) {
path = (path || '').replace(/^\//, '');
Object.keys(params).forEach(function (key) {
path = path.replace(":".concat(key), params[key]);
});
return path;
};
var Breadcrumb_addChildPath = function addChildPath(paths) {
var childPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
var params = arguments.length > 2 ? arguments[2] : undefined;
var originalPaths = toConsumableArray_default()(paths);
var path = getPath(childPath, params);
if (path) {
originalPaths.push(path);
}
return originalPaths;
};
var Breadcrumb_Breadcrumb = function Breadcrumb(_a) {
var customizePrefixCls = _a.prefixCls,
_a$separator = _a.separator,
separator = _a$separator === void 0 ? '/' : _a$separator,
style = _a.style,
className = _a.className,
routes = _a.routes,
children = _a.children,
_a$itemRender = _a.itemRender,
itemRender = _a$itemRender === void 0 ? defaultItemRender : _a$itemRender,
_a$params = _a.params,
params = _a$params === void 0 ? {} : _a$params,
restProps = Breadcrumb_rest(_a, ["prefixCls", "separator", "style", "className", "routes", "children", "itemRender", "params"]);
var _React$useContext = react["useContext"](context["b" /* ConfigContext */]),
getPrefixCls = _React$useContext.getPrefixCls,
direction = _React$useContext.direction;
var crumbs;
var prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
if (routes && routes.length > 0) {
// generated by route
var paths = [];
crumbs = routes.map(function (route) {
var path = getPath(route.path, params);
if (path) {
paths.push(path);
} // generated overlay by route.children
var overlay;
if (route.children && route.children.length) {
overlay = /*#__PURE__*/react["createElement"](menu["a" /* default */], null, route.children.map(function (child) {
return /*#__PURE__*/react["createElement"](menu["a" /* default */].Item, {
key: child.path || child.breadcrumbName
}, itemRender(child, params, routes, Breadcrumb_addChildPath(paths, child.path, params)));
}));
}
return /*#__PURE__*/react["createElement"](breadcrumb_BreadcrumbItem, {
overlay: overlay,
separator: separator,
key: path || route.breadcrumbName
}, itemRender(route, params, routes, paths));
});
} else if (children) {
crumbs = Object(toArray["a" /* default */])(children).map(function (element, index) {
if (!element) {
return element;
}
Object(devWarning["a" /* default */])(element.type && (element.type.__ANT_BREADCRUMB_ITEM === true || element.type.__ANT_BREADCRUMB_SEPARATOR === true), 'Breadcrumb', "Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children");
return Object(reactNode["a" /* cloneElement */])(element, {
separator: separator,
key: index
});
});
}
var breadcrumbClassName = classnames_default()(className, prefixCls, defineProperty_default()({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'));
return /*#__PURE__*/react["createElement"]("div", extends_default()({
className: breadcrumbClassName,
style: style
}, restProps), crumbs);
};
Breadcrumb_Breadcrumb.Item = breadcrumb_BreadcrumbItem;
Breadcrumb_Breadcrumb.Separator = breadcrumb_BreadcrumbSeparator;
/* harmony default export */ var breadcrumb_Breadcrumb = (Breadcrumb_Breadcrumb);
// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/index.js
/* harmony default export */ var breadcrumb = __webpack_exports__["a"] = (breadcrumb_Breadcrumb);
/***/ }),
/***/ "g9YV":
/*!***************************************************!*\
!*** ./node_modules/antd/es/table/style/index.js ***!
\***************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH");
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "pED+");
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _button_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../button/style */ "+L6B");
/* harmony import */ var _empty_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../empty/style */ "R9oj");
/* harmony import */ var _radio_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../radio/style */ "7Kak");
/* harmony import */ var _checkbox_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../checkbox/style */ "sRBo");
/* harmony import */ var _dropdown_style__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../dropdown/style */ "qVdP");
/* harmony import */ var _spin_style__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../spin/style */ "T2oS");
/* harmony import */ var _pagination_style__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../pagination/style */ "DjyN");
/* harmony import */ var _tooltip_style__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../tooltip/style */ "5Dmo");
// style dependencies
// deps-lint-skip: menu
// deps-lint-skip: grid
/***/ }),
/***/ "hkKa":
/*!************************************************************!*\
!*** ./node_modules/antd/es/_util/hooks/useForceUpdate.js ***!
\************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useForceUpdate; });
/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "J4zp");
/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
function useForceUpdate() {
var _React$useReducer = react__WEBPACK_IMPORTED_MODULE_1__["useReducer"](function (x) {
return x + 1;
}, 0),
_React$useReducer2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_React$useReducer, 2),
forceUpdate = _React$useReducer2[1];
return forceUpdate;
}
/***/ }),
/***/ "i8CU":
/*!***********************************************************!*\
!*** ./node_modules/@ant-design/icons/CaretUpOutlined.js ***!
\***********************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _CaretUpOutlined = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/CaretUpOutlined */ "Fm1+"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _default = _CaretUpOutlined;
exports.default = _default;
module.exports = _default;
/***/ }),
/***/ "pED+":
/*!*****************************************************!*\
!*** ./node_modules/antd/es/table/style/index.less ***!
\*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "qWUW":
/*!***********************************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/icons/CaretDownOutlined.js ***!
\***********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "284h");
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9"));
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI"));
var _CaretDownOutlined = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/CaretDownOutlined */ "DL4k"));
var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl"));
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var CaretDownOutlined = function CaretDownOutlined(props, ref) {
return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
ref: ref,
icon: _CaretDownOutlined.default
}));
};
CaretDownOutlined.displayName = 'CaretDownOutlined';
var _default = /*#__PURE__*/React.forwardRef(CaretDownOutlined);
exports.default = _default;
/***/ }),
/***/ "sPJy":
/*!********************************************************!*\
!*** ./node_modules/antd/es/breadcrumb/style/index.js ***!
\********************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH");
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "AOa7");
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _menu_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../menu/style */ "lUTK");
/* harmony import */ var _dropdown_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dropdown/style */ "qVdP");
/***/ }),
/***/ "sPtV":
/*!**********************************************************!*\
!*** ./node_modules/antd/es/_util/hooks/useSyncState.js ***!
\**********************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useSyncState; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _useForceUpdate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./useForceUpdate */ "hkKa");
function useSyncState(initialValue) {
var ref = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](initialValue);
var forceUpdate = Object(_useForceUpdate__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])();
return [function () {
return ref.current;
}, function (newValue) {
ref.current = newValue; // re-render
forceUpdate();
}];
}
/***/ }),
/***/ "t23M":
/*!*****************************************************!*\
!*** ./node_modules/rc-resize-observer/es/index.js ***!
\*****************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "VTBJ");
/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "1OyB");
/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "vuIU");
/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "Ji7U");
/* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "LK+K");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var rc_util_es_Dom_findDOMNode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/Dom/findDOMNode */ "m+aA");
/* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-util/es/Children/toArray */ "Zm9Q");
/* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-util/es/warning */ "Kwbf");
/* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-util/es/ref */ "c+Xe");
/* harmony import */ var resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! resize-observer-polyfill */ "bdgK");
var INTERNAL_PREFIX_KEY = 'rc-observer-key'; // Still need to be compatible with React 15, we use class component here
var ReactResizeObserver = /*#__PURE__*/function (_React$Component) {
Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(ReactResizeObserver, _React$Component);
var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(ReactResizeObserver);
function ReactResizeObserver() {
var _this;
Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, ReactResizeObserver);
_this = _super.apply(this, arguments);
_this.resizeObserver = null;
_this.childNode = null;
_this.currentElement = null;
_this.state = {
width: 0,
height: 0,
offsetHeight: 0,
offsetWidth: 0
};
_this.onResize = function (entries) {
var onResize = _this.props.onResize;
var target = entries[0].target;
var _target$getBoundingCl = target.getBoundingClientRect(),
width = _target$getBoundingCl.width,
height = _target$getBoundingCl.height;
var offsetWidth = target.offsetWidth,
offsetHeight = target.offsetHeight;
/**
* Resize observer trigger when content size changed.
* In most case we just care about element size,
* let's use `boundary` instead of `contentRect` here to avoid shaking.
*/
var fixedWidth = Math.floor(width);
var fixedHeight = Math.floor(height);
if (_this.state.width !== fixedWidth || _this.state.height !== fixedHeight || _this.state.offsetWidth !== offsetWidth || _this.state.offsetHeight !== offsetHeight) {
var size = {
width: fixedWidth,
height: fixedHeight,
offsetWidth: offsetWidth,
offsetHeight: offsetHeight
};
_this.setState(size);
if (onResize) {
// defer the callback but not defer to next frame
Promise.resolve().then(function () {
onResize(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, size), {}, {
offsetWidth: offsetWidth,
offsetHeight: offsetHeight
}));
});
}
}
};
_this.setChildNode = function (node) {
_this.childNode = node;
};
return _this;
}
Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(ReactResizeObserver, [{
key: "componentDidMount",
value: function componentDidMount() {
this.onComponentUpdated();
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate() {
this.onComponentUpdated();
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.destroyObserver();
}
}, {
key: "onComponentUpdated",
value: function onComponentUpdated() {
var disabled = this.props.disabled; // Unregister if disabled
if (disabled) {
this.destroyObserver();
return;
} // Unregister if element changed
var element = Object(rc_util_es_Dom_findDOMNode__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(this.childNode || this);
var elementChanged = element !== this.currentElement;
if (elementChanged) {
this.destroyObserver();
this.currentElement = element;
}
if (!this.resizeObserver && element) {
this.resizeObserver = new resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_10__["default"](this.onResize);
this.resizeObserver.observe(element);
}
}
}, {
key: "destroyObserver",
value: function destroyObserver() {
if (this.resizeObserver) {
this.resizeObserver.disconnect();
this.resizeObserver = null;
}
}
}, {
key: "render",
value: function render() {
var children = this.props.children;
var childNodes = Object(rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(children);
if (childNodes.length > 1) {
Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(false, 'Find more than one child node with `children` in ResizeObserver. Will only observe first one.');
} else if (childNodes.length === 0) {
Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(false, '`children` of ResizeObserver is empty. Nothing is in observe.');
return null;
}
var childNode = childNodes[0];
if (react__WEBPACK_IMPORTED_MODULE_5__["isValidElement"](childNode) && Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_9__[/* supportRef */ "c"])(childNode)) {
var ref = childNode.ref;
childNodes[0] = react__WEBPACK_IMPORTED_MODULE_5__["cloneElement"](childNode, {
ref: Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_9__[/* composeRef */ "a"])(ref, this.setChildNode)
});
}
return childNodes.length === 1 ? childNodes[0] : childNodes.map(function (node, index) {
if (!react__WEBPACK_IMPORTED_MODULE_5__["isValidElement"](node) || 'key' in node && node.key !== null) {
return node;
}
return react__WEBPACK_IMPORTED_MODULE_5__["cloneElement"](node, {
key: "".concat(INTERNAL_PREFIX_KEY, "-").concat(index)
});
});
}
}]);
return ReactResizeObserver;
}(react__WEBPACK_IMPORTED_MODULE_5__["Component"]);
ReactResizeObserver.displayName = 'ResizeObserver';
/* harmony default export */ __webpack_exports__["a"] = (ReactResizeObserver);
/***/ }),
/***/ "wCAj":
/*!**********************************************************!*\
!*** ./node_modules/antd/es/table/index.js + 53 modules ***!
\**********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/CaretDownOutlined.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/CaretUpOutlined.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/DownOutlined.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/FilterFilled.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toArray.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toConsumableArray.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/typeof.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/hooks/useSyncState.js because of ./node_modules/antd/es/upload/Upload.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/empty/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/hooks/useBreakpoint.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale/default.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/isEqual.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMergedState.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/typeof.js
var helpers_typeof = __webpack_require__("cDf5");
var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
var defineProperty = __webpack_require__("lSNA");
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__("J4zp");
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
var helpers_extends = __webpack_require__("pVnL");
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
var react_default = /*#__PURE__*/__webpack_require__.n(react);
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("TSYQ");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/omit.js/es/index.js
var es = __webpack_require__("BGR+");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var esm_defineProperty = __webpack_require__("rePB");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("VTBJ");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = __webpack_require__("KQm4");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("U8pU");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var esm_slicedToArray = __webpack_require__("ODXe");
// EXTERNAL MODULE: ./node_modules/shallowequal/index.js
var shallowequal = __webpack_require__("Gytx");
var shallowequal_default = /*#__PURE__*/__webpack_require__.n(shallowequal);
// EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js
var warning = __webpack_require__("Kwbf");
// EXTERNAL MODULE: ./node_modules/rc-resize-observer/es/index.js
var rc_resize_observer_es = __webpack_require__("t23M");
// EXTERNAL MODULE: ./node_modules/rc-util/es/getScrollBarSize.js
var getScrollBarSize = __webpack_require__("qx4F");
// CONCATENATED MODULE: ./node_modules/rc-table/es/sugar/ColumnGroup.js
/* istanbul ignore next */
/**
* This is a syntactic sugar for `columns` prop.
* So HOC will not work on this.
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function ColumnGroup(_) {
return null;
}
/* harmony default export */ var sugar_ColumnGroup = (ColumnGroup);
// CONCATENATED MODULE: ./node_modules/rc-table/es/sugar/Column.js
/* istanbul ignore next */
/**
* This is a syntactic sugar for `columns` prop.
* So HOC will not work on this.
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function Column(_) {
return null;
}
/* harmony default export */ var sugar_Column = (Column);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__("Ff2n");
// EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js
var es_ref = __webpack_require__("c+Xe");
// CONCATENATED MODULE: ./node_modules/rc-table/es/utils/valueUtil.js
var INTERNAL_KEY_PREFIX = 'RC_TABLE_KEY';
function toArray(arr) {
if (arr === undefined || arr === null) {
return [];
}
return Array.isArray(arr) ? arr : [arr];
}
function getPathValue(record, path) {
// Skip if path is empty
if (!path && typeof path !== 'number') {
return record;
}
var pathList = toArray(path);
var current = record;
for (var i = 0; i < pathList.length; i += 1) {
if (!current) {
return null;
}
var prop = pathList[i];
current = current[prop];
}
return current;
}
function getColumnsKey(columns) {
var columnKeys = [];
var keys = {};
columns.forEach(function (column) {
var _ref = column || {},
key = _ref.key,
dataIndex = _ref.dataIndex;
var mergedKey = key || toArray(dataIndex).join('-') || INTERNAL_KEY_PREFIX;
while (keys[mergedKey]) {
mergedKey = "".concat(mergedKey, "_next");
}
keys[mergedKey] = true;
columnKeys.push(mergedKey);
});
return columnKeys;
}
function mergeObject() {
var merged = {};
/* eslint-disable no-param-reassign */
function fillProps(obj, clone) {
if (clone) {
Object.keys(clone).forEach(function (key) {
var value = clone[key];
if (value && Object(esm_typeof["a" /* default */])(value) === 'object') {
obj[key] = obj[key] || {};
fillProps(obj[key], value);
} else {
obj[key] = value;
}
});
}
}
/* eslint-enable */
for (var _len = arguments.length, objects = new Array(_len), _key = 0; _key < _len; _key++) {
objects[_key] = arguments[_key];
}
objects.forEach(function (clone) {
fillProps(merged, clone);
});
return merged;
}
function validateValue(val) {
return val !== null && val !== undefined;
}
// CONCATENATED MODULE: ./node_modules/rc-table/es/Cell/index.js
function isRenderCell(data) {
return data && Object(esm_typeof["a" /* default */])(data) === 'object' && !Array.isArray(data) && !react["isValidElement"](data);
}
function isRefComponent(component) {
// String tag component also support ref
if (typeof component === 'string') {
return true;
}
return Object(es_ref["c" /* supportRef */])(component);
}
function Cell(_ref, ref) {
var _classNames;
var prefixCls = _ref.prefixCls,
className = _ref.className,
record = _ref.record,
index = _ref.index,
dataIndex = _ref.dataIndex,
render = _ref.render,
children = _ref.children,
_ref$component = _ref.component,
Component = _ref$component === void 0 ? 'td' : _ref$component,
colSpan = _ref.colSpan,
rowSpan = _ref.rowSpan,
fixLeft = _ref.fixLeft,
fixRight = _ref.fixRight,
firstFixLeft = _ref.firstFixLeft,
lastFixLeft = _ref.lastFixLeft,
firstFixRight = _ref.firstFixRight,
lastFixRight = _ref.lastFixRight,
appendNode = _ref.appendNode,
_ref$additionalProps = _ref.additionalProps,
additionalProps = _ref$additionalProps === void 0 ? {} : _ref$additionalProps,
ellipsis = _ref.ellipsis,
align = _ref.align,
rowType = _ref.rowType,
isSticky = _ref.isSticky;
var cellPrefixCls = "".concat(prefixCls, "-cell"); // ==================== Child Node ====================
var cellProps;
var childNode;
if (children) {
childNode = children;
} else {
var value = getPathValue(record, dataIndex); // Customize render node
childNode = value;
if (render) {
var renderData = render(value, record, index);
if (isRenderCell(renderData)) {
childNode = renderData.children;
cellProps = renderData.props;
} else {
childNode = renderData;
}
}
} // Not crash if final `childNode` is not validate ReactNode
if (Object(esm_typeof["a" /* default */])(childNode) === 'object' && !Array.isArray(childNode) && !react["isValidElement"](childNode)) {
childNode = null;
}
if (ellipsis && (lastFixLeft || firstFixRight)) {
childNode = react["createElement"]("span", {
className: "".concat(cellPrefixCls, "-content")
}, childNode);
}
var _ref2 = cellProps || {},
cellColSpan = _ref2.colSpan,
cellRowSpan = _ref2.rowSpan,
cellStyle = _ref2.style,
cellClassName = _ref2.className,
restCellProps = Object(objectWithoutProperties["a" /* default */])(_ref2, ["colSpan", "rowSpan", "style", "className"]);
var mergedColSpan = cellColSpan !== undefined ? cellColSpan : colSpan;
var mergedRowSpan = cellRowSpan !== undefined ? cellRowSpan : rowSpan;
if (mergedColSpan === 0 || mergedRowSpan === 0) {
return null;
} // ====================== Fixed =======================
var fixedStyle = {};
var isFixLeft = typeof fixLeft === 'number';
var isFixRight = typeof fixRight === 'number';
if (isFixLeft) {
fixedStyle.position = 'sticky';
fixedStyle.left = fixLeft;
}
if (isFixRight) {
fixedStyle.position = 'sticky';
fixedStyle.right = fixRight;
} // ====================== Align =======================
var alignStyle = {};
if (align) {
alignStyle.textAlign = align;
} // ====================== Render ======================
var title;
var ellipsisConfig = ellipsis === true ? {
showTitle: true
} : ellipsis;
if (ellipsisConfig && (ellipsisConfig.showTitle || rowType === 'header')) {
if (typeof childNode === 'string' || typeof childNode === 'number') {
title = childNode.toString();
} else if (react["isValidElement"](childNode) && typeof childNode.props.children === 'string') {
title = childNode.props.children;
}
}
var componentProps = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
title: title
}, restCellProps), additionalProps), {}, {
colSpan: mergedColSpan && mergedColSpan !== 1 ? mergedColSpan : null,
rowSpan: mergedRowSpan && mergedRowSpan !== 1 ? mergedRowSpan : null,
className: classnames_default()(cellPrefixCls, className, (_classNames = {}, Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(cellPrefixCls, "-fix-left"), isFixLeft), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(cellPrefixCls, "-fix-left-first"), firstFixLeft), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(cellPrefixCls, "-fix-left-last"), lastFixLeft), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(cellPrefixCls, "-fix-right"), isFixRight), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(cellPrefixCls, "-fix-right-first"), firstFixRight), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(cellPrefixCls, "-fix-right-last"), lastFixRight), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(cellPrefixCls, "-ellipsis"), ellipsis), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(cellPrefixCls, "-with-append"), appendNode), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(cellPrefixCls, "-fix-sticky"), (isFixLeft || isFixRight) && isSticky), _classNames), additionalProps.className, cellClassName),
style: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, additionalProps.style), alignStyle), fixedStyle), cellStyle),
ref: isRefComponent(Component) ? ref : null
});
return react["createElement"](Component, Object.assign({}, componentProps), appendNode, childNode);
}
var RefCell = react["forwardRef"](Cell);
RefCell.displayName = 'Cell';
var MemoCell = react["memo"](RefCell, function (prev, next) {
if (next.shouldCellUpdate) {
return !next.shouldCellUpdate(next.record, prev.record);
}
return false;
});
/* harmony default export */ var es_Cell = (MemoCell);
// CONCATENATED MODULE: ./node_modules/rc-table/es/context/TableContext.js
var TableContext = react["createContext"](null);
/* harmony default export */ var context_TableContext = (TableContext);
// CONCATENATED MODULE: ./node_modules/rc-table/es/utils/fixUtil.js
function getCellFixedInfo(colStart, colEnd, columns, stickyOffsets, direction) {
var startColumn = columns[colStart] || {};
var endColumn = columns[colEnd] || {};
var fixLeft;
var fixRight;
if (startColumn.fixed === 'left') {
fixLeft = stickyOffsets.left[colStart];
} else if (endColumn.fixed === 'right') {
fixRight = stickyOffsets.right[colEnd];
}
var lastFixLeft = false;
var firstFixRight = false;
var lastFixRight = false;
var firstFixLeft = false;
var nextColumn = columns[colEnd + 1];
var prevColumn = columns[colStart - 1];
if (direction === 'rtl') {
if (fixLeft !== undefined) {
var prevFixLeft = prevColumn && prevColumn.fixed === 'left';
firstFixLeft = !prevFixLeft;
} else if (fixRight !== undefined) {
var nextFixRight = nextColumn && nextColumn.fixed === 'right';
lastFixRight = !nextFixRight;
}
} else if (fixLeft !== undefined) {
var nextFixLeft = nextColumn && nextColumn.fixed === 'left';
lastFixLeft = !nextFixLeft;
} else if (fixRight !== undefined) {
var prevFixRight = prevColumn && prevColumn.fixed === 'right';
firstFixRight = !prevFixRight;
}
return {
fixLeft: fixLeft,
fixRight: fixRight,
lastFixLeft: lastFixLeft,
firstFixRight: firstFixRight,
lastFixRight: lastFixRight,
firstFixLeft: firstFixLeft,
isSticky: stickyOffsets.isSticky
};
}
// CONCATENATED MODULE: ./node_modules/rc-table/es/Header/HeaderRow.js
function HeaderRow(_ref) {
var cells = _ref.cells,
stickyOffsets = _ref.stickyOffsets,
flattenColumns = _ref.flattenColumns,
RowComponent = _ref.rowComponent,
CellComponent = _ref.cellComponent,
onHeaderRow = _ref.onHeaderRow,
index = _ref.index;
var _React$useContext = react["useContext"](context_TableContext),
prefixCls = _React$useContext.prefixCls,
direction = _React$useContext.direction;
var rowProps;
if (onHeaderRow) {
rowProps = onHeaderRow(cells.map(function (cell) {
return cell.column;
}), index);
}
var columnsKey = getColumnsKey(cells.map(function (cell) {
return cell.column;
}));
return react["createElement"](RowComponent, Object.assign({}, rowProps), cells.map(function (cell, cellIndex) {
var column = cell.column;
var fixedInfo = getCellFixedInfo(cell.colStart, cell.colEnd, flattenColumns, stickyOffsets, direction);
var additionalProps;
if (column && column.onHeaderCell) {
additionalProps = cell.column.onHeaderCell(column);
}
return react["createElement"](es_Cell, Object.assign({}, cell, {
ellipsis: column.ellipsis,
align: column.align,
component: CellComponent,
prefixCls: prefixCls,
key: columnsKey[cellIndex]
}, fixedInfo, {
additionalProps: additionalProps,
rowType: "header"
}));
}));
}
HeaderRow.displayName = 'HeaderRow';
/* harmony default export */ var Header_HeaderRow = (HeaderRow);
// CONCATENATED MODULE: ./node_modules/rc-table/es/Header/Header.js
function parseHeaderRows(rootColumns) {
var rows = [];
function fillRowCells(columns, colIndex) {
var rowIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
// Init rows
rows[rowIndex] = rows[rowIndex] || [];
var currentColIndex = colIndex;
var colSpans = columns.filter(Boolean).map(function (column) {
var cell = {
key: column.key,
className: column.className || '',
children: column.title,
column: column,
colStart: currentColIndex
};
var colSpan = 1;
var subColumns = column.children;
if (subColumns && subColumns.length > 0) {
colSpan = fillRowCells(subColumns, currentColIndex, rowIndex + 1).reduce(function (total, count) {
return total + count;
}, 0);
cell.hasSubColumns = true;
}
if ('colSpan' in column) {
colSpan = column.colSpan;
}
if ('rowSpan' in column) {
cell.rowSpan = column.rowSpan;
}
cell.colSpan = colSpan;
cell.colEnd = cell.colStart + colSpan - 1;
rows[rowIndex].push(cell);
currentColIndex += colSpan;
return colSpan;
});
return colSpans;
} // Generate `rows` cell data
fillRowCells(rootColumns, 0); // Handle `rowSpan`
var rowCount = rows.length;
var _loop = function _loop(rowIndex) {
rows[rowIndex].forEach(function (cell) {
if (!('rowSpan' in cell) && !cell.hasSubColumns) {
// eslint-disable-next-line no-param-reassign
cell.rowSpan = rowCount - rowIndex;
}
});
};
for (var rowIndex = 0; rowIndex < rowCount; rowIndex += 1) {
_loop(rowIndex);
}
return rows;
}
function Header(_ref) {
var stickyOffsets = _ref.stickyOffsets,
columns = _ref.columns,
flattenColumns = _ref.flattenColumns,
onHeaderRow = _ref.onHeaderRow;
var _React$useContext = react["useContext"](context_TableContext),
prefixCls = _React$useContext.prefixCls,
getComponent = _React$useContext.getComponent;
var rows = react["useMemo"](function () {
return parseHeaderRows(columns);
}, [columns]);
var WrapperComponent = getComponent(['header', 'wrapper'], 'thead');
var trComponent = getComponent(['header', 'row'], 'tr');
var thComponent = getComponent(['header', 'cell'], 'th');
return react["createElement"](WrapperComponent, {
className: "".concat(prefixCls, "-thead")
}, rows.map(function (row, rowIndex) {
var rowNode = react["createElement"](Header_HeaderRow, {
key: rowIndex,
flattenColumns: flattenColumns,
cells: row,
stickyOffsets: stickyOffsets,
rowComponent: trComponent,
cellComponent: thComponent,
onHeaderRow: onHeaderRow,
index: rowIndex
});
return rowNode;
}));
}
/* harmony default export */ var Header_Header = (Header);
// CONCATENATED MODULE: ./node_modules/rc-table/es/utils/legacyUtil.js
var INTERNAL_COL_DEFINE = 'RC_TABLE_INTERNAL_COL_DEFINE';
function getExpandableProps(props) {
var expandable = props.expandable,
legacyExpandableConfig = Object(objectWithoutProperties["a" /* default */])(props, ["expandable"]);
if ('expandable' in props) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, legacyExpandableConfig), expandable);
}
if (false) {}
return legacyExpandableConfig;
}
/**
* Returns only data- and aria- key/value pairs
* @param {object} props
*/
function getDataAndAriaProps(props) {
/* eslint-disable no-param-reassign */
return Object.keys(props).reduce(function (memo, key) {
if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-') {
memo[key] = props[key];
}
return memo;
}, {});
/* eslint-enable */
}
// CONCATENATED MODULE: ./node_modules/rc-table/es/ColGroup.js
function ColGroup(_ref) {
var colWidths = _ref.colWidths,
columns = _ref.columns,
columCount = _ref.columCount;
var cols = [];
var len = columCount || columns.length; // Only insert col with width & additional props
// Skip if rest col do not have any useful info
var mustInsert = false;
for (var i = len - 1; i >= 0; i -= 1) {
var width = colWidths[i];
var column = columns && columns[i];
var additionalProps = column && column[INTERNAL_COL_DEFINE];
if (width || additionalProps || mustInsert) {
cols.unshift(react["createElement"]("col", Object.assign({
key: i,
style: {
width: width,
minWidth: width
}
}, additionalProps)));
mustInsert = true;
}
}
return react["createElement"]("colgroup", null, cols);
}
/* harmony default export */ var es_ColGroup = (ColGroup);
// CONCATENATED MODULE: ./node_modules/rc-table/es/Header/FixedHeader.js
function useColumnWidth(colWidths, columCount) {
return Object(react["useMemo"])(function () {
var cloneColumns = [];
for (var i = 0; i < columCount; i += 1) {
var val = colWidths[i];
if (val !== undefined) {
cloneColumns[i] = val;
} else {
return null;
}
}
return cloneColumns;
}, [colWidths.join('_'), columCount]);
}
var FixedHeader = react["forwardRef"](function (_ref, ref) {
var noData = _ref.noData,
columns = _ref.columns,
flattenColumns = _ref.flattenColumns,
colWidths = _ref.colWidths,
columCount = _ref.columCount,
stickyOffsets = _ref.stickyOffsets,
direction = _ref.direction,
fixHeader = _ref.fixHeader,
offsetHeader = _ref.offsetHeader,
stickyClassName = _ref.stickyClassName,
onScroll = _ref.onScroll,
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["noData", "columns", "flattenColumns", "colWidths", "columCount", "stickyOffsets", "direction", "fixHeader", "offsetHeader", "stickyClassName", "onScroll"]);
var _React$useContext = react["useContext"](context_TableContext),
prefixCls = _React$useContext.prefixCls,
scrollbarSize = _React$useContext.scrollbarSize,
isSticky = _React$useContext.isSticky;
var combinationScrollBarSize = isSticky && !fixHeader ? 0 : scrollbarSize; // Pass wheel to scroll event
var scrollRef = react["useRef"](null);
var setScrollRef = react["useCallback"](function (element) {
Object(es_ref["b" /* fillRef */])(ref, element);
Object(es_ref["b" /* fillRef */])(scrollRef, element);
}, []);
react["useEffect"](function () {
var _scrollRef$current;
function onWheel(e) {
var currentTarget = e.currentTarget,
deltaX = e.deltaX;
if (deltaX) {
onScroll({
currentTarget: currentTarget,
scrollLeft: currentTarget.scrollLeft + deltaX
});
e.preventDefault();
}
}
(_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : _scrollRef$current.addEventListener('wheel', onWheel);
return function () {
var _scrollRef$current2;
(_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 ? void 0 : _scrollRef$current2.removeEventListener('wheel', onWheel);
};
}, []); // Add scrollbar column
var lastColumn = flattenColumns[flattenColumns.length - 1];
var ScrollBarColumn = {
fixed: lastColumn ? lastColumn.fixed : null,
onHeaderCell: function onHeaderCell() {
return {
className: "".concat(prefixCls, "-cell-scrollbar")
};
}
};
var columnsWithScrollbar = Object(react["useMemo"])(function () {
return combinationScrollBarSize ? [].concat(Object(toConsumableArray["a" /* default */])(columns), [ScrollBarColumn]) : columns;
}, [combinationScrollBarSize, columns]);
var flattenColumnsWithScrollbar = Object(react["useMemo"])(function () {
return combinationScrollBarSize ? [].concat(Object(toConsumableArray["a" /* default */])(flattenColumns), [ScrollBarColumn]) : flattenColumns;
}, [combinationScrollBarSize, flattenColumns]); // Calculate the sticky offsets
var headerStickyOffsets = Object(react["useMemo"])(function () {
var right = stickyOffsets.right,
left = stickyOffsets.left;
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, stickyOffsets), {}, {
left: direction === 'rtl' ? [].concat(Object(toConsumableArray["a" /* default */])(left.map(function (width) {
return width + combinationScrollBarSize;
})), [0]) : left,
right: direction === 'rtl' ? right : [].concat(Object(toConsumableArray["a" /* default */])(right.map(function (width) {
return width + combinationScrollBarSize;
})), [0]),
isSticky: isSticky
});
}, [combinationScrollBarSize, stickyOffsets, isSticky]);
var mergedColumnWidth = useColumnWidth(colWidths, columCount);
return react["createElement"]("div", {
style: Object(objectSpread2["a" /* default */])({
overflow: 'hidden'
}, isSticky ? {
top: offsetHeader
} : {}),
ref: setScrollRef,
className: classnames_default()("".concat(prefixCls, "-header"), Object(esm_defineProperty["a" /* default */])({}, stickyClassName, !!stickyClassName))
}, react["createElement"]("table", {
style: {
tableLayout: 'fixed',
visibility: noData || mergedColumnWidth ? null : 'hidden'
}
}, react["createElement"](es_ColGroup, {
colWidths: mergedColumnWidth ? [].concat(Object(toConsumableArray["a" /* default */])(mergedColumnWidth), [combinationScrollBarSize]) : [],
columCount: columCount + 1,
columns: flattenColumnsWithScrollbar
}), react["createElement"](Header_Header, Object.assign({}, props, {
stickyOffsets: headerStickyOffsets,
columns: columnsWithScrollbar,
flattenColumns: flattenColumnsWithScrollbar
}))));
});
FixedHeader.displayName = 'FixedHeader';
/* harmony default export */ var Header_FixedHeader = (FixedHeader);
// CONCATENATED MODULE: ./node_modules/rc-table/es/context/BodyContext.js
var BodyContext = react["createContext"](null);
/* harmony default export */ var context_BodyContext = (BodyContext);
// CONCATENATED MODULE: ./node_modules/rc-table/es/Body/ExpandedRow.js
function ExpandedRow(_ref) {
var prefixCls = _ref.prefixCls,
children = _ref.children,
Component = _ref.component,
cellComponent = _ref.cellComponent,
fixHeader = _ref.fixHeader,
fixColumn = _ref.fixColumn,
horizonScroll = _ref.horizonScroll,
className = _ref.className,
expanded = _ref.expanded,
componentWidth = _ref.componentWidth,
colSpan = _ref.colSpan;
var _React$useContext = react["useContext"](context_TableContext),
scrollbarSize = _React$useContext.scrollbarSize; // Cache render node
return react["useMemo"](function () {
var contentNode = children;
if (fixColumn) {
contentNode = react["createElement"]("div", {
style: {
width: componentWidth - (fixHeader ? scrollbarSize : 0),
position: 'sticky',
left: 0,
overflow: 'hidden'
},
className: "".concat(prefixCls, "-expanded-row-fixed")
}, contentNode);
}
return react["createElement"](Component, {
className: className,
style: {
display: expanded ? null : 'none'
}
}, react["createElement"](es_Cell, {
component: cellComponent,
prefixCls: prefixCls,
colSpan: colSpan
}, contentNode));
}, [children, Component, fixHeader, horizonScroll, className, expanded, componentWidth, colSpan, scrollbarSize]);
}
/* harmony default export */ var Body_ExpandedRow = (ExpandedRow);
// CONCATENATED MODULE: ./node_modules/rc-table/es/Body/BodyRow.js
function BodyRow(props) {
var className = props.className,
style = props.style,
record = props.record,
index = props.index,
rowKey = props.rowKey,
getRowKey = props.getRowKey,
rowExpandable = props.rowExpandable,
expandedKeys = props.expandedKeys,
onRow = props.onRow,
_props$indent = props.indent,
indent = _props$indent === void 0 ? 0 : _props$indent,
RowComponent = props.rowComponent,
cellComponent = props.cellComponent,
childrenColumnName = props.childrenColumnName;
var _React$useContext = react["useContext"](context_TableContext),
prefixCls = _React$useContext.prefixCls,
fixedInfoList = _React$useContext.fixedInfoList;
var _React$useContext2 = react["useContext"](context_BodyContext),
fixHeader = _React$useContext2.fixHeader,
fixColumn = _React$useContext2.fixColumn,
horizonScroll = _React$useContext2.horizonScroll,
componentWidth = _React$useContext2.componentWidth,
flattenColumns = _React$useContext2.flattenColumns,
expandableType = _React$useContext2.expandableType,
expandRowByClick = _React$useContext2.expandRowByClick,
onTriggerExpand = _React$useContext2.onTriggerExpand,
rowClassName = _React$useContext2.rowClassName,
expandedRowClassName = _React$useContext2.expandedRowClassName,
indentSize = _React$useContext2.indentSize,
expandIcon = _React$useContext2.expandIcon,
expandedRowRender = _React$useContext2.expandedRowRender,
expandIconColumnIndex = _React$useContext2.expandIconColumnIndex;
var _React$useState = react["useState"](false),
_React$useState2 = Object(esm_slicedToArray["a" /* default */])(_React$useState, 2),
expandRended = _React$useState2[0],
setExpandRended = _React$useState2[1];
var expanded = expandedKeys && expandedKeys.has(props.recordKey);
react["useEffect"](function () {
if (expanded) {
setExpandRended(true);
}
}, [expanded]);
var rowSupportExpand = expandableType === 'row' && (!rowExpandable || rowExpandable(record)); // Only when row is not expandable and `children` exist in record
var nestExpandable = expandableType === 'nest';
var hasNestChildren = childrenColumnName && record && record[childrenColumnName];
var mergedExpandable = rowSupportExpand || nestExpandable; // =========================== onRow ===========================
var additionalProps;
if (onRow) {
additionalProps = onRow(record, index);
}
var onClick = function onClick(event) {
if (expandRowByClick && mergedExpandable) {
onTriggerExpand(record, event);
}
if (additionalProps && additionalProps.onClick) {
var _additionalProps;
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
(_additionalProps = additionalProps).onClick.apply(_additionalProps, [event].concat(args));
}
}; // ======================== Base tr row ========================
var computeRowClassName;
if (typeof rowClassName === 'string') {
computeRowClassName = rowClassName;
} else if (typeof rowClassName === 'function') {
computeRowClassName = rowClassName(record, index, indent);
}
var columnsKey = getColumnsKey(flattenColumns);
var baseRowNode = react["createElement"](RowComponent, Object.assign({}, additionalProps, {
"data-row-key": rowKey,
className: classnames_default()(className, "".concat(prefixCls, "-row"), "".concat(prefixCls, "-row-level-").concat(indent), computeRowClassName, additionalProps && additionalProps.className),
style: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, style), additionalProps ? additionalProps.style : null),
onClick: onClick
}), flattenColumns.map(function (column, colIndex) {
var render = column.render,
dataIndex = column.dataIndex,
columnClassName = column.className;
var key = columnsKey[colIndex];
var fixedInfo = fixedInfoList[colIndex]; // ============= Used for nest expandable =============
var appendCellNode;
if (colIndex === (expandIconColumnIndex || 0) && nestExpandable) {
appendCellNode = react["createElement"](react["Fragment"], null, react["createElement"]("span", {
style: {
paddingLeft: "".concat(indentSize * indent, "px")
},
className: "".concat(prefixCls, "-row-indent indent-level-").concat(indent)
}), expandIcon({
prefixCls: prefixCls,
expanded: expanded,
expandable: hasNestChildren,
record: record,
onExpand: onTriggerExpand
}));
}
var additionalCellProps;
if (column.onCell) {
additionalCellProps = column.onCell(record, index);
}
return react["createElement"](es_Cell, Object.assign({
className: columnClassName,
ellipsis: column.ellipsis,
align: column.align,
component: cellComponent,
prefixCls: prefixCls,
key: key,
record: record,
index: index,
dataIndex: dataIndex,
render: render,
shouldCellUpdate: column.shouldCellUpdate
}, fixedInfo, {
appendNode: appendCellNode,
additionalProps: additionalCellProps
}));
})); // ======================== Expand Row =========================
var expandRowNode;
if (rowSupportExpand && (expandRended || expanded)) {
var expandContent = expandedRowRender(record, index, indent + 1, expanded);
var computedExpandedRowClassName = expandedRowClassName && expandedRowClassName(record, index, indent);
expandRowNode = react["createElement"](Body_ExpandedRow, {
expanded: expanded,
className: classnames_default()("".concat(prefixCls, "-expanded-row"), "".concat(prefixCls, "-expanded-row-level-").concat(indent + 1), computedExpandedRowClassName),
prefixCls: prefixCls,
fixHeader: fixHeader,
fixColumn: fixColumn,
horizonScroll: horizonScroll,
component: RowComponent,
componentWidth: componentWidth,
cellComponent: cellComponent,
colSpan: flattenColumns.length
}, expandContent);
} // ========================= Nest Row ==========================
var nestRowNode;
if (hasNestChildren && expanded) {
nestRowNode = (record[childrenColumnName] || []).map(function (subRecord, subIndex) {
var subKey = getRowKey(subRecord, subIndex);
return react["createElement"](BodyRow, Object.assign({}, props, {
key: subKey,
rowKey: subKey,
record: subRecord,
recordKey: subKey,
index: subIndex,
indent: indent + 1
}));
});
}
return react["createElement"](react["Fragment"], null, baseRowNode, expandRowNode, nestRowNode);
}
BodyRow.displayName = 'BodyRow';
/* harmony default export */ var Body_BodyRow = (BodyRow);
// CONCATENATED MODULE: ./node_modules/rc-table/es/context/ResizeContext.js
var ResizeContext = react["createContext"](null);
/* harmony default export */ var context_ResizeContext = (ResizeContext);
// CONCATENATED MODULE: ./node_modules/rc-table/es/Body/MeasureCell.js
function MeasureCell(_ref) {
var columnKey = _ref.columnKey,
onColumnResize = _ref.onColumnResize;
var cellRef = react["useRef"]();
react["useEffect"](function () {
if (cellRef.current) {
onColumnResize(columnKey, cellRef.current.offsetWidth);
}
}, []);
return react["createElement"](rc_resize_observer_es["a" /* default */], {
onResize: function onResize(_ref2) {
var offsetWidth = _ref2.offsetWidth;
onColumnResize(columnKey, offsetWidth);
}
}, react["createElement"]("td", {
ref: cellRef,
style: {
padding: 0,
border: 0,
height: 0
}
}, react["createElement"]("div", {
style: {
height: 0,
overflow: 'hidden'
}
}, "\xA0")));
}
// CONCATENATED MODULE: ./node_modules/rc-table/es/Body/index.js
function Body(_ref) {
var data = _ref.data,
getRowKey = _ref.getRowKey,
measureColumnWidth = _ref.measureColumnWidth,
expandedKeys = _ref.expandedKeys,
onRow = _ref.onRow,
rowExpandable = _ref.rowExpandable,
emptyNode = _ref.emptyNode,
childrenColumnName = _ref.childrenColumnName;
var _React$useContext = react["useContext"](context_ResizeContext),
onColumnResize = _React$useContext.onColumnResize;
var _React$useContext2 = react["useContext"](context_TableContext),
prefixCls = _React$useContext2.prefixCls,
getComponent = _React$useContext2.getComponent;
var _React$useContext3 = react["useContext"](context_BodyContext),
fixHeader = _React$useContext3.fixHeader,
horizonScroll = _React$useContext3.horizonScroll,
flattenColumns = _React$useContext3.flattenColumns,
componentWidth = _React$useContext3.componentWidth;
return react["useMemo"](function () {
var WrapperComponent = getComponent(['body', 'wrapper'], 'tbody');
var trComponent = getComponent(['body', 'row'], 'tr');
var tdComponent = getComponent(['body', 'cell'], 'td');
var rows;
if (data.length) {
rows = data.map(function (record, index) {
var key = getRowKey(record, index);
return react["createElement"](Body_BodyRow, {
key: key,
rowKey: key,
record: record,
recordKey: key,
index: index,
rowComponent: trComponent,
cellComponent: tdComponent,
expandedKeys: expandedKeys,
onRow: onRow,
getRowKey: getRowKey,
rowExpandable: rowExpandable,
childrenColumnName: childrenColumnName
});
});
} else {
rows = react["createElement"](Body_ExpandedRow, {
expanded: true,
className: "".concat(prefixCls, "-placeholder"),
prefixCls: prefixCls,
fixHeader: fixHeader,
fixColumn: horizonScroll,
horizonScroll: horizonScroll,
component: trComponent,
componentWidth: componentWidth,
cellComponent: tdComponent,
colSpan: flattenColumns.length
}, emptyNode);
}
var columnsKey = getColumnsKey(flattenColumns);
return react["createElement"](WrapperComponent, {
className: "".concat(prefixCls, "-tbody")
}, measureColumnWidth && react["createElement"]("tr", {
"aria-hidden": "true",
className: "".concat(prefixCls, "-measure-row"),
style: {
height: 0
}
}, columnsKey.map(function (columnKey) {
return react["createElement"](MeasureCell, {
key: columnKey,
columnKey: columnKey,
onColumnResize: onColumnResize
});
})), rows);
}, [data, prefixCls, onRow, measureColumnWidth, expandedKeys, getRowKey, getComponent, componentWidth, emptyNode, flattenColumns]);
}
var MemoBody = react["memo"](Body);
MemoBody.displayName = 'Body';
/* harmony default export */ var es_Body = (MemoBody);
// EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js
var Children_toArray = __webpack_require__("Zm9Q");
// CONCATENATED MODULE: ./node_modules/rc-table/es/hooks/useColumns.js
function convertChildrenToColumns(children) {
return Object(Children_toArray["a" /* default */])(children).filter(function (node) {
return react["isValidElement"](node);
}).map(function (_ref) {
var key = _ref.key,
props = _ref.props;
var nodeChildren = props.children,
restProps = Object(objectWithoutProperties["a" /* default */])(props, ["children"]);
var column = Object(objectSpread2["a" /* default */])({
key: key
}, restProps);
if (nodeChildren) {
column.children = convertChildrenToColumns(nodeChildren);
}
return column;
});
}
function flatColumns(columns) {
return columns.reduce(function (list, column) {
var fixed = column.fixed; // Convert `fixed='true'` to `fixed='left'` instead
var parsedFixed = fixed === true ? 'left' : fixed;
var subColumns = column.children;
if (subColumns && subColumns.length > 0) {
return [].concat(Object(toConsumableArray["a" /* default */])(list), Object(toConsumableArray["a" /* default */])(flatColumns(subColumns).map(function (subColum) {
return Object(objectSpread2["a" /* default */])({
fixed: parsedFixed
}, subColum);
})));
}
return [].concat(Object(toConsumableArray["a" /* default */])(list), [Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, column), {}, {
fixed: parsedFixed
})]);
}, []);
}
function warningFixed(flattenColumns) {
var allFixLeft = true;
for (var i = 0; i < flattenColumns.length; i += 1) {
var col = flattenColumns[i];
if (allFixLeft && col.fixed !== 'left') {
allFixLeft = false;
} else if (!allFixLeft && col.fixed === 'left') {
Object(warning["a" /* default */])(false, "Index ".concat(i - 1, " of `columns` missing `fixed='left'` prop."));
break;
}
}
var allFixRight = true;
for (var _i = flattenColumns.length - 1; _i >= 0; _i -= 1) {
var _col = flattenColumns[_i];
if (allFixRight && _col.fixed !== 'right') {
allFixRight = false;
} else if (!allFixRight && _col.fixed === 'right') {
Object(warning["a" /* default */])(false, "Index ".concat(_i + 1, " of `columns` missing `fixed='right'` prop."));
break;
}
}
}
function revertForRtl(columns) {
return columns.map(function (column) {
var fixed = column.fixed,
restProps = Object(objectWithoutProperties["a" /* default */])(column, ["fixed"]); // Convert `fixed='left'` to `fixed='right'` instead
var parsedFixed = fixed;
if (fixed === 'left') {
parsedFixed = 'right';
} else if (fixed === 'right') {
parsedFixed = 'left';
}
return Object(objectSpread2["a" /* default */])({
fixed: parsedFixed
}, restProps);
});
}
/**
* Parse `columns` & `children` into `columns`.
*/
function useColumns(_ref2, transformColumns) {
var prefixCls = _ref2.prefixCls,
columns = _ref2.columns,
children = _ref2.children,
expandable = _ref2.expandable,
expandedKeys = _ref2.expandedKeys,
getRowKey = _ref2.getRowKey,
onTriggerExpand = _ref2.onTriggerExpand,
expandIcon = _ref2.expandIcon,
rowExpandable = _ref2.rowExpandable,
expandIconColumnIndex = _ref2.expandIconColumnIndex,
direction = _ref2.direction,
expandRowByClick = _ref2.expandRowByClick;
var baseColumns = react["useMemo"](function () {
return columns || convertChildrenToColumns(children);
}, [columns, children]); // Add expand column
var withExpandColumns = react["useMemo"](function () {
if (expandable) {
var _expandColumn;
var expandColIndex = expandIconColumnIndex || 0;
var prevColumn = baseColumns[expandColIndex];
var expandColumn = (_expandColumn = {}, Object(esm_defineProperty["a" /* default */])(_expandColumn, INTERNAL_COL_DEFINE, {
className: "".concat(prefixCls, "-expand-icon-col")
}), Object(esm_defineProperty["a" /* default */])(_expandColumn, "title", ''), Object(esm_defineProperty["a" /* default */])(_expandColumn, "fixed", prevColumn ? prevColumn.fixed : null), Object(esm_defineProperty["a" /* default */])(_expandColumn, "className", "".concat(prefixCls, "-row-expand-icon-cell")), Object(esm_defineProperty["a" /* default */])(_expandColumn, "render", function render(_, record, index) {
var rowKey = getRowKey(record, index);
var expanded = expandedKeys.has(rowKey);
var recordExpandable = rowExpandable ? rowExpandable(record) : true;
var icon = expandIcon({
prefixCls: prefixCls,
expanded: expanded,
expandable: recordExpandable,
record: record,
onExpand: onTriggerExpand
});
if (expandRowByClick) {
return react["createElement"]("span", {
onClick: function onClick(e) {
return e.stopPropagation();
}
}, icon);
}
return icon;
}), _expandColumn); // Insert expand column in the target position
var cloneColumns = baseColumns.slice();
if (expandColIndex >= 0) {
cloneColumns.splice(expandColIndex, 0, expandColumn);
}
return cloneColumns;
}
return baseColumns;
}, [expandable, baseColumns, getRowKey, expandedKeys, expandIcon, direction]);
var mergedColumns = react["useMemo"](function () {
var finalColumns = withExpandColumns;
if (transformColumns) {
finalColumns = transformColumns(finalColumns);
} // Always provides at least one column for table display
if (!finalColumns.length) {
finalColumns = [{
render: function render() {
return null;
}
}];
}
return finalColumns;
}, [transformColumns, withExpandColumns, direction]);
var flattenColumns = react["useMemo"](function () {
if (direction === 'rtl') {
return revertForRtl(flatColumns(mergedColumns));
}
return flatColumns(mergedColumns);
}, [mergedColumns, direction]); // Only check out of production since it's waste for each render
if (false) {}
return [mergedColumns, flattenColumns];
}
/* harmony default export */ var hooks_useColumns = (useColumns);
// EXTERNAL MODULE: ./node_modules/raf/index.js
var raf = __webpack_require__("xEkU");
var raf_default = /*#__PURE__*/__webpack_require__.n(raf);
// CONCATENATED MODULE: ./node_modules/rc-table/es/hooks/useFrame.js
function useFrameState(defaultState) {
var stateRef = Object(react["useRef"])(defaultState);
var _useState = Object(react["useState"])({}),
_useState2 = Object(esm_slicedToArray["a" /* default */])(_useState, 2),
forceUpdate = _useState2[1];
var timeoutRef = Object(react["useRef"])(null);
var updateBatchRef = Object(react["useRef"])([]);
function setFrameState(updater) {
if (timeoutRef.current === null) {
updateBatchRef.current = [];
timeoutRef.current = raf_default()(function () {
updateBatchRef.current.forEach(function (batchUpdater) {
stateRef.current = batchUpdater(stateRef.current);
});
timeoutRef.current = null;
forceUpdate({});
});
}
updateBatchRef.current.push(updater);
}
Object(react["useEffect"])(function () {
return function () {
raf_default.a.cancel(timeoutRef.current);
};
}, []);
return [stateRef.current, setFrameState];
}
/** Lock frame, when frame pass reset the lock. */
function useTimeoutLock(defaultState) {
var frameRef = Object(react["useRef"])(defaultState);
var timeoutRef = Object(react["useRef"])(null);
function cleanUp() {
window.clearTimeout(timeoutRef.current);
}
function setState(newState) {
frameRef.current = newState;
cleanUp();
timeoutRef.current = window.setTimeout(function () {
frameRef.current = null;
timeoutRef.current = null;
}, 100);
}
function getState() {
return frameRef.current;
}
Object(react["useEffect"])(function () {
return cleanUp;
}, []);
return [setState, getState];
}
// CONCATENATED MODULE: ./node_modules/rc-table/es/hooks/useStickyOffsets.js
/**
* Get sticky column offset width
*/
function useStickyOffsets(colWidths, columCount, direction) {
var stickyOffsets = Object(react["useMemo"])(function () {
var leftOffsets = [];
var rightOffsets = [];
var left = 0;
var right = 0;
for (var start = 0; start < columCount; start += 1) {
if (direction === 'rtl') {
// Left offset
rightOffsets[start] = right;
right += colWidths[start] || 0; // Right offset
var end = columCount - start - 1;
leftOffsets[end] = left;
left += colWidths[end] || 0;
} else {
// Left offset
leftOffsets[start] = left;
left += colWidths[start] || 0; // Right offset
var _end = columCount - start - 1;
rightOffsets[_end] = right;
right += colWidths[_end] || 0;
}
}
return {
left: leftOffsets,
right: rightOffsets
};
}, [colWidths, columCount, direction]);
return stickyOffsets;
}
/* harmony default export */ var hooks_useStickyOffsets = (useStickyOffsets);
// CONCATENATED MODULE: ./node_modules/rc-table/es/Panel/index.js
function Panel(_ref) {
var className = _ref.className,
children = _ref.children;
return react["createElement"]("div", {
className: className
}, children);
}
/* harmony default export */ var es_Panel = (Panel);
// CONCATENATED MODULE: ./node_modules/rc-table/es/Footer/Cell.js
function SummaryCell(_ref) {
var className = _ref.className,
index = _ref.index,
children = _ref.children,
colSpan = _ref.colSpan,
rowSpan = _ref.rowSpan;
var _React$useContext = react["useContext"](context_TableContext),
prefixCls = _React$useContext.prefixCls,
fixedInfoList = _React$useContext.fixedInfoList;
var fixedInfo = fixedInfoList[index];
return react["createElement"](es_Cell, Object.assign({
className: className,
index: index,
component: "td",
prefixCls: prefixCls,
record: null,
dataIndex: null,
render: function render() {
return {
children: children,
props: {
colSpan: colSpan,
rowSpan: rowSpan
}
};
}
}, fixedInfo));
}
// CONCATENATED MODULE: ./node_modules/rc-table/es/Footer/Row.js
function FooterRow(props) {
return react["createElement"]("tr", Object.assign({}, props));
}
// CONCATENATED MODULE: ./node_modules/rc-table/es/Footer/index.js
function Footer(_ref) {
var children = _ref.children;
var _React$useContext = react["useContext"](context_TableContext),
prefixCls = _React$useContext.prefixCls;
return react["createElement"]("tfoot", {
className: "".concat(prefixCls, "-summary")
}, children);
}
/* harmony default export */ var es_Footer = (Footer);
var FooterComponents = {
Cell: SummaryCell,
Row: FooterRow
};
// CONCATENATED MODULE: ./node_modules/rc-table/es/utils/expandUtil.js
function renderExpandIcon(_ref) {
var _classNames;
var prefixCls = _ref.prefixCls,
record = _ref.record,
onExpand = _ref.onExpand,
expanded = _ref.expanded,
expandable = _ref.expandable;
var expandClassName = "".concat(prefixCls, "-row-expand-icon");
if (!expandable) {
return react["createElement"]("span", {
className: classnames_default()(expandClassName, "".concat(prefixCls, "-row-spaced"))
});
}
var onClick = function onClick(event) {
onExpand(record, event);
event.stopPropagation();
};
return react["createElement"]("span", {
className: classnames_default()(expandClassName, (_classNames = {}, Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-row-expanded"), expanded), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-row-collapsed"), !expanded), _classNames)),
onClick: onClick
});
}
function findAllChildrenKeys(data, getRowKey, childrenColumnName) {
var keys = [];
function dig(list) {
(list || []).forEach(function (item, index) {
keys.push(getRowKey(item, index));
dig(item[childrenColumnName]);
});
}
dig(data);
return keys;
}
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/addEventListener.js
var addEventListener = __webpack_require__("zT1h");
// CONCATENATED MODULE: ./node_modules/rc-util/es/Dom/css.js
/* eslint-disable no-nested-ternary */
var PIXEL_PATTERN = /margin|padding|width|height|max|min|offset/;
var removePixel = {
left: true,
top: true
};
var floatMap = {
cssFloat: 1,
styleFloat: 1,
float: 1
};
function getComputedStyle(node) {
return node.nodeType === 1 ? node.ownerDocument.defaultView.getComputedStyle(node, null) : {};
}
function getStyleValue(node, type, value) {
type = type.toLowerCase();
if (value === 'auto') {
if (type === 'height') {
return node.offsetHeight;
}
if (type === 'width') {
return node.offsetWidth;
}
}
if (!(type in removePixel)) {
removePixel[type] = PIXEL_PATTERN.test(type);
}
return removePixel[type] ? parseFloat(value) || 0 : value;
}
function css_get(node, name) {
var length = arguments.length;
var style = getComputedStyle(node);
name = floatMap[name] ? 'cssFloat' in node.style ? 'cssFloat' : 'styleFloat' : name;
return length === 1 ? style : getStyleValue(node, name, style[name] || node.style[name]);
}
function set(node, name, value) {
var length = arguments.length;
name = floatMap[name] ? 'cssFloat' in node.style ? 'cssFloat' : 'styleFloat' : name;
if (length === 3) {
if (typeof value === 'number' && PIXEL_PATTERN.test(name)) {
value = "".concat(value, "px");
}
node.style[name] = value; // Number
return value;
}
for (var x in name) {
if (name.hasOwnProperty(x)) {
set(node, x, name[x]);
}
}
return getComputedStyle(node);
}
function getOuterWidth(el) {
if (el === document.body) {
return document.documentElement.clientWidth;
}
return el.offsetWidth;
}
function getOuterHeight(el) {
if (el === document.body) {
return window.innerHeight || document.documentElement.clientHeight;
}
return el.offsetHeight;
}
function getDocSize() {
var width = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth);
var height = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
return {
width: width,
height: height
};
}
function getClientSize() {
var width = document.documentElement.clientWidth;
var height = window.innerHeight || document.documentElement.clientHeight;
return {
width: width,
height: height
};
}
function getScroll() {
return {
scrollLeft: Math.max(document.documentElement.scrollLeft, document.body.scrollLeft),
scrollTop: Math.max(document.documentElement.scrollTop, document.body.scrollTop)
};
}
function getOffset(node) {
var box = node.getBoundingClientRect();
var docElem = document.documentElement; // < ie8 不支持 win.pageXOffset, 则使用 docElem.scrollLeft
return {
left: box.left + (window.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || document.body.clientLeft || 0),
top: box.top + (window.pageYOffset || docElem.scrollTop) - (docElem.clientTop || document.body.clientTop || 0)
};
}
// CONCATENATED MODULE: ./node_modules/rc-table/es/stickyScrollBar.js
var stickyScrollBar_StickyScrollBar = function StickyScrollBar(_ref, ref) {
var _scrollBodyRef$curren, _scrollBodyRef$curren2;
var scrollBodyRef = _ref.scrollBodyRef,
onScroll = _ref.onScroll,
offsetScroll = _ref.offsetScroll;
var _React$useContext = react["useContext"](context_TableContext),
prefixCls = _React$useContext.prefixCls;
var bodyScrollWidth = ((_scrollBodyRef$curren = scrollBodyRef.current) === null || _scrollBodyRef$curren === void 0 ? void 0 : _scrollBodyRef$curren.scrollWidth) || 0;
var bodyWidth = ((_scrollBodyRef$curren2 = scrollBodyRef.current) === null || _scrollBodyRef$curren2 === void 0 ? void 0 : _scrollBodyRef$curren2.clientWidth) || 0;
var scrollBarWidth = bodyScrollWidth && bodyWidth * (bodyWidth / bodyScrollWidth);
var scrollBarRef = react["useRef"]();
var _useFrameState = useFrameState({
scrollLeft: 0,
isHiddenScrollBar: false
}),
_useFrameState2 = Object(esm_slicedToArray["a" /* default */])(_useFrameState, 2),
frameState = _useFrameState2[0],
setFrameState = _useFrameState2[1];
var refState = react["useRef"]({
delta: 0,
x: 0
});
var _React$useState = react["useState"](false),
_React$useState2 = Object(esm_slicedToArray["a" /* default */])(_React$useState, 2),
isActive = _React$useState2[0],
setActive = _React$useState2[1];
var onMouseUp = function onMouseUp() {
setActive(false);
};
var onMouseDown = function onMouseDown(event) {
event.persist();
refState.current.delta = event.pageX - frameState.scrollLeft;
refState.current.x = 0;
setActive(true);
event.preventDefault();
};
var onMouseMove = function onMouseMove(event) {
var _window;
// https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons
var _ref2 = event || ((_window = window) === null || _window === void 0 ? void 0 : _window.event),
buttons = _ref2.buttons;
if (!isActive || buttons === 0) {
// If out body mouse up, we can set isActive false when mouse move
if (isActive) {
setActive(false);
}
return;
}
var left = refState.current.x + event.pageX - refState.current.x - refState.current.delta;
if (left <= 0) {
left = 0;
}
if (left + scrollBarWidth >= bodyWidth) {
left = bodyWidth - scrollBarWidth;
}
onScroll({
scrollLeft: left / bodyWidth * (bodyScrollWidth + 2)
});
refState.current.x = event.pageX;
};
var onContainerScroll = function onContainerScroll() {
var tableOffsetTop = getOffset(scrollBodyRef.current).top;
var tableBottomOffset = tableOffsetTop + scrollBodyRef.current.offsetHeight;
var currentClientOffset = document.documentElement.scrollTop + window.innerHeight;
if (tableBottomOffset - Object(getScrollBarSize["a" /* default */])() <= currentClientOffset || tableOffsetTop >= currentClientOffset - offsetScroll) {
setFrameState(function (state) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), {}, {
isHiddenScrollBar: true
});
});
} else {
setFrameState(function (state) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), {}, {
isHiddenScrollBar: false
});
});
}
};
var setScrollLeft = function setScrollLeft(left) {
setFrameState(function (state) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), {}, {
scrollLeft: left / bodyScrollWidth * bodyWidth || 0
});
});
};
react["useImperativeHandle"](ref, function () {
return {
setScrollLeft: setScrollLeft
};
});
react["useEffect"](function () {
var onMouseUpListener = Object(addEventListener["a" /* default */])(document.body, 'mouseup', onMouseUp, false);
var onMouseMoveListener = Object(addEventListener["a" /* default */])(document.body, 'mousemove', onMouseMove, false);
onContainerScroll();
return function () {
onMouseUpListener.remove();
onMouseMoveListener.remove();
};
}, [scrollBarWidth, isActive]);
react["useEffect"](function () {
var onScrollListener = Object(addEventListener["a" /* default */])(window, 'scroll', onContainerScroll, false);
var onResizeListener = Object(addEventListener["a" /* default */])(window, 'resize', onContainerScroll, false);
return function () {
onScrollListener.remove();
onResizeListener.remove();
};
}, []);
react["useEffect"](function () {
if (!frameState.isHiddenScrollBar) {
setFrameState(function (state) {
var _scrollBodyRef$curren3, _scrollBodyRef$curren4;
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), {}, {
scrollLeft: scrollBodyRef.current.scrollLeft / ((_scrollBodyRef$curren3 = scrollBodyRef.current) === null || _scrollBodyRef$curren3 === void 0 ? void 0 : _scrollBodyRef$curren3.scrollWidth) * ((_scrollBodyRef$curren4 = scrollBodyRef.current) === null || _scrollBodyRef$curren4 === void 0 ? void 0 : _scrollBodyRef$curren4.clientWidth)
});
});
}
}, [frameState.isHiddenScrollBar]);
if (bodyScrollWidth <= bodyWidth || !scrollBarWidth || frameState.isHiddenScrollBar) {
return null;
}
return react["createElement"]("div", {
style: {
height: Object(getScrollBarSize["a" /* default */])(),
width: bodyWidth,
bottom: offsetScroll
},
className: "".concat(prefixCls, "-sticky-scroll")
}, react["createElement"]("div", {
onMouseDown: onMouseDown,
ref: scrollBarRef,
className: classnames_default()("".concat(prefixCls, "-sticky-scroll-bar"), Object(esm_defineProperty["a" /* default */])({}, "".concat(prefixCls, "-sticky-scroll-bar-active"), isActive)),
style: {
width: "".concat(scrollBarWidth, "px"),
transform: "translate3d(".concat(frameState.scrollLeft, "px, 0, 0)")
}
}));
};
/* harmony default export */ var stickyScrollBar = (react["forwardRef"](stickyScrollBar_StickyScrollBar));
// CONCATENATED MODULE: ./node_modules/rc-table/es/hooks/useSticky.js
/** Sticky header hooks */
function useSticky(sticky, prefixCls) {
return react["useMemo"](function () {
var isSticky = !!sticky;
return {
isSticky: isSticky,
stickyClassName: isSticky ? "".concat(prefixCls, "-sticky-header") : '',
offsetHeader: Object(esm_typeof["a" /* default */])(sticky) === 'object' ? sticky.offsetHeader || 0 : 0,
offsetScroll: Object(esm_typeof["a" /* default */])(sticky) === 'object' ? sticky.offsetScroll || 0 : 0
};
}, [sticky, prefixCls]);
}
// CONCATENATED MODULE: ./node_modules/rc-table/es/Table.js
/**
* Feature:
* - fixed not need to set width
* - support `rowExpandable` to config row expand logic
* - add `summary` to support `() => ReactNode`
*
* Update:
* - `dataIndex` is `array[]` now
* - `expandable` wrap all the expand related props
*
* Removed:
* - expandIconAsCell
* - useFixedHeader
* - rowRef
* - columns[number].onCellClick
* - onRowClick
* - onRowDoubleClick
* - onRowMouseEnter
* - onRowMouseLeave
* - getBodyWrapper
* - bodyStyle
*
* Deprecated:
* - All expanded props, move into expandable
*/
// Used for conditions cache
var EMPTY_DATA = []; // Used for customize scroll
var EMPTY_SCROLL_TARGET = {};
var INTERNAL_HOOKS = 'rc-table-internal-hook';
var MemoTableContent = react["memo"](function (_ref) {
var children = _ref.children;
return children;
}, function (prev, next) {
if (!shallowequal_default()(prev.props, next.props)) {
return false;
} // No additional render when pinged status change.
// This is not a bug.
return prev.pingLeft !== next.pingLeft || prev.pingRight !== next.pingRight;
});
function Table(props) {
var _classNames;
var prefixCls = props.prefixCls,
className = props.className,
rowClassName = props.rowClassName,
style = props.style,
data = props.data,
rowKey = props.rowKey,
scroll = props.scroll,
tableLayout = props.tableLayout,
direction = props.direction,
title = props.title,
footer = props.footer,
summary = props.summary,
id = props.id,
showHeader = props.showHeader,
components = props.components,
emptyText = props.emptyText,
onRow = props.onRow,
onHeaderRow = props.onHeaderRow,
internalHooks = props.internalHooks,
transformColumns = props.transformColumns,
internalRefs = props.internalRefs,
sticky = props.sticky;
var mergedData = data || EMPTY_DATA;
var hasData = !!mergedData.length; // ===================== Effects ======================
var _React$useState = react["useState"](0),
_React$useState2 = Object(esm_slicedToArray["a" /* default */])(_React$useState, 2),
scrollbarSize = _React$useState2[0],
setScrollbarSize = _React$useState2[1];
react["useEffect"](function () {
setScrollbarSize(Object(getScrollBarSize["a" /* default */])());
}); // ===================== Warning ======================
if (false) {} // ==================== Customize =====================
var mergedComponents = react["useMemo"](function () {
return mergeObject(components, {});
}, [components]);
var getComponent = react["useCallback"](function (path, defaultComponent) {
return getPathValue(mergedComponents, path) || defaultComponent;
}, [mergedComponents]);
var getRowKey = react["useMemo"](function () {
if (typeof rowKey === 'function') {
return rowKey;
}
return function (record) {
var key = record && record[rowKey];
if (false) {}
return key;
};
}, [rowKey]); // ====================== Expand ======================
var expandableConfig = getExpandableProps(props);
var expandIcon = expandableConfig.expandIcon,
expandedRowKeys = expandableConfig.expandedRowKeys,
defaultExpandedRowKeys = expandableConfig.defaultExpandedRowKeys,
defaultExpandAllRows = expandableConfig.defaultExpandAllRows,
expandedRowRender = expandableConfig.expandedRowRender,
onExpand = expandableConfig.onExpand,
onExpandedRowsChange = expandableConfig.onExpandedRowsChange,
expandRowByClick = expandableConfig.expandRowByClick,
rowExpandable = expandableConfig.rowExpandable,
expandIconColumnIndex = expandableConfig.expandIconColumnIndex,
expandedRowClassName = expandableConfig.expandedRowClassName,
childrenColumnName = expandableConfig.childrenColumnName,
indentSize = expandableConfig.indentSize;
var mergedExpandIcon = expandIcon || renderExpandIcon;
var mergedChildrenColumnName = childrenColumnName || 'children';
var expandableType = react["useMemo"](function () {
if (expandedRowRender) {
return 'row';
}
/* eslint-disable no-underscore-dangle */
/**
* Fix https://github.com/ant-design/ant-design/issues/21154
* This is a workaround to not to break current behavior.
* We can remove follow code after final release.
*
* To other developer:
* Do not use `__PARENT_RENDER_ICON__` in prod since we will remove this when refactor
*/
if (props.expandable && internalHooks === INTERNAL_HOOKS && props.expandable.__PARENT_RENDER_ICON__ || mergedData.some(function (record) {
return record && Object(esm_typeof["a" /* default */])(record) === 'object' && record[mergedChildrenColumnName];
})) {
return 'nest';
}
/* eslint-enable */
return false;
}, [!!expandedRowRender, mergedData]);
var _React$useState3 = react["useState"](function () {
if (defaultExpandedRowKeys) {
return defaultExpandedRowKeys;
}
if (defaultExpandAllRows) {
return findAllChildrenKeys(mergedData, getRowKey, mergedChildrenColumnName);
}
return [];
}),
_React$useState4 = Object(esm_slicedToArray["a" /* default */])(_React$useState3, 2),
innerExpandedKeys = _React$useState4[0],
setInnerExpandedKeys = _React$useState4[1];
var mergedExpandedKeys = react["useMemo"](function () {
return new Set(expandedRowKeys || innerExpandedKeys || []);
}, [expandedRowKeys, innerExpandedKeys]);
var onTriggerExpand = react["useCallback"](function (record) {
var key = getRowKey(record, mergedData.indexOf(record));
var newExpandedKeys;
var hasKey = mergedExpandedKeys.has(key);
if (hasKey) {
mergedExpandedKeys.delete(key);
newExpandedKeys = Object(toConsumableArray["a" /* default */])(mergedExpandedKeys);
} else {
newExpandedKeys = [].concat(Object(toConsumableArray["a" /* default */])(mergedExpandedKeys), [key]);
}
setInnerExpandedKeys(newExpandedKeys);
if (onExpand) {
onExpand(!hasKey, record);
}
if (onExpandedRowsChange) {
onExpandedRowsChange(newExpandedKeys);
}
}, [getRowKey, mergedExpandedKeys, mergedData, onExpand, onExpandedRowsChange]); // ====================== Column ======================
var _React$useState5 = react["useState"](0),
_React$useState6 = Object(esm_slicedToArray["a" /* default */])(_React$useState5, 2),
componentWidth = _React$useState6[0],
setComponentWidth = _React$useState6[1];
var _useColumns = hooks_useColumns(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, props), expandableConfig), {}, {
expandable: !!expandedRowRender,
expandedKeys: mergedExpandedKeys,
getRowKey: getRowKey,
// https://github.com/ant-design/ant-design/issues/23894
onTriggerExpand: onTriggerExpand,
expandIcon: mergedExpandIcon,
expandIconColumnIndex: expandIconColumnIndex,
direction: direction
}), internalHooks === INTERNAL_HOOKS ? transformColumns : null),
_useColumns2 = Object(esm_slicedToArray["a" /* default */])(_useColumns, 2),
columns = _useColumns2[0],
flattenColumns = _useColumns2[1];
var columnContext = react["useMemo"](function () {
return {
columns: columns,
flattenColumns: flattenColumns
};
}, [columns, flattenColumns]); // ====================== Scroll ======================
var fullTableRef = react["useRef"]();
var scrollHeaderRef = react["useRef"]();
var scrollBodyRef = react["useRef"]();
var _React$useState7 = react["useState"](false),
_React$useState8 = Object(esm_slicedToArray["a" /* default */])(_React$useState7, 2),
pingedLeft = _React$useState8[0],
setPingedLeft = _React$useState8[1];
var _React$useState9 = react["useState"](false),
_React$useState10 = Object(esm_slicedToArray["a" /* default */])(_React$useState9, 2),
pingedRight = _React$useState10[0],
setPingedRight = _React$useState10[1];
var _useFrameState = useFrameState(new Map()),
_useFrameState2 = Object(esm_slicedToArray["a" /* default */])(_useFrameState, 2),
colsWidths = _useFrameState2[0],
updateColsWidths = _useFrameState2[1]; // Convert map to number width
var colsKeys = getColumnsKey(flattenColumns);
var pureColWidths = colsKeys.map(function (columnKey) {
return colsWidths.get(columnKey);
});
var colWidths = react["useMemo"](function () {
return pureColWidths;
}, [pureColWidths.join('_')]);
var stickyOffsets = hooks_useStickyOffsets(colWidths, flattenColumns.length, direction);
var fixHeader = scroll && validateValue(scroll.y);
var horizonScroll = scroll && validateValue(scroll.x);
var fixColumn = horizonScroll && flattenColumns.some(function (_ref2) {
var fixed = _ref2.fixed;
return fixed;
}); // Sticky
var stickyRef = react["useRef"]();
var _useSticky = useSticky(sticky, prefixCls),
isSticky = _useSticky.isSticky,
offsetHeader = _useSticky.offsetHeader,
offsetScroll = _useSticky.offsetScroll,
stickyClassName = _useSticky.stickyClassName;
var scrollXStyle;
var scrollYStyle;
var scrollTableStyle;
if (fixHeader) {
scrollYStyle = {
overflowY: 'scroll',
maxHeight: scroll.y
};
}
if (horizonScroll) {
scrollXStyle = {
overflowX: 'auto'
}; // When no vertical scrollbar, should hide it
// https://github.com/ant-design/ant-design/pull/20705
// https://github.com/ant-design/ant-design/issues/21879
if (!fixHeader) {
scrollYStyle = {
overflowY: 'hidden'
};
}
scrollTableStyle = {
width: scroll.x === true ? 'auto' : scroll.x,
minWidth: '100%'
};
}
var onColumnResize = react["useCallback"](function (columnKey, width) {
updateColsWidths(function (widths) {
var newWidths = new Map(widths);
newWidths.set(columnKey, width);
return newWidths;
});
}, []);
var _useTimeoutLock = useTimeoutLock(null),
_useTimeoutLock2 = Object(esm_slicedToArray["a" /* default */])(_useTimeoutLock, 2),
setScrollTarget = _useTimeoutLock2[0],
getScrollTarget = _useTimeoutLock2[1];
function forceScroll(scrollLeft, target) {
if (!target) {
return;
}
if (typeof target === 'function') {
target(scrollLeft);
} else if (target.scrollLeft !== scrollLeft) {
// eslint-disable-next-line no-param-reassign
target.scrollLeft = scrollLeft;
}
}
var onScroll = function onScroll(_ref3) {
var currentTarget = _ref3.currentTarget,
scrollLeft = _ref3.scrollLeft;
var mergedScrollLeft = typeof scrollLeft === 'number' ? scrollLeft : currentTarget.scrollLeft;
var compareTarget = currentTarget || EMPTY_SCROLL_TARGET;
if (!getScrollTarget() || getScrollTarget() === compareTarget) {
var _stickyRef$current;
setScrollTarget(compareTarget);
forceScroll(mergedScrollLeft, scrollHeaderRef.current);
forceScroll(mergedScrollLeft, scrollBodyRef.current);
forceScroll(mergedScrollLeft, (_stickyRef$current = stickyRef.current) === null || _stickyRef$current === void 0 ? void 0 : _stickyRef$current.setScrollLeft);
}
if (currentTarget) {
var scrollWidth = currentTarget.scrollWidth,
clientWidth = currentTarget.clientWidth;
setPingedLeft(mergedScrollLeft > 0);
setPingedRight(mergedScrollLeft < scrollWidth - clientWidth);
}
};
var triggerOnScroll = function triggerOnScroll() {
if (scrollBodyRef.current) {
onScroll({
currentTarget: scrollBodyRef.current
});
}
};
var onFullTableResize = function onFullTableResize(_ref4) {
var width = _ref4.width;
triggerOnScroll();
setComponentWidth(fullTableRef.current ? fullTableRef.current.offsetWidth : width);
}; // Sync scroll bar when init or `horizonScroll` changed
react["useEffect"](function () {
return triggerOnScroll;
}, []);
react["useEffect"](function () {
if (horizonScroll) {
triggerOnScroll();
}
}, [horizonScroll]); // ================== INTERNAL HOOKS ==================
react["useEffect"](function () {
if (internalHooks === INTERNAL_HOOKS && internalRefs) {
internalRefs.body.current = scrollBodyRef.current;
}
}); // ====================== Render ======================
var TableComponent = getComponent(['table'], 'table'); // Table layout
var mergedTableLayout = react["useMemo"](function () {
if (tableLayout) {
return tableLayout;
} // https://github.com/ant-design/ant-design/issues/25227
// When scroll.x is max-content, no need to fix table layout
// it's width should stretch out to fit content
if (fixColumn) {
return scroll.x === 'max-content' ? 'auto' : 'fixed';
}
if (fixHeader || flattenColumns.some(function (_ref5) {
var ellipsis = _ref5.ellipsis;
return ellipsis;
})) {
return 'fixed';
}
return 'auto';
}, [fixHeader, fixColumn, flattenColumns, tableLayout]);
var groupTableNode; // Header props
var headerProps = {
colWidths: colWidths,
columCount: flattenColumns.length,
stickyOffsets: stickyOffsets,
onHeaderRow: onHeaderRow,
fixHeader: fixHeader
}; // Empty
var emptyNode = react["useMemo"](function () {
if (hasData) {
return null;
}
if (typeof emptyText === 'function') {
return emptyText();
}
return emptyText;
}, [hasData, emptyText]); // Body
var bodyTable = react["createElement"](es_Body, {
data: mergedData,
measureColumnWidth: fixHeader || horizonScroll || isSticky,
expandedKeys: mergedExpandedKeys,
rowExpandable: rowExpandable,
getRowKey: getRowKey,
onRow: onRow,
emptyNode: emptyNode,
childrenColumnName: mergedChildrenColumnName
});
var bodyColGroup = react["createElement"](es_ColGroup, {
colWidths: flattenColumns.map(function (_ref6) {
var width = _ref6.width;
return width;
}),
columns: flattenColumns
});
var footerTable = summary && react["createElement"](es_Footer, null, summary(mergedData));
var customizeScrollBody = getComponent(['body']);
if (false) {}
if (fixHeader || isSticky) {
var bodyContent;
if (typeof customizeScrollBody === 'function') {
bodyContent = customizeScrollBody(mergedData, {
scrollbarSize: scrollbarSize,
ref: scrollBodyRef,
onScroll: onScroll
});
headerProps.colWidths = flattenColumns.map(function (_ref7, index) {
var width = _ref7.width;
var colWidth = index === columns.length - 1 ? width - scrollbarSize : width;
if (typeof colWidth === 'number' && !Number.isNaN(colWidth)) {
return colWidth;
}
Object(warning["a" /* default */])(false, 'When use `components.body` with render props. Each column should have a fixed value.');
return 0;
});
} else {
bodyContent = react["createElement"]("div", {
style: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, scrollXStyle), scrollYStyle),
onScroll: onScroll,
ref: scrollBodyRef,
className: classnames_default()("".concat(prefixCls, "-body"))
}, react["createElement"](TableComponent, {
style: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, scrollTableStyle), {}, {
tableLayout: mergedTableLayout
})
}, bodyColGroup, bodyTable, footerTable), isSticky && react["createElement"](stickyScrollBar, {
ref: stickyRef,
offsetScroll: offsetScroll,
scrollBodyRef: scrollBodyRef,
onScroll: onScroll
}));
}
groupTableNode = react["createElement"](react["Fragment"], null, showHeader !== false && react["createElement"](Header_FixedHeader, Object.assign({
noData: !mergedData.length
}, headerProps, columnContext, {
direction: direction,
// Fixed Props
offsetHeader: offsetHeader,
stickyClassName: stickyClassName,
ref: scrollHeaderRef,
onScroll: onScroll
})), bodyContent);
} else {
groupTableNode = react["createElement"]("div", {
style: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, scrollXStyle), scrollYStyle),
className: classnames_default()("".concat(prefixCls, "-content")),
onScroll: onScroll,
ref: scrollBodyRef
}, react["createElement"](TableComponent, {
style: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, scrollTableStyle), {}, {
tableLayout: mergedTableLayout
})
}, bodyColGroup, showHeader !== false && react["createElement"](Header_Header, Object.assign({}, headerProps, columnContext)), bodyTable, footerTable));
}
var ariaProps = getDataAndAriaProps(props);
var fullTable = react["createElement"]("div", Object.assign({
className: classnames_default()(prefixCls, className, (_classNames = {}, Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-ping-left"), pingedLeft), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-ping-right"), pingedRight), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-layout-fixed"), tableLayout === 'fixed'), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-fixed-header"), fixHeader), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-fixed-column"), fixColumn), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-scroll-horizontal"), horizonScroll), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-has-fix-left"), flattenColumns[0] && flattenColumns[0].fixed), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-has-fix-right"), flattenColumns[flattenColumns.length - 1] && flattenColumns[flattenColumns.length - 1].fixed === 'right'), _classNames)),
style: style,
id: id,
ref: fullTableRef
}, ariaProps), react["createElement"](MemoTableContent, {
pingLeft: pingedLeft,
pingRight: pingedRight,
props: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, props), {}, {
stickyOffsets: stickyOffsets,
mergedExpandedKeys: mergedExpandedKeys
})
}, title && react["createElement"](es_Panel, {
className: "".concat(prefixCls, "-title")
}, title(mergedData)), react["createElement"]("div", {
className: "".concat(prefixCls, "-container")
}, groupTableNode), footer && react["createElement"](es_Panel, {
className: "".concat(prefixCls, "-footer")
}, footer(mergedData))));
if (horizonScroll) {
fullTable = react["createElement"](rc_resize_observer_es["a" /* default */], {
onResize: onFullTableResize
}, fullTable);
}
var TableContextValue = react["useMemo"](function () {
return {
prefixCls: prefixCls,
getComponent: getComponent,
scrollbarSize: scrollbarSize,
direction: direction,
fixedInfoList: flattenColumns.map(function (_, colIndex) {
return getCellFixedInfo(colIndex, colIndex, flattenColumns, stickyOffsets, direction);
}),
isSticky: isSticky
};
}, [prefixCls, getComponent, scrollbarSize, direction, flattenColumns, stickyOffsets, direction, isSticky]);
var BodyContextValue = react["useMemo"](function () {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, columnContext), {}, {
tableLayout: mergedTableLayout,
rowClassName: rowClassName,
expandedRowClassName: expandedRowClassName,
componentWidth: componentWidth,
fixHeader: fixHeader,
fixColumn: fixColumn,
horizonScroll: horizonScroll,
expandIcon: mergedExpandIcon,
expandableType: expandableType,
expandRowByClick: expandRowByClick,
expandedRowRender: expandedRowRender,
onTriggerExpand: onTriggerExpand,
expandIconColumnIndex: expandIconColumnIndex,
indentSize: indentSize
});
}, [columnContext, mergedTableLayout, rowClassName, expandedRowClassName, componentWidth, fixHeader, fixColumn, horizonScroll, mergedExpandIcon, expandableType, expandRowByClick, expandedRowRender, onTriggerExpand, expandIconColumnIndex, indentSize]);
var ResizeContextValue = react["useMemo"](function () {
return {
onColumnResize: onColumnResize
};
}, [onColumnResize]);
return react["createElement"](context_TableContext.Provider, {
value: TableContextValue
}, react["createElement"](context_BodyContext.Provider, {
value: BodyContextValue
}, react["createElement"](context_ResizeContext.Provider, {
value: ResizeContextValue
}, fullTable)));
}
Table.Column = sugar_Column;
Table.ColumnGroup = sugar_ColumnGroup;
Table.Summary = FooterComponents;
Table.defaultProps = {
rowKey: 'key',
prefixCls: 'rc-table',
emptyText: function emptyText() {
return 'No Data';
}
};
/* harmony default export */ var es_Table = (Table);
// CONCATENATED MODULE: ./node_modules/rc-table/es/index.js
/* harmony default export */ var rc_table_es = (es_Table);
// EXTERNAL MODULE: ./node_modules/antd/es/spin/index.js
var spin = __webpack_require__("W9HT");
// EXTERNAL MODULE: ./node_modules/antd/es/pagination/index.js + 7 modules
var es_pagination = __webpack_require__("NUBc");
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js + 1 modules
var config_provider_context = __webpack_require__("H84U");
// CONCATENATED MODULE: ./node_modules/antd/es/table/hooks/usePagination.js
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var DEFAULT_PAGE_SIZE = 10;
function getPaginationParam(pagination, mergedPagination) {
var param = {
current: mergedPagination.current,
pageSize: mergedPagination.pageSize
};
var paginationObj = pagination && typeof_default()(pagination) === 'object' ? pagination : {};
Object.keys(paginationObj).forEach(function (pageProp) {
var value = mergedPagination[pageProp];
if (typeof value !== 'function') {
param[pageProp] = value;
}
});
return param;
}
function extendsObject() {
var result = {};
for (var _len = arguments.length, list = new Array(_len), _key = 0; _key < _len; _key++) {
list[_key] = arguments[_key];
}
list.forEach(function (obj) {
if (obj) {
Object.keys(obj).forEach(function (key) {
var val = obj[key];
if (val !== undefined) {
result[key] = val;
}
});
}
});
return result;
}
function usePagination(total, pagination, onChange) {
var _a = pagination && typeof_default()(pagination) === 'object' ? pagination : {},
_a$total = _a.total,
paginationTotal = _a$total === void 0 ? 0 : _a$total,
paginationObj = __rest(_a, ["total"]);
var _useState = Object(react["useState"])(function () {
return {
current: 'defaultCurrent' in paginationObj ? paginationObj.defaultCurrent : 1,
pageSize: 'defaultPageSize' in paginationObj ? paginationObj.defaultPageSize : DEFAULT_PAGE_SIZE
};
}),
_useState2 = slicedToArray_default()(_useState, 2),
innerPagination = _useState2[0],
setInnerPagination = _useState2[1]; // ============ Basic Pagination Config ============
var mergedPagination = extendsObject(innerPagination, paginationObj, {
total: paginationTotal > 0 ? paginationTotal : total
});
if (!paginationTotal) {
// Reset `current` if data length changed. Only reset when paginationObj do not have total
var maxPage = Math.ceil(total / mergedPagination.pageSize);
if (maxPage < mergedPagination.current) {
mergedPagination.current = 1;
}
}
var refreshPagination = function refreshPagination() {
var current = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
var pageSize = arguments.length > 1 ? arguments[1] : undefined;
setInnerPagination(extends_default()(extends_default()({}, mergedPagination), {
current: current,
pageSize: pageSize || mergedPagination.pageSize
}));
};
var onInternalChange = function onInternalChange(current, pageSize) {
var paginationPageSize = mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.pageSize;
if (pageSize && pageSize !== paginationPageSize) {
current = 1;
if (pagination && pagination.onShowSizeChange) pagination.onShowSizeChange(current, pageSize);
}
if (pagination && pagination.onChange) pagination.onChange(current, pageSize);
refreshPagination(current, pageSize);
onChange(current, pageSize || paginationPageSize);
};
if (pagination === false) {
return [{}, function () {}];
}
return [extends_default()(extends_default()({}, mergedPagination), {
onChange: onInternalChange
}), refreshPagination];
}
// CONCATENATED MODULE: ./node_modules/antd/es/table/hooks/useLazyKVMap.js
function useLazyKVMap(data, childrenColumnName, getRowKey) {
var mapCacheRef = react["useRef"]({});
function getRecordByKey(key) {
if (!mapCacheRef.current || mapCacheRef.current.data !== data || mapCacheRef.current.childrenColumnName !== childrenColumnName || mapCacheRef.current.getRowKey !== getRowKey) {
/* eslint-disable no-inner-declarations */
var dig = function dig(records) {
records.forEach(function (record, index) {
var rowKey = getRowKey(record, index);
kvMap.set(rowKey, record);
if (record && typeof_default()(record) === 'object' && childrenColumnName in record) {
dig(record[childrenColumnName] || []);
}
});
};
/* eslint-enable */
var kvMap = new Map();
dig(data);
mapCacheRef.current = {
data: data,
childrenColumnName: childrenColumnName,
kvMap: kvMap,
getRowKey: getRowKey
};
}
return mapCacheRef.current.kvMap.get(key);
}
return [getRecordByKey];
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toArray.js
var helpers_toArray = __webpack_require__("SA+Z");
var toArray_default = /*#__PURE__*/__webpack_require__.n(helpers_toArray);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js
var helpers_toConsumableArray = __webpack_require__("RIqP");
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(helpers_toConsumableArray);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/DownOutlined.js
var DownOutlined = __webpack_require__("HQEm");
var DownOutlined_default = /*#__PURE__*/__webpack_require__.n(DownOutlined);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("1OyB");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("vuIU");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
var assertThisInitialized = __webpack_require__("JX7q");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
var inherits = __webpack_require__("Ji7U");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules
var createSuper = __webpack_require__("LK+K");
// CONCATENATED MODULE: ./node_modules/rc-tree/es/contextTypes.js
/**
* Webpack has bug for import loop, which is not the same behavior as ES module.
* When util.js imports the TreeNode for tree generate will cause treeContextTypes be empty.
*/
var TreeContext = react["createContext"](null);
// CONCATENATED MODULE: ./node_modules/rc-tree/es/Indent.js
var Indent_Indent = function Indent(_ref) {
var prefixCls = _ref.prefixCls,
level = _ref.level,
isStart = _ref.isStart,
isEnd = _ref.isEnd;
if (!level) {
return null;
}
var baseClassName = "".concat(prefixCls, "-indent-unit");
var list = [];
for (var i = 0; i < level; i += 1) {
var _classNames;
list.push(react["createElement"]("span", {
key: i,
className: classnames_default()(baseClassName, (_classNames = {}, Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(baseClassName, "-start"), isStart[i + 1]), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(baseClassName, "-end"), isEnd[i + 1]), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(baseClassName, "-end-first-level"), !i && isEnd[0]), _classNames))
}));
}
return react["createElement"]("span", {
"aria-hidden": "true",
className: "".concat(prefixCls, "-indent")
}, list);
};
/* harmony default export */ var es_Indent = (Indent_Indent);
// CONCATENATED MODULE: ./node_modules/rc-tree/es/TreeNode.js
// @ts-ignore
var ICON_OPEN = 'open';
var ICON_CLOSE = 'close';
var defaultTitle = '---';
var TreeNode_InternalTreeNode = /*#__PURE__*/function (_React$Component) {
Object(inherits["a" /* default */])(InternalTreeNode, _React$Component);
var _super = Object(createSuper["a" /* default */])(InternalTreeNode);
function InternalTreeNode() {
var _this;
Object(classCallCheck["a" /* default */])(this, InternalTreeNode);
_this = _super.apply(this, arguments);
_this.state = {
dragNodeHighlight: false
};
_this.onSelectorClick = function (e) {
// Click trigger before select/check operation
var onNodeClick = _this.props.context.onNodeClick;
onNodeClick(e, convertNodePropsToEventData(_this.props));
if (_this.isSelectable()) {
_this.onSelect(e);
} else {
_this.onCheck(e);
}
};
_this.onSelectorDoubleClick = function (e) {
var onNodeDoubleClick = _this.props.context.onNodeDoubleClick;
onNodeDoubleClick(e, convertNodePropsToEventData(_this.props));
};
_this.onSelect = function (e) {
if (_this.isDisabled()) return;
var onNodeSelect = _this.props.context.onNodeSelect;
e.preventDefault();
onNodeSelect(e, convertNodePropsToEventData(_this.props));
};
_this.onCheck = function (e) {
if (_this.isDisabled()) return;
var _this$props = _this.props,
disableCheckbox = _this$props.disableCheckbox,
checked = _this$props.checked;
var onNodeCheck = _this.props.context.onNodeCheck;
if (!_this.isCheckable() || disableCheckbox) return;
e.preventDefault();
var targetChecked = !checked;
onNodeCheck(e, convertNodePropsToEventData(_this.props), targetChecked);
};
_this.onMouseEnter = function (e) {
var onNodeMouseEnter = _this.props.context.onNodeMouseEnter;
onNodeMouseEnter(e, convertNodePropsToEventData(_this.props));
};
_this.onMouseLeave = function (e) {
var onNodeMouseLeave = _this.props.context.onNodeMouseLeave;
onNodeMouseLeave(e, convertNodePropsToEventData(_this.props));
};
_this.onContextMenu = function (e) {
var onNodeContextMenu = _this.props.context.onNodeContextMenu;
onNodeContextMenu(e, convertNodePropsToEventData(_this.props));
};
_this.onDragStart = function (e) {
var onNodeDragStart = _this.props.context.onNodeDragStart;
e.stopPropagation();
_this.setState({
dragNodeHighlight: true
});
onNodeDragStart(e, Object(assertThisInitialized["a" /* default */])(_this));
try {
// ie throw error
// firefox-need-it
e.dataTransfer.setData('text/plain', '');
} catch (error) {// empty
}
};
_this.onDragEnter = function (e) {
var onNodeDragEnter = _this.props.context.onNodeDragEnter;
e.preventDefault();
e.stopPropagation();
onNodeDragEnter(e, Object(assertThisInitialized["a" /* default */])(_this));
};
_this.onDragOver = function (e) {
var onNodeDragOver = _this.props.context.onNodeDragOver;
e.preventDefault();
e.stopPropagation();
onNodeDragOver(e, Object(assertThisInitialized["a" /* default */])(_this));
};
_this.onDragLeave = function (e) {
var onNodeDragLeave = _this.props.context.onNodeDragLeave;
e.stopPropagation();
onNodeDragLeave(e, Object(assertThisInitialized["a" /* default */])(_this));
};
_this.onDragEnd = function (e) {
var onNodeDragEnd = _this.props.context.onNodeDragEnd;
e.stopPropagation();
_this.setState({
dragNodeHighlight: false
});
onNodeDragEnd(e, Object(assertThisInitialized["a" /* default */])(_this));
};
_this.onDrop = function (e) {
var onNodeDrop = _this.props.context.onNodeDrop;
e.preventDefault();
e.stopPropagation();
_this.setState({
dragNodeHighlight: false
});
onNodeDrop(e, Object(assertThisInitialized["a" /* default */])(_this));
}; // Disabled item still can be switch
_this.onExpand = function (e) {
var onNodeExpand = _this.props.context.onNodeExpand;
onNodeExpand(e, convertNodePropsToEventData(_this.props));
}; // Drag usage
_this.setSelectHandle = function (node) {
_this.selectHandle = node;
};
_this.getNodeState = function () {
var expanded = _this.props.expanded;
if (_this.isLeaf()) {
return null;
}
return expanded ? ICON_OPEN : ICON_CLOSE;
};
_this.hasChildren = function () {
var eventKey = _this.props.eventKey;
var keyEntities = _this.props.context.keyEntities;
var _ref = keyEntities[eventKey] || {},
children = _ref.children;
return !!(children || []).length;
};
_this.isLeaf = function () {
var _this$props2 = _this.props,
isLeaf = _this$props2.isLeaf,
loaded = _this$props2.loaded;
var loadData = _this.props.context.loadData;
var hasChildren = _this.hasChildren();
if (isLeaf === false) {
return false;
}
return isLeaf || !loadData && !hasChildren || loadData && loaded && !hasChildren;
};
_this.isDisabled = function () {
var disabled = _this.props.disabled;
var treeDisabled = _this.props.context.disabled;
return !!(treeDisabled || disabled);
};
_this.isCheckable = function () {
var checkable = _this.props.checkable;
var treeCheckable = _this.props.context.checkable; // Return false if tree or treeNode is not checkable
if (!treeCheckable || checkable === false) return false;
return treeCheckable;
}; // Load data to avoid default expanded tree without data
_this.syncLoadData = function (props) {
var expanded = props.expanded,
loading = props.loading,
loaded = props.loaded;
var _this$props$context = _this.props.context,
loadData = _this$props$context.loadData,
onNodeLoad = _this$props$context.onNodeLoad;
if (loading) return; // read from state to avoid loadData at same time
if (loadData && expanded && !_this.isLeaf()) {
// We needn't reload data when has children in sync logic
// It's only needed in node expanded
if (!_this.hasChildren() && !loaded) {
onNodeLoad(convertNodePropsToEventData(_this.props));
}
}
}; // Switcher
_this.renderSwitcher = function () {
var _this$props3 = _this.props,
expanded = _this$props3.expanded,
switcherIconFromProps = _this$props3.switcherIcon;
var _this$props$context2 = _this.props.context,
prefixCls = _this$props$context2.prefixCls,
switcherIconFromCtx = _this$props$context2.switcherIcon;
var switcherIcon = switcherIconFromProps || switcherIconFromCtx;
if (_this.isLeaf()) {
return react["createElement"]("span", {
className: classnames_default()("".concat(prefixCls, "-switcher"), "".concat(prefixCls, "-switcher-noop"))
}, typeof switcherIcon === 'function' ? switcherIcon(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this.props), {}, {
isLeaf: true
})) : switcherIcon);
}
var switcherCls = classnames_default()("".concat(prefixCls, "-switcher"), "".concat(prefixCls, "-switcher_").concat(expanded ? ICON_OPEN : ICON_CLOSE));
return react["createElement"]("span", {
onClick: _this.onExpand,
className: switcherCls
}, typeof switcherIcon === 'function' ? switcherIcon(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this.props), {}, {
isLeaf: false
})) : switcherIcon);
}; // Checkbox
_this.renderCheckbox = function () {
var _this$props4 = _this.props,
checked = _this$props4.checked,
halfChecked = _this$props4.halfChecked,
disableCheckbox = _this$props4.disableCheckbox;
var prefixCls = _this.props.context.prefixCls;
var disabled = _this.isDisabled();
var checkable = _this.isCheckable();
if (!checkable) return null; // [Legacy] Custom element should be separate with `checkable` in future
var $custom = typeof checkable !== 'boolean' ? checkable : null;
return react["createElement"]("span", {
className: classnames_default()("".concat(prefixCls, "-checkbox"), checked && "".concat(prefixCls, "-checkbox-checked"), !checked && halfChecked && "".concat(prefixCls, "-checkbox-indeterminate"), (disabled || disableCheckbox) && "".concat(prefixCls, "-checkbox-disabled")),
onClick: _this.onCheck
}, $custom);
};
_this.renderIcon = function () {
var loading = _this.props.loading;
var prefixCls = _this.props.context.prefixCls;
return react["createElement"]("span", {
className: classnames_default()("".concat(prefixCls, "-iconEle"), "".concat(prefixCls, "-icon__").concat(_this.getNodeState() || 'docu'), loading && "".concat(prefixCls, "-icon_loading"))
});
}; // Icon + Title
_this.renderSelector = function () {
var dragNodeHighlight = _this.state.dragNodeHighlight;
var _this$props5 = _this.props,
title = _this$props5.title,
selected = _this$props5.selected,
icon = _this$props5.icon,
loading = _this$props5.loading,
data = _this$props5.data;
var _this$props$context3 = _this.props.context,
prefixCls = _this$props$context3.prefixCls,
showIcon = _this$props$context3.showIcon,
treeIcon = _this$props$context3.icon,
draggable = _this$props$context3.draggable,
loadData = _this$props$context3.loadData,
titleRender = _this$props$context3.titleRender;
var disabled = _this.isDisabled();
var wrapClass = "".concat(prefixCls, "-node-content-wrapper"); // Icon - Still show loading icon when loading without showIcon
var $icon;
if (showIcon) {
var currentIcon = icon || treeIcon;
$icon = currentIcon ? react["createElement"]("span", {
className: classnames_default()("".concat(prefixCls, "-iconEle"), "".concat(prefixCls, "-icon__customize"))
}, typeof currentIcon === 'function' ? currentIcon(_this.props) : currentIcon) : _this.renderIcon();
} else if (loadData && loading) {
$icon = _this.renderIcon();
} // Title
var titleNode;
if (typeof title === 'function') {
titleNode = title(data);
} else if (titleRender) {
titleNode = titleRender(data);
} else {
titleNode = title;
}
var $title = react["createElement"]("span", {
className: "".concat(prefixCls, "-title")
}, titleNode);
return react["createElement"]("span", {
ref: _this.setSelectHandle,
title: typeof title === 'string' ? title : '',
className: classnames_default()("".concat(wrapClass), "".concat(wrapClass, "-").concat(_this.getNodeState() || 'normal'), !disabled && (selected || dragNodeHighlight) && "".concat(prefixCls, "-node-selected"), !disabled && draggable && 'draggable'),
draggable: !disabled && draggable || undefined,
"aria-grabbed": !disabled && draggable || undefined,
onMouseEnter: _this.onMouseEnter,
onMouseLeave: _this.onMouseLeave,
onContextMenu: _this.onContextMenu,
onClick: _this.onSelectorClick,
onDoubleClick: _this.onSelectorDoubleClick,
onDragStart: draggable ? _this.onDragStart : undefined
}, $icon, $title);
};
return _this;
} // Isomorphic needn't load data in server side
Object(createClass["a" /* default */])(InternalTreeNode, [{
key: "componentDidMount",
value: function componentDidMount() {
this.syncLoadData(this.props);
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate() {
this.syncLoadData(this.props);
}
}, {
key: "isSelectable",
value: function isSelectable() {
var selectable = this.props.selectable;
var treeSelectable = this.props.context.selectable; // Ignore when selectable is undefined or null
if (typeof selectable === 'boolean') {
return selectable;
}
return treeSelectable;
}
}, {
key: "render",
value: function render() {
var _classNames;
var _this$props6 = this.props,
eventKey = _this$props6.eventKey,
className = _this$props6.className,
style = _this$props6.style,
dragOver = _this$props6.dragOver,
dragOverGapTop = _this$props6.dragOverGapTop,
dragOverGapBottom = _this$props6.dragOverGapBottom,
isLeaf = _this$props6.isLeaf,
isStart = _this$props6.isStart,
isEnd = _this$props6.isEnd,
expanded = _this$props6.expanded,
selected = _this$props6.selected,
checked = _this$props6.checked,
halfChecked = _this$props6.halfChecked,
loading = _this$props6.loading,
domRef = _this$props6.domRef,
active = _this$props6.active,
onMouseMove = _this$props6.onMouseMove,
otherProps = Object(objectWithoutProperties["a" /* default */])(_this$props6, ["eventKey", "className", "style", "dragOver", "dragOverGapTop", "dragOverGapBottom", "isLeaf", "isStart", "isEnd", "expanded", "selected", "checked", "halfChecked", "loading", "domRef", "active", "onMouseMove"]);
var _this$props$context4 = this.props.context,
prefixCls = _this$props$context4.prefixCls,
filterTreeNode = _this$props$context4.filterTreeNode,
draggable = _this$props$context4.draggable,
keyEntities = _this$props$context4.keyEntities;
var disabled = this.isDisabled();
var dataOrAriaAttributeProps = getDataAndAria(otherProps);
var _ref2 = keyEntities[eventKey] || {},
level = _ref2.level;
var isEndNode = isEnd[isEnd.length - 1];
return react["createElement"]("div", Object.assign({
ref: domRef,
className: classnames_default()(className, "".concat(prefixCls, "-treenode"), (_classNames = {}, Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-treenode-disabled"), disabled), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-treenode-switcher-").concat(expanded ? 'open' : 'close'), !isLeaf), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-treenode-checkbox-checked"), checked), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-treenode-checkbox-indeterminate"), halfChecked), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-treenode-selected"), selected), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-treenode-loading"), loading), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-treenode-active"), active), Object(esm_defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-treenode-leaf-last"), isEndNode), Object(esm_defineProperty["a" /* default */])(_classNames, 'drag-over', !disabled && dragOver), Object(esm_defineProperty["a" /* default */])(_classNames, 'drag-over-gap-top', !disabled && dragOverGapTop), Object(esm_defineProperty["a" /* default */])(_classNames, 'drag-over-gap-bottom', !disabled && dragOverGapBottom), Object(esm_defineProperty["a" /* default */])(_classNames, 'filter-node', filterTreeNode && filterTreeNode(convertNodePropsToEventData(this.props))), _classNames)),
style: style,
onDragEnter: draggable ? this.onDragEnter : undefined,
onDragOver: draggable ? this.onDragOver : undefined,
onDragLeave: draggable ? this.onDragLeave : undefined,
onDrop: draggable ? this.onDrop : undefined,
onDragEnd: draggable ? this.onDragEnd : undefined,
onMouseMove: onMouseMove
}, dataOrAriaAttributeProps), react["createElement"](es_Indent, {
prefixCls: prefixCls,
level: level,
isStart: isStart,
isEnd: isEnd
}), this.renderSwitcher(), this.renderCheckbox(), this.renderSelector());
}
}]);
return InternalTreeNode;
}(react["Component"]);
var TreeNode_ContextTreeNode = function ContextTreeNode(props) {
return react["createElement"](TreeContext.Consumer, null, function (context) {
return react["createElement"](TreeNode_InternalTreeNode, Object.assign({}, props, {
context: context
}));
});
};
TreeNode_ContextTreeNode.displayName = 'TreeNode';
TreeNode_ContextTreeNode.defaultProps = {
title: defaultTitle
};
TreeNode_ContextTreeNode.isTreeNode = 1;
/* harmony default export */ var TreeNode = (TreeNode_ContextTreeNode);
// CONCATENATED MODULE: ./node_modules/rc-tree/es/util.js
/**
* Legacy code. Should avoid to use if you are new to import these code.
*/
var DRAG_SIDE_RANGE = 0.25;
var DRAG_MIN_GAP = 2;
function arrDel(list, value) {
var clone = list.slice();
var index = clone.indexOf(value);
if (index >= 0) {
clone.splice(index, 1);
}
return clone;
}
function arrAdd(list, value) {
var clone = list.slice();
if (clone.indexOf(value) === -1) {
clone.push(value);
}
return clone;
}
function posToArr(pos) {
return pos.split('-');
}
function getPosition(level, index) {
return "".concat(level, "-").concat(index);
}
function isTreeNode(node) {
return node && node.type && node.type.isTreeNode;
}
function getDragNodesKeys(dragNodeKey, keyEntities) {
var dragNodesKeys = [dragNodeKey];
var entity = keyEntities[dragNodeKey];
function dig() {
var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
list.forEach(function (_ref) {
var key = _ref.key,
children = _ref.children;
dragNodesKeys.push(key);
dig(children);
});
}
dig(entity.children);
return dragNodesKeys;
} // Only used when drag, not affect SSR.
function calcDropPosition(event, treeNode) {
var clientY = event.clientY;
var _treeNode$selectHandl = treeNode.selectHandle.getBoundingClientRect(),
top = _treeNode$selectHandl.top,
bottom = _treeNode$selectHandl.bottom,
height = _treeNode$selectHandl.height;
var des = Math.max(height * DRAG_SIDE_RANGE, DRAG_MIN_GAP);
if (clientY <= top + des) {
return -1;
}
if (clientY >= bottom - des) {
return 1;
}
return 0;
}
/**
* Return selectedKeys according with multiple prop
* @param selectedKeys
* @param props
* @returns [string]
*/
function calcSelectedKeys(selectedKeys, props) {
if (!selectedKeys) return undefined;
var multiple = props.multiple;
if (multiple) {
return selectedKeys.slice();
}
if (selectedKeys.length) {
return [selectedKeys[0]];
}
return selectedKeys;
}
var internalProcessProps = function internalProcessProps(props) {
return props;
};
function convertDataToTree(treeData, processor) {
if (!treeData) return [];
var _ref2 = processor || {},
_ref2$processProps = _ref2.processProps,
processProps = _ref2$processProps === void 0 ? internalProcessProps : _ref2$processProps;
var list = Array.isArray(treeData) ? treeData : [treeData];
return list.map(function (_ref3) {
var children = _ref3.children,
props = Object(objectWithoutProperties["a" /* default */])(_ref3, ["children"]);
var childrenNodes = convertDataToTree(children, processor);
return react_default.a.createElement(TreeNode, Object.assign({}, processProps(props)), childrenNodes);
});
}
/**
* Parse `checkedKeys` to { checkedKeys, halfCheckedKeys } style
*/
function parseCheckedKeys(keys) {
if (!keys) {
return null;
} // Convert keys to object format
var keyProps;
if (Array.isArray(keys)) {
// [Legacy] Follow the api doc
keyProps = {
checkedKeys: keys,
halfCheckedKeys: undefined
};
} else if (Object(esm_typeof["a" /* default */])(keys) === 'object') {
keyProps = {
checkedKeys: keys.checked || undefined,
halfCheckedKeys: keys.halfChecked || undefined
};
} else {
Object(warning["a" /* default */])(false, '`checkedKeys` is not an array or an object');
return null;
}
return keyProps;
}
/**
* If user use `autoExpandParent` we should get the list of parent node
* @param keyList
* @param keyEntities
*/
function conductExpandParent(keyList, keyEntities) {
var expandedKeys = new Set();
function conductUp(key) {
if (expandedKeys.has(key)) return;
var entity = keyEntities[key];
if (!entity) return;
expandedKeys.add(key);
var parent = entity.parent,
node = entity.node;
if (node.disabled) return;
if (parent) {
conductUp(parent.key);
}
}
(keyList || []).forEach(function (key) {
conductUp(key);
});
return Object(toConsumableArray["a" /* default */])(expandedKeys);
}
/**
* Returns only the data- and aria- key/value pairs
*/
function getDataAndAria(props) {
var omitProps = {};
Object.keys(props).forEach(function (key) {
if (key.startsWith('data-') || key.startsWith('aria-')) {
omitProps[key] = props[key];
}
});
return omitProps;
}
// CONCATENATED MODULE: ./node_modules/rc-tree/es/utils/treeUtil.js
function getKey(key, pos) {
if (key !== null && key !== undefined) {
return key;
}
return pos;
}
/**
* Warning if TreeNode do not provides key
*/
function warningWithoutKey() {
var treeData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var keys = new Map();
function dig(list) {
var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
(list || []).forEach(function (treeNode) {
var key = treeNode.key,
children = treeNode.children;
Object(warning["a" /* default */])(key !== null && key !== undefined, "Tree node must have a certain key: [".concat(path).concat(key, "]"));
var recordKey = String(key);
Object(warning["a" /* default */])(!keys.has(recordKey) || key === null || key === undefined, "Same 'key' exist in the Tree: ".concat(recordKey));
keys.set(recordKey, true);
dig(children, "".concat(path).concat(recordKey, " > "));
});
}
dig(treeData);
}
/**
* Convert `children` of Tree into `treeData` structure.
*/
function convertTreeToData(rootNodes) {
function dig(node) {
var treeNodes = Object(Children_toArray["a" /* default */])(node);
return treeNodes.map(function (treeNode) {
// Filter invalidate node
if (!isTreeNode(treeNode)) {
Object(warning["a" /* default */])(!treeNode, 'Tree/TreeNode can only accept TreeNode as children.');
return null;
}
var key = treeNode.key;
var _treeNode$props = treeNode.props,
children = _treeNode$props.children,
rest = Object(objectWithoutProperties["a" /* default */])(_treeNode$props, ["children"]);
var dataNode = Object(objectSpread2["a" /* default */])({
key: key
}, rest);
var parsedChildren = dig(children);
if (parsedChildren.length) {
dataNode.children = parsedChildren;
}
return dataNode;
}).filter(function (dataNode) {
return dataNode;
});
}
return dig(rootNodes);
}
/**
* Flat nest tree data into flatten list. This is used for virtual list render.
* @param treeNodeList Origin data node list
* @param expandedKeys
* need expanded keys, provides `true` means all expanded (used in `rc-tree-select`).
*/
function flattenTreeData() {
var treeNodeList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var expandedKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var expandedKeySet = new Set(expandedKeys === true ? [] : expandedKeys);
var flattenList = [];
function dig(list) {
var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
return list.map(function (treeNode, index) {
var pos = getPosition(parent ? parent.pos : '0', index);
var mergedKey = getKey(treeNode.key, pos); // Add FlattenDataNode into list
var flattenNode = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, treeNode), {}, {
parent: parent,
pos: pos,
children: null,
data: treeNode,
isStart: [].concat(Object(toConsumableArray["a" /* default */])(parent ? parent.isStart : []), [index === 0]),
isEnd: [].concat(Object(toConsumableArray["a" /* default */])(parent ? parent.isEnd : []), [index === list.length - 1])
});
flattenList.push(flattenNode); // Loop treeNode children
if (expandedKeys === true || expandedKeySet.has(mergedKey)) {
flattenNode.children = dig(treeNode.children || [], flattenNode);
} else {
flattenNode.children = [];
}
return flattenNode;
});
}
dig(treeNodeList);
return flattenList;
}
/**
* Traverse all the data by `treeData`.
* Please not use it out of the `rc-tree` since we may refactor this code.
*/
function traverseDataNodes(dataNodes, callback, externalGetKey) {
var syntheticGetKey;
if (externalGetKey) {
if (typeof externalGetKey === 'string') {
syntheticGetKey = function syntheticGetKey(node) {
return node[externalGetKey];
};
} else if (typeof externalGetKey === 'function') {
syntheticGetKey = function syntheticGetKey(node) {
return externalGetKey(node);
};
}
} else {
syntheticGetKey = function syntheticGetKey(node, pos) {
return getKey(node.key, pos);
};
}
function processNode(node, index, parent) {
var children = node ? node.children : dataNodes;
var pos = node ? getPosition(parent.pos, index) : '0'; // Process node if is not root
if (node) {
var key = syntheticGetKey(node, pos);
var data = {
node: node,
index: index,
pos: pos,
key: key,
parentPos: parent.node ? parent.pos : null,
level: parent.level + 1
};
callback(data);
} // Process children node
if (children) {
children.forEach(function (subNode, subIndex) {
processNode(subNode, subIndex, {
node: node,
pos: pos,
level: parent ? parent.level + 1 : -1
});
});
}
}
processNode(null);
}
/**
* Convert `treeData` into entity records.
*/
function convertDataToEntities(dataNodes) {
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
initWrapper = _ref.initWrapper,
processEntity = _ref.processEntity,
onProcessFinished = _ref.onProcessFinished;
var externalGetKey = arguments.length > 2 ? arguments[2] : undefined;
var posEntities = {};
var keyEntities = {};
var wrapper = {
posEntities: posEntities,
keyEntities: keyEntities
};
if (initWrapper) {
wrapper = initWrapper(wrapper) || wrapper;
}
traverseDataNodes(dataNodes, function (item) {
var node = item.node,
index = item.index,
pos = item.pos,
key = item.key,
parentPos = item.parentPos,
level = item.level;
var entity = {
node: node,
index: index,
key: key,
pos: pos,
level: level
};
var mergedKey = getKey(key, pos);
posEntities[pos] = entity;
keyEntities[mergedKey] = entity; // Fill children
entity.parent = posEntities[parentPos];
if (entity.parent) {
entity.parent.children = entity.parent.children || [];
entity.parent.children.push(entity);
}
if (processEntity) {
processEntity(entity, wrapper);
}
}, externalGetKey);
if (onProcessFinished) {
onProcessFinished(wrapper);
}
return wrapper;
}
/**
* Get TreeNode props with Tree props.
*/
function getTreeNodeProps(key, _ref2) {
var expandedKeys = _ref2.expandedKeys,
selectedKeys = _ref2.selectedKeys,
loadedKeys = _ref2.loadedKeys,
loadingKeys = _ref2.loadingKeys,
checkedKeys = _ref2.checkedKeys,
halfCheckedKeys = _ref2.halfCheckedKeys,
dragOverNodeKey = _ref2.dragOverNodeKey,
dropPosition = _ref2.dropPosition,
keyEntities = _ref2.keyEntities;
var entity = keyEntities[key];
var treeNodeProps = {
eventKey: key,
expanded: expandedKeys.indexOf(key) !== -1,
selected: selectedKeys.indexOf(key) !== -1,
loaded: loadedKeys.indexOf(key) !== -1,
loading: loadingKeys.indexOf(key) !== -1,
checked: checkedKeys.indexOf(key) !== -1,
halfChecked: halfCheckedKeys.indexOf(key) !== -1,
pos: String(entity ? entity.pos : ''),
// [Legacy] Drag props
dragOver: dragOverNodeKey === key && dropPosition === 0,
dragOverGapTop: dragOverNodeKey === key && dropPosition === -1,
dragOverGapBottom: dragOverNodeKey === key && dropPosition === 1
};
return treeNodeProps;
}
function convertNodePropsToEventData(props) {
var data = props.data,
expanded = props.expanded,
selected = props.selected,
checked = props.checked,
loaded = props.loaded,
loading = props.loading,
halfChecked = props.halfChecked,
dragOver = props.dragOver,
dragOverGapTop = props.dragOverGapTop,
dragOverGapBottom = props.dragOverGapBottom,
pos = props.pos,
active = props.active;
var eventData = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, data), {}, {
expanded: expanded,
selected: selected,
checked: checked,
loaded: loaded,
loading: loading,
halfChecked: halfChecked,
dragOver: dragOver,
dragOverGapTop: dragOverGapTop,
dragOverGapBottom: dragOverGapBottom,
pos: pos,
active: active
});
if (!('props' in eventData)) {
Object.defineProperty(eventData, 'props', {
get: function get() {
Object(warning["a" /* default */])(false, 'Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`.');
return props;
}
});
}
return eventData;
}
// CONCATENATED MODULE: ./node_modules/rc-tree/es/utils/conductUtil.js
function removeFromCheckedKeys(halfCheckedKeys, checkedKeys) {
var filteredKeys = new Set();
halfCheckedKeys.forEach(function (key) {
if (!checkedKeys.has(key)) {
filteredKeys.add(key);
}
});
return filteredKeys;
}
function isCheckDisabled(node) {
var _ref = node || {},
disabled = _ref.disabled,
disableCheckbox = _ref.disableCheckbox,
checkable = _ref.checkable;
return !!(disabled || disableCheckbox) || checkable === false;
} // Fill miss keys
function fillConductCheck(keys, levelEntities, maxLevel, syntheticGetCheckDisabled) {
var checkedKeys = new Set(keys);
var halfCheckedKeys = new Set(); // Add checked keys top to bottom
for (var level = 0; level <= maxLevel; level += 1) {
var entities = levelEntities.get(level) || new Set();
entities.forEach(function (entity) {
var key = entity.key,
node = entity.node,
_entity$children = entity.children,
children = _entity$children === void 0 ? [] : _entity$children;
if (checkedKeys.has(key) && !syntheticGetCheckDisabled(node)) {
children.filter(function (childEntity) {
return !syntheticGetCheckDisabled(childEntity.node);
}).forEach(function (childEntity) {
checkedKeys.add(childEntity.key);
});
}
});
} // Add checked keys from bottom to top
var visitedKeys = new Set();
for (var _level = maxLevel; _level >= 0; _level -= 1) {
var _entities = levelEntities.get(_level) || new Set();
_entities.forEach(function (entity) {
var parent = entity.parent,
node = entity.node; // Skip if no need to check
if (syntheticGetCheckDisabled(node) || !entity.parent || visitedKeys.has(entity.parent.key)) {
return;
} // Skip if parent is disabled
if (syntheticGetCheckDisabled(entity.parent.node)) {
visitedKeys.add(parent.key);
return;
}
var allChecked = true;
var partialChecked = false;
(parent.children || []).filter(function (childEntity) {
return !syntheticGetCheckDisabled(childEntity.node);
}).forEach(function (_ref2) {
var key = _ref2.key;
var checked = checkedKeys.has(key);
if (allChecked && !checked) {
allChecked = false;
}
if (!partialChecked && (checked || halfCheckedKeys.has(key))) {
partialChecked = true;
}
});
if (allChecked) {
checkedKeys.add(parent.key);
}
if (partialChecked) {
halfCheckedKeys.add(parent.key);
}
visitedKeys.add(parent.key);
});
}
return {
checkedKeys: Array.from(checkedKeys),
halfCheckedKeys: Array.from(removeFromCheckedKeys(halfCheckedKeys, checkedKeys))
};
} // Remove useless key
function cleanConductCheck(keys, halfKeys, levelEntities, maxLevel, syntheticGetCheckDisabled) {
var checkedKeys = new Set(keys);
var halfCheckedKeys = new Set(halfKeys); // Remove checked keys from top to bottom
for (var level = 0; level <= maxLevel; level += 1) {
var entities = levelEntities.get(level) || new Set();
entities.forEach(function (entity) {
var key = entity.key,
node = entity.node,
_entity$children2 = entity.children,
children = _entity$children2 === void 0 ? [] : _entity$children2;
if (!checkedKeys.has(key) && !halfCheckedKeys.has(key) && !syntheticGetCheckDisabled(node)) {
children.filter(function (childEntity) {
return !syntheticGetCheckDisabled(childEntity.node);
}).forEach(function (childEntity) {
checkedKeys.delete(childEntity.key);
});
}
});
} // Remove checked keys form bottom to top
halfCheckedKeys = new Set();
var visitedKeys = new Set();
for (var _level2 = maxLevel; _level2 >= 0; _level2 -= 1) {
var _entities2 = levelEntities.get(_level2) || new Set();
_entities2.forEach(function (entity) {
var parent = entity.parent,
node = entity.node; // Skip if no need to check
if (syntheticGetCheckDisabled(node) || !entity.parent || visitedKeys.has(entity.parent.key)) {
return;
} // Skip if parent is disabled
if (syntheticGetCheckDisabled(entity.parent.node)) {
visitedKeys.add(parent.key);
return;
}
var allChecked = true;
var partialChecked = false;
(parent.children || []).filter(function (childEntity) {
return !syntheticGetCheckDisabled(childEntity.node);
}).forEach(function (_ref3) {
var key = _ref3.key;
var checked = checkedKeys.has(key);
if (allChecked && !checked) {
allChecked = false;
}
if (!partialChecked && (checked || halfCheckedKeys.has(key))) {
partialChecked = true;
}
});
if (!allChecked) {
checkedKeys.delete(parent.key);
}
if (partialChecked) {
halfCheckedKeys.add(parent.key);
}
visitedKeys.add(parent.key);
});
}
return {
checkedKeys: Array.from(checkedKeys),
halfCheckedKeys: Array.from(removeFromCheckedKeys(halfCheckedKeys, checkedKeys))
};
}
/**
* Conduct with keys.
* @param keyList current key list
* @param keyEntities key - dataEntity map
* @param mode `fill` to fill missing key, `clean` to remove useless key
*/
function conductCheck(keyList, checked, keyEntities, getCheckDisabled) {
var warningMissKeys = [];
var syntheticGetCheckDisabled;
if (getCheckDisabled) {
syntheticGetCheckDisabled = getCheckDisabled;
} else {
syntheticGetCheckDisabled = isCheckDisabled;
} // We only handle exist keys
var keys = new Set(keyList.filter(function (key) {
var hasEntity = !!keyEntities[key];
if (!hasEntity) {
warningMissKeys.push(key);
}
return hasEntity;
}));
var levelEntities = new Map();
var maxLevel = 0; // Convert entities by level for calculation
Object.keys(keyEntities).forEach(function (key) {
var entity = keyEntities[key];
var level = entity.level;
var levelSet = levelEntities.get(level);
if (!levelSet) {
levelSet = new Set();
levelEntities.set(level, levelSet);
}
levelSet.add(entity);
maxLevel = Math.max(maxLevel, level);
});
Object(warning["a" /* default */])(!warningMissKeys.length, "Tree missing follow keys: ".concat(warningMissKeys.slice(0, 100).map(function (key) {
return "'".concat(key, "'");
}).join(', ')));
var result;
if (checked === true) {
result = fillConductCheck(keys, levelEntities, maxLevel, syntheticGetCheckDisabled);
} else {
result = cleanConductCheck(keys, checked.halfCheckedKeys, levelEntities, maxLevel, syntheticGetCheckDisabled);
}
return result;
}
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMergedState.js
var useMergedState = __webpack_require__("6cGi");
// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/index.js + 2 modules
var es_checkbox = __webpack_require__("kaz8");
// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/index.js
var dropdown = __webpack_require__("jsC+");
// EXTERNAL MODULE: ./node_modules/antd/es/menu/index.js + 16 modules
var es_menu = __webpack_require__("BvKs");
// EXTERNAL MODULE: ./node_modules/antd/es/radio/index.js + 5 modules
var es_radio = __webpack_require__("9yH6");
// EXTERNAL MODULE: ./node_modules/antd/es/_util/devWarning.js
var devWarning = __webpack_require__("uaoM");
// CONCATENATED MODULE: ./node_modules/antd/es/table/hooks/useSelection.js
// TODO: warning if use ajax!!!
var SELECTION_ALL = 'SELECT_ALL';
var SELECTION_INVERT = 'SELECT_INVERT';
function getFixedType(column) {
return column && column.fixed;
}
function flattenData(data, childrenColumnName) {
var list = [];
(data || []).forEach(function (record) {
list.push(record);
if (record && typeof_default()(record) === 'object' && childrenColumnName in record) {
list = [].concat(toConsumableArray_default()(list), toConsumableArray_default()(flattenData(record[childrenColumnName], childrenColumnName)));
}
});
return list;
}
function useSelection(rowSelection, config) {
var _ref = rowSelection || {},
preserveSelectedRowKeys = _ref.preserveSelectedRowKeys,
selectedRowKeys = _ref.selectedRowKeys,
getCheckboxProps = _ref.getCheckboxProps,
onSelectionChange = _ref.onChange,
onSelect = _ref.onSelect,
onSelectAll = _ref.onSelectAll,
onSelectInvert = _ref.onSelectInvert,
onSelectMultiple = _ref.onSelectMultiple,
selectionColWidth = _ref.columnWidth,
selectionType = _ref.type,
selections = _ref.selections,
fixed = _ref.fixed,
customizeRenderCell = _ref.renderCell,
hideSelectAll = _ref.hideSelectAll,
_ref$checkStrictly = _ref.checkStrictly,
checkStrictly = _ref$checkStrictly === void 0 ? true : _ref$checkStrictly;
var prefixCls = config.prefixCls,
data = config.data,
pageData = config.pageData,
getRecordByKey = config.getRecordByKey,
getRowKey = config.getRowKey,
expandType = config.expandType,
childrenColumnName = config.childrenColumnName,
tableLocale = config.locale,
expandIconColumnIndex = config.expandIconColumnIndex,
getPopupContainer = config.getPopupContainer; // ======================== Caches ========================
var preserveRecordsRef = react["useRef"](new Map()); // ========================= Keys =========================
var _useMergedState = Object(useMergedState["a" /* default */])(selectedRowKeys || [], {
value: selectedRowKeys
}),
_useMergedState2 = slicedToArray_default()(_useMergedState, 2),
mergedSelectedKeys = _useMergedState2[0],
setMergedSelectedKeys = _useMergedState2[1];
var _useMemo = Object(react["useMemo"])(function () {
return checkStrictly ? {
keyEntities: null
} : convertDataToEntities(data, undefined, getRowKey);
}, [data, getRowKey, checkStrictly]),
keyEntities = _useMemo.keyEntities; // Get flatten data
var flattedData = Object(react["useMemo"])(function () {
return flattenData(pageData, childrenColumnName);
}, [pageData, childrenColumnName]); // Get all checkbox props
var checkboxPropsMap = Object(react["useMemo"])(function () {
var map = new Map();
flattedData.forEach(function (record, index) {
var key = getRowKey(record, index);
var checkboxProps = (getCheckboxProps ? getCheckboxProps(record) : null) || {};
map.set(key, checkboxProps);
if (false) {}
});
return map;
}, [flattedData, getRowKey, getCheckboxProps]);
var isCheckboxDisabled = Object(react["useCallback"])(function (r) {
var _a;
return !!((_a = checkboxPropsMap.get(getRowKey(r))) === null || _a === void 0 ? void 0 : _a.disabled);
}, [checkboxPropsMap, getRowKey]);
var _useMemo2 = Object(react["useMemo"])(function () {
if (checkStrictly) {
return [mergedSelectedKeys, []];
}
var _conductCheck = conductCheck(mergedSelectedKeys, true, keyEntities, isCheckboxDisabled),
checkedKeys = _conductCheck.checkedKeys,
halfCheckedKeys = _conductCheck.halfCheckedKeys;
return [checkedKeys, halfCheckedKeys];
}, [mergedSelectedKeys, checkStrictly, keyEntities, isCheckboxDisabled]),
_useMemo3 = slicedToArray_default()(_useMemo2, 2),
derivedSelectedKeys = _useMemo3[0],
derivedHalfSelectedKeys = _useMemo3[1];
var derivedSelectedKeySet = Object(react["useMemo"])(function () {
var keys = selectionType === 'radio' ? derivedSelectedKeys.slice(0, 1) : derivedSelectedKeys;
return new Set(keys);
}, [derivedSelectedKeys, selectionType]);
var derivedHalfSelectedKeySet = Object(react["useMemo"])(function () {
return selectionType === 'radio' ? new Set() : new Set(derivedHalfSelectedKeys);
}, [derivedHalfSelectedKeys, selectionType]); // Save last selected key to enable range selection
var _useState = Object(react["useState"])(null),
_useState2 = slicedToArray_default()(_useState, 2),
lastSelectedKey = _useState2[0],
setLastSelectedKey = _useState2[1]; // Reset if rowSelection reset
react["useEffect"](function () {
if (!rowSelection) {
setMergedSelectedKeys([]);
}
}, [!!rowSelection]);
var setSelectedKeys = Object(react["useCallback"])(function (keys) {
var availableKeys;
var records;
if (preserveSelectedRowKeys) {
// Keep key if mark as preserveSelectedRowKeys
var newCache = new Map();
availableKeys = keys;
records = keys.map(function (key) {
var record = getRecordByKey(key);
if (!record && preserveRecordsRef.current.has(key)) {
record = preserveRecordsRef.current.get(key);
}
newCache.set(key, record);
return record;
}); // Refresh to new cache
preserveRecordsRef.current = newCache;
} else {
// Filter key which not exist in the `dataSource`
availableKeys = [];
records = [];
keys.forEach(function (key) {
var record = getRecordByKey(key);
if (record !== undefined) {
availableKeys.push(key);
records.push(record);
}
});
}
setMergedSelectedKeys(availableKeys);
if (onSelectionChange) {
onSelectionChange(availableKeys, records);
}
}, [setMergedSelectedKeys, getRecordByKey, onSelectionChange, preserveSelectedRowKeys]); // ====================== Selections ======================
// Trigger single `onSelect` event
var triggerSingleSelection = Object(react["useCallback"])(function (key, selected, keys, event) {
if (onSelect) {
var rows = keys.map(function (k) {
return getRecordByKey(k);
});
onSelect(getRecordByKey(key), selected, rows, event);
}
setSelectedKeys(keys);
}, [onSelect, getRecordByKey, setSelectedKeys]);
var mergedSelections = Object(react["useMemo"])(function () {
if (!selections || hideSelectAll) {
return null;
}
var selectionList = selections === true ? [SELECTION_ALL, SELECTION_INVERT] : selections;
return selectionList.map(function (selection) {
if (selection === SELECTION_ALL) {
return {
key: 'all',
text: tableLocale.selectionAll,
onSelect: function onSelect() {
setSelectedKeys(data.map(function (record, index) {
return getRowKey(record, index);
}));
}
};
}
if (selection === SELECTION_INVERT) {
return {
key: 'invert',
text: tableLocale.selectInvert,
onSelect: function onSelect() {
var keySet = new Set(derivedSelectedKeySet);
pageData.forEach(function (record, index) {
var key = getRowKey(record, index);
if (keySet.has(key)) {
keySet["delete"](key);
} else {
keySet.add(key);
}
});
var keys = Array.from(keySet);
setSelectedKeys(keys);
if (onSelectInvert) {
Object(devWarning["a" /* default */])(false, 'Table', '`onSelectInvert` will be removed in future. Please use `onChange` instead.');
onSelectInvert(keys);
}
}
};
}
return selection;
});
}, [selections, derivedSelectedKeySet, pageData, getRowKey, onSelectInvert, setSelectedKeys]); // ======================= Columns ========================
var transformColumns = Object(react["useCallback"])(function (columns) {
if (!rowSelection) {
return columns;
} // Support selection
var keySet = new Set(derivedSelectedKeySet); // Record key only need check with enabled
var recordKeys = flattedData.map(getRowKey).filter(function (key) {
return !checkboxPropsMap.get(key).disabled;
});
var checkedCurrentAll = recordKeys.every(function (key) {
return keySet.has(key);
});
var checkedCurrentSome = recordKeys.some(function (key) {
return keySet.has(key);
});
var onSelectAllChange = function onSelectAllChange() {
var changeKeys = [];
if (checkedCurrentAll) {
recordKeys.forEach(function (key) {
keySet["delete"](key);
changeKeys.push(key);
});
} else {
recordKeys.forEach(function (key) {
if (!keySet.has(key)) {
keySet.add(key);
changeKeys.push(key);
}
});
}
var keys = Array.from(keySet);
setSelectedKeys(keys);
if (onSelectAll) {
onSelectAll(!checkedCurrentAll, keys.map(function (k) {
return getRecordByKey(k);
}), changeKeys.map(function (k) {
return getRecordByKey(k);
}));
}
}; // ===================== Render =====================
// Title Cell
var title;
if (selectionType !== 'radio') {
var customizeSelections;
if (mergedSelections) {
var menu = /*#__PURE__*/react["createElement"](es_menu["a" /* default */], {
getPopupContainer: getPopupContainer
}, mergedSelections.map(function (selection, index) {
var key = selection.key,
text = selection.text,
onSelectionClick = selection.onSelect;
return /*#__PURE__*/react["createElement"](es_menu["a" /* default */].Item, {
key: key || index,
onClick: function onClick() {
if (onSelectionClick) {
onSelectionClick(recordKeys);
}
}
}, text);
}));
customizeSelections = /*#__PURE__*/react["createElement"]("div", {
className: "".concat(prefixCls, "-selection-extra")
}, /*#__PURE__*/react["createElement"](dropdown["a" /* default */], {
overlay: menu,
getPopupContainer: getPopupContainer
}, /*#__PURE__*/react["createElement"]("span", null, /*#__PURE__*/react["createElement"](DownOutlined_default.a, null))));
}
var allDisabled = flattedData.every(function (record, index) {
var key = getRowKey(record, index);
var checkboxProps = checkboxPropsMap.get(key) || {};
return checkboxProps.disabled;
});
title = !hideSelectAll && /*#__PURE__*/react["createElement"]("div", {
className: "".concat(prefixCls, "-selection")
}, /*#__PURE__*/react["createElement"](es_checkbox["a" /* default */], {
checked: !allDisabled && !!flattedData.length && checkedCurrentAll,
indeterminate: !checkedCurrentAll && checkedCurrentSome,
onChange: onSelectAllChange,
disabled: flattedData.length === 0 || allDisabled
}), customizeSelections);
} // Body Cell
var renderCell;
if (selectionType === 'radio') {
renderCell = function renderCell(_, record, index) {
var key = getRowKey(record, index);
var checked = keySet.has(key);
return {
node: /*#__PURE__*/react["createElement"](es_radio["a" /* default */], extends_default()({}, checkboxPropsMap.get(key), {
checked: checked,
onClick: function onClick(e) {
return e.stopPropagation();
},
onChange: function onChange(event) {
if (!keySet.has(key)) {
triggerSingleSelection(key, true, [key], event.nativeEvent);
}
}
})),
checked: checked
};
};
} else {
renderCell = function renderCell(_, record, index) {
var _a;
var key = getRowKey(record, index);
var checked = keySet.has(key);
var indeterminate = derivedHalfSelectedKeySet.has(key);
var checkboxProps = checkboxPropsMap.get(key);
var mergedIndeterminate;
if (expandType === 'nest') {
mergedIndeterminate = indeterminate;
Object(devWarning["a" /* default */])(!(typeof (checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.indeterminate) === 'boolean'), 'Table', 'set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.');
} else {
mergedIndeterminate = (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.indeterminate) !== null && _a !== void 0 ? _a : indeterminate;
} // Record checked
return {
node: /*#__PURE__*/react["createElement"](es_checkbox["a" /* default */], extends_default()({}, checkboxProps, {
indeterminate: mergedIndeterminate,
checked: checked,
onClick: function onClick(e) {
return e.stopPropagation();
},
onChange: function onChange(_ref2) {
var nativeEvent = _ref2.nativeEvent;
var shiftKey = nativeEvent.shiftKey;
var startIndex = -1;
var endIndex = -1; // Get range of this
if (shiftKey && checkStrictly) {
var pointKeys = new Set([lastSelectedKey, key]);
recordKeys.some(function (recordKey, recordIndex) {
if (pointKeys.has(recordKey)) {
if (startIndex === -1) {
startIndex = recordIndex;
} else {
endIndex = recordIndex;
return true;
}
}
return false;
});
}
if (endIndex !== -1 && startIndex !== endIndex && checkStrictly) {
// Batch update selections
var rangeKeys = recordKeys.slice(startIndex, endIndex + 1);
var changedKeys = [];
if (checked) {
rangeKeys.forEach(function (recordKey) {
if (keySet.has(recordKey)) {
changedKeys.push(recordKey);
keySet["delete"](recordKey);
}
});
} else {
rangeKeys.forEach(function (recordKey) {
if (!keySet.has(recordKey)) {
changedKeys.push(recordKey);
keySet.add(recordKey);
}
});
}
var keys = Array.from(keySet);
setSelectedKeys(keys);
if (onSelectMultiple) {
onSelectMultiple(!checked, keys.map(function (recordKey) {
return getRecordByKey(recordKey);
}), changedKeys.map(function (recordKey) {
return getRecordByKey(recordKey);
}));
}
} else {
// Single record selected
var originCheckedKeys = derivedSelectedKeys;
if (checkStrictly) {
var checkedKeys = checked ? arrDel(originCheckedKeys, key) : arrAdd(originCheckedKeys, key);
triggerSingleSelection(key, !checked, checkedKeys, nativeEvent);
} else {
// Always fill first
var result = conductCheck([].concat(toConsumableArray_default()(originCheckedKeys), [key]), true, keyEntities, isCheckboxDisabled);
var _checkedKeys = result.checkedKeys,
halfCheckedKeys = result.halfCheckedKeys;
var nextCheckedKeys = _checkedKeys; // If remove, we do it again to correction
if (checked) {
var tempKeySet = new Set(_checkedKeys);
tempKeySet["delete"](key);
nextCheckedKeys = conductCheck(Array.from(tempKeySet), {
checked: false,
halfCheckedKeys: halfCheckedKeys
}, keyEntities, isCheckboxDisabled).checkedKeys;
}
triggerSingleSelection(key, !checked, nextCheckedKeys, nativeEvent);
}
}
setLastSelectedKey(key);
}
})),
checked: checked
};
};
}
var renderSelectionCell = function renderSelectionCell(_, record, index) {
var _renderCell = renderCell(_, record, index),
node = _renderCell.node,
checked = _renderCell.checked;
if (customizeRenderCell) {
return customizeRenderCell(checked, record, index, node);
}
return node;
}; // Columns
var selectionColumn = defineProperty_default()({
width: selectionColWidth,
className: "".concat(prefixCls, "-selection-column"),
title: rowSelection.columnTitle || title,
render: renderSelectionCell
}, INTERNAL_COL_DEFINE, {
className: "".concat(prefixCls, "-selection-col")
});
if (expandType === 'row' && columns.length && !expandIconColumnIndex) {
var _columns = toArray_default()(columns),
expandColumn = _columns[0],
restColumns = _columns.slice(1);
var selectionFixed = fixed || getFixedType(restColumns[0]);
if (selectionFixed) {
expandColumn.fixed = selectionFixed;
}
return [expandColumn, extends_default()(extends_default()({}, selectionColumn), {
fixed: selectionFixed
})].concat(toConsumableArray_default()(restColumns));
}
return [extends_default()(extends_default()({}, selectionColumn), {
fixed: fixed || getFixedType(columns[0])
})].concat(toConsumableArray_default()(columns));
}, [getRowKey, flattedData, rowSelection, derivedSelectedKeys, derivedSelectedKeySet, derivedHalfSelectedKeySet, selectionColWidth, mergedSelections, expandType, lastSelectedKey, checkboxPropsMap, onSelectMultiple, triggerSingleSelection, isCheckboxDisabled]);
return [transformColumns, derivedSelectedKeySet];
}
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/CaretDownOutlined.js
var CaretDownOutlined = __webpack_require__("6SEX");
var CaretDownOutlined_default = /*#__PURE__*/__webpack_require__.n(CaretDownOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/CaretUpOutlined.js
var CaretUpOutlined = __webpack_require__("i8CU");
var CaretUpOutlined_default = /*#__PURE__*/__webpack_require__.n(CaretUpOutlined);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 5 modules
var tooltip = __webpack_require__("3S7+");
// CONCATENATED MODULE: ./node_modules/antd/es/table/util.js
function getColumnKey(column, defaultKey) {
if ('key' in column && column.key !== undefined && column.key !== null) {
return column.key;
}
if (column.dataIndex) {
return Array.isArray(column.dataIndex) ? column.dataIndex.join('.') : column.dataIndex;
}
return defaultKey;
}
function getColumnPos(index, pos) {
return pos ? "".concat(pos, "-").concat(index) : "".concat(index);
}
function renderColumnTitle(title, props) {
if (typeof title === 'function') {
return title(props);
}
return title;
}
// CONCATENATED MODULE: ./node_modules/antd/es/table/hooks/useSorter.js
var ASCEND = 'ascend';
var DESCEND = 'descend';
function getMultiplePriority(column) {
if (typeof_default()(column.sorter) === 'object' && typeof column.sorter.multiple === 'number') {
return column.sorter.multiple;
}
return false;
}
function getSortFunction(sorter) {
if (typeof sorter === 'function') {
return sorter;
}
if (sorter && typeof_default()(sorter) === 'object' && sorter.compare) {
return sorter.compare;
}
return false;
}
function nextSortDirection(sortDirections, current) {
if (!current) {
return sortDirections[0];
}
return sortDirections[sortDirections.indexOf(current) + 1];
}
function collectSortStates(columns, init, pos) {
var sortStates = [];
function pushState(column, columnPos) {
sortStates.push({
column: column,
key: getColumnKey(column, columnPos),
multiplePriority: getMultiplePriority(column),
sortOrder: column.sortOrder
});
}
(columns || []).forEach(function (column, index) {
var columnPos = getColumnPos(index, pos);
if (column.children) {
if ('sortOrder' in column) {
// Controlled
pushState(column, columnPos);
}
sortStates = [].concat(toConsumableArray_default()(sortStates), toConsumableArray_default()(collectSortStates(column.children, init, columnPos)));
} else if (column.sorter) {
if ('sortOrder' in column) {
// Controlled
pushState(column, columnPos);
} else if (init && column.defaultSortOrder) {
// Default sorter
sortStates.push({
column: column,
key: getColumnKey(column, columnPos),
multiplePriority: getMultiplePriority(column),
sortOrder: column.defaultSortOrder
});
}
}
});
return sortStates;
}
function injectSorter(prefixCls, columns, sorterSates, triggerSorter, defaultSortDirections, tableLocale, tableShowSorterTooltip, pos) {
return (columns || []).map(function (column, index) {
var columnPos = getColumnPos(index, pos);
var newColumn = column;
if (newColumn.sorter) {
var sortDirections = newColumn.sortDirections || defaultSortDirections;
var showSorterTooltip = newColumn.showSorterTooltip === undefined ? tableShowSorterTooltip : newColumn.showSorterTooltip;
var columnKey = getColumnKey(newColumn, columnPos);
var sorterState = sorterSates.find(function (_ref) {
var key = _ref.key;
return key === columnKey;
});
var sorterOrder = sorterState ? sorterState.sortOrder : null;
var nextSortOrder = nextSortDirection(sortDirections, sorterOrder);
var upNode = sortDirections.includes(ASCEND) && /*#__PURE__*/react["createElement"](CaretUpOutlined_default.a, {
className: classnames_default()("".concat(prefixCls, "-column-sorter-up"), {
active: sorterOrder === ASCEND
})
});
var downNode = sortDirections.includes(DESCEND) && /*#__PURE__*/react["createElement"](CaretDownOutlined_default.a, {
className: classnames_default()("".concat(prefixCls, "-column-sorter-down"), {
active: sorterOrder === DESCEND
})
});
var _ref2 = tableLocale || {},
cancelSort = _ref2.cancelSort,
triggerAsc = _ref2.triggerAsc,
triggerDesc = _ref2.triggerDesc;
var sortTip = cancelSort;
if (nextSortOrder === DESCEND) {
sortTip = triggerDesc;
} else if (nextSortOrder === ASCEND) {
sortTip = triggerAsc;
}
newColumn = extends_default()(extends_default()({}, newColumn), {
className: classnames_default()(newColumn.className, defineProperty_default()({}, "".concat(prefixCls, "-column-sort"), sorterOrder)),
title: function title(renderProps) {
var renderSortTitle = /*#__PURE__*/react["createElement"]("div", {
className: "".concat(prefixCls, "-column-sorters")
}, /*#__PURE__*/react["createElement"]("span", null, renderColumnTitle(column.title, renderProps)), /*#__PURE__*/react["createElement"]("span", {
className: classnames_default()("".concat(prefixCls, "-column-sorter"), defineProperty_default()({}, "".concat(prefixCls, "-column-sorter-full"), upNode && downNode))
}, /*#__PURE__*/react["createElement"]("span", {
className: "".concat(prefixCls, "-column-sorter-inner")
}, upNode, downNode)));
return showSorterTooltip ? /*#__PURE__*/react["createElement"](tooltip["a" /* default */], {
title: sortTip
}, /*#__PURE__*/react["createElement"]("div", {
className: "".concat(prefixCls, "-column-sorters-with-tooltip")
}, renderSortTitle)) : renderSortTitle;
},
onHeaderCell: function onHeaderCell(col) {
var cell = column.onHeaderCell && column.onHeaderCell(col) || {};
var originOnClick = cell.onClick;
cell.onClick = function (event) {
triggerSorter({
column: column,
key: columnKey,
sortOrder: nextSortOrder,
multiplePriority: getMultiplePriority(column)
});
if (originOnClick) {
originOnClick(event);
}
};
cell.className = classnames_default()(cell.className, "".concat(prefixCls, "-column-has-sorters"));
return cell;
}
});
}
if ('children' in newColumn) {
newColumn = extends_default()(extends_default()({}, newColumn), {
children: injectSorter(prefixCls, newColumn.children, sorterSates, triggerSorter, defaultSortDirections, tableLocale, tableShowSorterTooltip, columnPos)
});
}
return newColumn;
});
}
function stateToInfo(sorterStates) {
var column = sorterStates.column,
sortOrder = sorterStates.sortOrder;
return {
column: column,
order: sortOrder,
field: column.dataIndex,
columnKey: column.key
};
}
function generateSorterInfo(sorterStates) {
var list = sorterStates.filter(function (_ref3) {
var sortOrder = _ref3.sortOrder;
return sortOrder;
}).map(stateToInfo); // =========== Legacy compatible support ===========
// https://github.com/ant-design/ant-design/pull/19226
if (list.length === 0 && sorterStates.length) {
return extends_default()(extends_default()({}, stateToInfo(sorterStates[sorterStates.length - 1])), {
column: undefined
});
}
if (list.length <= 1) {
return list[0] || {};
}
return list;
}
function getSortData(data, sortStates, childrenColumnName) {
var innerSorterStates = sortStates.slice().sort(function (a, b) {
return b.multiplePriority - a.multiplePriority;
});
var cloneData = data.slice();
var runningSorters = innerSorterStates.filter(function (_ref4) {
var sorter = _ref4.column.sorter,
sortOrder = _ref4.sortOrder;
return getSortFunction(sorter) && sortOrder;
}); // Skip if no sorter needed
if (!runningSorters.length) {
return cloneData;
}
return cloneData.sort(function (record1, record2) {
for (var i = 0; i < runningSorters.length; i += 1) {
var sorterState = runningSorters[i];
var sorter = sorterState.column.sorter,
sortOrder = sorterState.sortOrder;
var compareFn = getSortFunction(sorter);
if (compareFn && sortOrder) {
var compareResult = compareFn(record1, record2, sortOrder);
if (compareResult !== 0) {
return sortOrder === ASCEND ? compareResult : -compareResult;
}
}
}
return 0;
}).map(function (record) {
var subRecords = record[childrenColumnName];
if (subRecords) {
return extends_default()(extends_default()({}, record), defineProperty_default()({}, childrenColumnName, getSortData(subRecords, sortStates, childrenColumnName)));
}
return record;
});
}
function useFilterSorter(_ref5) {
var prefixCls = _ref5.prefixCls,
mergedColumns = _ref5.mergedColumns,
onSorterChange = _ref5.onSorterChange,
sortDirections = _ref5.sortDirections,
tableLocale = _ref5.tableLocale,
showSorterTooltip = _ref5.showSorterTooltip;
var _React$useState = react["useState"](collectSortStates(mergedColumns, true)),
_React$useState2 = slicedToArray_default()(_React$useState, 2),
sortStates = _React$useState2[0],
setSortStates = _React$useState2[1];
var mergedSorterStates = react["useMemo"](function () {
var validate = true;
var collectedStates = collectSortStates(mergedColumns, false); // Return if not controlled
if (!collectedStates.length) {
return sortStates;
}
var validateStates = [];
function patchStates(state) {
if (validate) {
validateStates.push(state);
} else {
validateStates.push(extends_default()(extends_default()({}, state), {
sortOrder: null
}));
}
}
var multipleMode = null;
collectedStates.forEach(function (state) {
if (multipleMode === null) {
patchStates(state);
if (state.sortOrder) {
if (state.multiplePriority === false) {
validate = false;
} else {
multipleMode = true;
}
}
} else if (multipleMode && state.multiplePriority !== false) {
patchStates(state);
} else {
validate = false;
patchStates(state);
}
});
return validateStates;
}, [mergedColumns, sortStates]); // Get render columns title required props
var columnTitleSorterProps = react["useMemo"](function () {
var sortColumns = mergedSorterStates.map(function (_ref6) {
var column = _ref6.column,
sortOrder = _ref6.sortOrder;
return {
column: column,
order: sortOrder
};
});
return {
sortColumns: sortColumns,
// Legacy
sortColumn: sortColumns[0] && sortColumns[0].column,
sortOrder: sortColumns[0] && sortColumns[0].order
};
}, [mergedSorterStates]);
function triggerSorter(sortState) {
var newSorterStates;
if (sortState.multiplePriority === false || !mergedSorterStates.length || mergedSorterStates[0].multiplePriority === false) {
newSorterStates = [sortState];
} else {
newSorterStates = [].concat(toConsumableArray_default()(mergedSorterStates.filter(function (_ref7) {
var key = _ref7.key;
return key !== sortState.key;
})), [sortState]);
}
setSortStates(newSorterStates);
onSorterChange(generateSorterInfo(newSorterStates), newSorterStates);
}
var transformColumns = function transformColumns(innerColumns) {
return injectSorter(prefixCls, innerColumns, mergedSorterStates, triggerSorter, sortDirections, tableLocale, showSorterTooltip);
};
var getSorters = function getSorters() {
return generateSorterInfo(mergedSorterStates);
};
return [transformColumns, mergedSorterStates, columnTitleSorterProps, getSorters];
}
// EXTERNAL MODULE: ./node_modules/lodash/isEqual.js
var isEqual = __webpack_require__("Y+p1");
var isEqual_default = /*#__PURE__*/__webpack_require__.n(isEqual);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/FilterFilled.js
var FilterFilled = __webpack_require__("5Uyt");
var FilterFilled_default = /*#__PURE__*/__webpack_require__.n(FilterFilled);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__("2/Rp");
// EXTERNAL MODULE: ./node_modules/antd/es/empty/index.js + 2 modules
var empty = __webpack_require__("ECub");
// CONCATENATED MODULE: ./node_modules/antd/es/table/hooks/useFilter/FilterWrapper.js
var FilterWrapper_FilterDropdownMenuWrapper = function FilterDropdownMenuWrapper(props) {
return /*#__PURE__*/react["createElement"]("div", {
className: props.className,
onClick: function onClick(e) {
return e.stopPropagation();
}
}, props.children);
};
/* harmony default export */ var FilterWrapper = (FilterWrapper_FilterDropdownMenuWrapper);
// EXTERNAL MODULE: ./node_modules/antd/es/_util/hooks/useSyncState.js
var useSyncState = __webpack_require__("sPtV");
// CONCATENATED MODULE: ./node_modules/antd/es/table/hooks/useFilter/FilterDropdown.js
var SubMenu = es_menu["a" /* default */].SubMenu,
MenuItem = es_menu["a" /* default */].Item;
function hasSubMenu(filters) {
return filters.some(function (_ref) {
var children = _ref.children;
return children;
});
}
function renderFilterItems(_ref2) {
var filters = _ref2.filters,
prefixCls = _ref2.prefixCls,
filteredKeys = _ref2.filteredKeys,
filterMultiple = _ref2.filterMultiple,
locale = _ref2.locale;
if (filters.length === 0) {
// wrapped with <></> to avoid react warning
// https://github.com/ant-design/ant-design/issues/25979
return /*#__PURE__*/react["createElement"](react["Fragment"], null, /*#__PURE__*/react["createElement"](empty["a" /* default */], {
image: empty["a" /* default */].PRESENTED_IMAGE_SIMPLE,
description: locale.filterEmptyText,
style: {
margin: '16px 0'
},
imageStyle: {
height: 24
}
}));
}
return filters.map(function (filter, index) {
var key = String(filter.value);
if (filter.children) {
return /*#__PURE__*/react["createElement"](SubMenu, {
key: key || index,
title: filter.text,
popupClassName: "".concat(prefixCls, "-dropdown-submenu")
}, renderFilterItems({
filters: filter.children,
prefixCls: prefixCls,
filteredKeys: filteredKeys,
filterMultiple: filterMultiple,
locale: locale
}));
}
var Component = filterMultiple ? es_checkbox["a" /* default */] : es_radio["a" /* default */];
return /*#__PURE__*/react["createElement"](MenuItem, {
key: filter.value !== undefined ? key : index
}, /*#__PURE__*/react["createElement"](Component, {
checked: filteredKeys.includes(key)
}), /*#__PURE__*/react["createElement"]("span", null, filter.text));
});
}
function FilterDropdown(props) {
var _a;
var prefixCls = props.prefixCls,
column = props.column,
dropdownPrefixCls = props.dropdownPrefixCls,
columnKey = props.columnKey,
filterMultiple = props.filterMultiple,
filterState = props.filterState,
triggerFilter = props.triggerFilter,
locale = props.locale,
children = props.children,
getPopupContainer = props.getPopupContainer;
var filterDropdownVisible = column.filterDropdownVisible,
onFilterDropdownVisibleChange = column.onFilterDropdownVisibleChange;
var _React$useState = react["useState"](false),
_React$useState2 = slicedToArray_default()(_React$useState, 2),
visible = _React$useState2[0],
setVisible = _React$useState2[1];
var filtered = !!(filterState && (((_a = filterState.filteredKeys) === null || _a === void 0 ? void 0 : _a.length) || filterState.forceFiltered));
var triggerVisible = function triggerVisible(newVisible) {
setVisible(newVisible);
if (onFilterDropdownVisibleChange) {
onFilterDropdownVisibleChange(newVisible);
}
};
var mergedVisible = typeof filterDropdownVisible === 'boolean' ? filterDropdownVisible : visible; // ===================== Select Keys =====================
var propFilteredKeys = filterState && filterState.filteredKeys;
var _useSyncState = Object(useSyncState["a" /* default */])(propFilteredKeys || []),
_useSyncState2 = slicedToArray_default()(_useSyncState, 2),
getFilteredKeysSync = _useSyncState2[0],
setFilteredKeysSync = _useSyncState2[1];
var onSelectKeys = function onSelectKeys(_ref3) {
var selectedKeys = _ref3.selectedKeys;
setFilteredKeysSync(selectedKeys);
};
react["useEffect"](function () {
onSelectKeys({
selectedKeys: propFilteredKeys || []
});
}, [propFilteredKeys]); // ====================== Open Keys ======================
var _React$useState3 = react["useState"]([]),
_React$useState4 = slicedToArray_default()(_React$useState3, 2),
openKeys = _React$useState4[0],
setOpenKeys = _React$useState4[1];
var openRef = react["useRef"]();
var onOpenChange = function onOpenChange(keys) {
openRef.current = window.setTimeout(function () {
setOpenKeys(keys);
});
};
var onMenuClick = function onMenuClick() {
window.clearTimeout(openRef.current);
};
react["useEffect"](function () {
return function () {
window.clearTimeout(openRef.current);
};
}, []); // ======================= Submit ========================
var internalTriggerFilter = function internalTriggerFilter(keys) {
triggerVisible(false);
var mergedKeys = keys && keys.length ? keys : null;
if (mergedKeys === null && (!filterState || !filterState.filteredKeys)) {
return null;
}
if (isEqual_default()(mergedKeys, filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys)) {
return null;
}
triggerFilter({
column: column,
key: columnKey,
filteredKeys: mergedKeys
});
};
var onConfirm = function onConfirm() {
internalTriggerFilter(getFilteredKeysSync());
};
var onReset = function onReset() {
setFilteredKeysSync([]);
internalTriggerFilter([]);
};
var onVisibleChange = function onVisibleChange(newVisible) {
if (newVisible && propFilteredKeys !== undefined) {
// Sync filteredKeys on appear in controlled mode (propFilteredKeys !== undefiend)
setFilteredKeysSync(propFilteredKeys || []);
}
triggerVisible(newVisible); // Default will filter when closed
if (!newVisible && !column.filterDropdown) {
onConfirm();
}
}; // ======================== Style ========================
var dropdownMenuClass = classnames_default()(defineProperty_default()({}, "".concat(dropdownPrefixCls, "-menu-without-submenu"), !hasSubMenu(column.filters || [])));
var dropdownContent;
if (typeof column.filterDropdown === 'function') {
dropdownContent = column.filterDropdown({
prefixCls: "".concat(dropdownPrefixCls, "-custom"),
setSelectedKeys: function setSelectedKeys(selectedKeys) {
return onSelectKeys({
selectedKeys: selectedKeys
});
},
selectedKeys: getFilteredKeysSync(),
confirm: onConfirm,
clearFilters: onReset,
filters: column.filters,
visible: mergedVisible
});
} else if (column.filterDropdown) {
dropdownContent = column.filterDropdown;
} else {
var selectedKeys = getFilteredKeysSync() || [];
dropdownContent = /*#__PURE__*/react["createElement"](react["Fragment"], null, /*#__PURE__*/react["createElement"](es_menu["a" /* default */], {
multiple: filterMultiple,
prefixCls: "".concat(dropdownPrefixCls, "-menu"),
className: dropdownMenuClass,
onClick: onMenuClick,
onSelect: onSelectKeys,
onDeselect: onSelectKeys,
selectedKeys: selectedKeys,
getPopupContainer: getPopupContainer,
openKeys: openKeys,
onOpenChange: onOpenChange
}, renderFilterItems({
filters: column.filters || [],
prefixCls: prefixCls,
filteredKeys: getFilteredKeysSync(),
filterMultiple: filterMultiple,
locale: locale
})), /*#__PURE__*/react["createElement"]("div", {
className: "".concat(prefixCls, "-dropdown-btns")
}, /*#__PURE__*/react["createElement"](es_button["a" /* default */], {
type: "link",
size: "small",
disabled: selectedKeys.length === 0,
onClick: onReset
}, locale.filterReset), /*#__PURE__*/react["createElement"](es_button["a" /* default */], {
type: "primary",
size: "small",
onClick: onConfirm
}, locale.filterConfirm)));
}
var menu = /*#__PURE__*/react["createElement"](FilterWrapper, {
className: "".concat(prefixCls, "-dropdown")
}, dropdownContent);
var filterIcon;
if (typeof column.filterIcon === 'function') {
filterIcon = column.filterIcon(filtered);
} else if (column.filterIcon) {
filterIcon = column.filterIcon;
} else {
filterIcon = /*#__PURE__*/react["createElement"](FilterFilled_default.a, null);
}
var _React$useContext = react["useContext"](config_provider_context["b" /* ConfigContext */]),
direction = _React$useContext.direction;
return /*#__PURE__*/react["createElement"]("div", {
className: classnames_default()("".concat(prefixCls, "-column"))
}, /*#__PURE__*/react["createElement"]("span", {
className: "".concat(prefixCls, "-column-title")
}, children), /*#__PURE__*/react["createElement"]("span", {
className: classnames_default()("".concat(prefixCls, "-trigger-container"), defineProperty_default()({}, "".concat(prefixCls, "-trigger-container-open"), mergedVisible)),
onClick: function onClick(e) {
e.stopPropagation();
}
}, /*#__PURE__*/react["createElement"](dropdown["a" /* default */], {
overlay: menu,
trigger: ['click'],
visible: mergedVisible,
onVisibleChange: onVisibleChange,
getPopupContainer: getPopupContainer,
placement: direction === 'rtl' ? 'bottomLeft' : 'bottomRight'
}, /*#__PURE__*/react["createElement"]("span", {
role: "button",
tabIndex: -1,
className: classnames_default()("".concat(prefixCls, "-trigger"), {
active: filtered
})
}, filterIcon))));
}
/* harmony default export */ var useFilter_FilterDropdown = (FilterDropdown);
// CONCATENATED MODULE: ./node_modules/antd/es/table/hooks/useFilter/index.js
function collectFilterStates(columns, init, pos) {
var filterStates = [];
(columns || []).forEach(function (column, index) {
var columnPos = getColumnPos(index, pos);
if ('children' in column) {
filterStates = [].concat(toConsumableArray_default()(filterStates), toConsumableArray_default()(collectFilterStates(column.children, init, columnPos)));
} else if (column.filters || 'filterDropdown' in column || 'onFilter' in column) {
if ('filteredValue' in column) {
// Controlled
filterStates.push({
column: column,
key: getColumnKey(column, columnPos),
filteredKeys: column.filteredValue,
forceFiltered: column.filtered
});
} else {
// Uncontrolled
filterStates.push({
column: column,
key: getColumnKey(column, columnPos),
filteredKeys: init && column.defaultFilteredValue ? column.defaultFilteredValue : undefined,
forceFiltered: column.filtered
});
}
}
});
return filterStates;
}
function injectFilter(prefixCls, dropdownPrefixCls, columns, filterStates, triggerFilter, getPopupContainer, locale, pos) {
return columns.map(function (column, index) {
var columnPos = getColumnPos(index, pos);
var _column$filterMultipl = column.filterMultiple,
filterMultiple = _column$filterMultipl === void 0 ? true : _column$filterMultipl;
if (column.filters || 'filterDropdown' in column) {
var columnKey = getColumnKey(column, columnPos);
var filterState = filterStates.find(function (_ref) {
var key = _ref.key;
return columnKey === key;
});
return extends_default()(extends_default()({}, column), {
title: function title(renderProps) {
return /*#__PURE__*/react["createElement"](useFilter_FilterDropdown, {
prefixCls: "".concat(prefixCls, "-filter"),
dropdownPrefixCls: dropdownPrefixCls,
column: column,
columnKey: columnKey,
filterState: filterState,
filterMultiple: filterMultiple,
triggerFilter: triggerFilter,
locale: locale,
getPopupContainer: getPopupContainer
}, renderColumnTitle(column.title, renderProps));
}
});
}
if ('children' in column) {
return extends_default()(extends_default()({}, column), {
children: injectFilter(prefixCls, dropdownPrefixCls, column.children, filterStates, triggerFilter, getPopupContainer, locale, columnPos)
});
}
return column;
});
}
function generateFilterInfo(filterStates) {
var currentFilters = {};
filterStates.forEach(function (_ref2) {
var key = _ref2.key,
filteredKeys = _ref2.filteredKeys;
currentFilters[key] = filteredKeys || null;
});
return currentFilters;
}
function flattenKeys(filters) {
var keys = [];
(filters || []).forEach(function (_ref3) {
var value = _ref3.value,
children = _ref3.children;
keys.push(value);
if (children) {
keys = [].concat(toConsumableArray_default()(keys), toConsumableArray_default()(flattenKeys(children)));
}
});
return keys;
}
function getFilterData(data, filterStates) {
return filterStates.reduce(function (currentData, filterState) {
var _filterState$column = filterState.column,
onFilter = _filterState$column.onFilter,
filters = _filterState$column.filters,
filteredKeys = filterState.filteredKeys;
if (onFilter && filteredKeys && filteredKeys.length) {
return currentData.filter(function (record) {
return filteredKeys.some(function (key) {
var keys = flattenKeys(filters);
var keyIndex = keys.findIndex(function (k) {
return String(k) === String(key);
});
var realKey = keyIndex !== -1 ? keys[keyIndex] : key;
return onFilter(realKey, record);
});
});
}
return currentData;
}, data);
}
function useFilter(_ref4) {
var prefixCls = _ref4.prefixCls,
dropdownPrefixCls = _ref4.dropdownPrefixCls,
mergedColumns = _ref4.mergedColumns,
onFilterChange = _ref4.onFilterChange,
getPopupContainer = _ref4.getPopupContainer,
tableLocale = _ref4.locale;
var _React$useState = react["useState"](collectFilterStates(mergedColumns, true)),
_React$useState2 = slicedToArray_default()(_React$useState, 2),
filterStates = _React$useState2[0],
setFilterStates = _React$useState2[1];
var mergedFilterStates = react["useMemo"](function () {
var collectedStates = collectFilterStates(mergedColumns, false); // Return if not controlled
if (collectedStates.every(function (_ref5) {
var filteredKeys = _ref5.filteredKeys;
return filteredKeys === undefined;
})) {
return filterStates;
}
return collectedStates;
}, [mergedColumns, filterStates]);
var getFilters = react["useCallback"](function () {
return generateFilterInfo(mergedFilterStates);
}, [mergedFilterStates]);
var triggerFilter = function triggerFilter(filterState) {
var newFilterStates = mergedFilterStates.filter(function (_ref6) {
var key = _ref6.key;
return key !== filterState.key;
});
newFilterStates.push(filterState);
setFilterStates(newFilterStates);
onFilterChange(generateFilterInfo(newFilterStates), newFilterStates);
};
var transformColumns = function transformColumns(innerColumns) {
return injectFilter(prefixCls, dropdownPrefixCls, innerColumns, mergedFilterStates, triggerFilter, getPopupContainer, tableLocale);
};
return [transformColumns, mergedFilterStates, getFilters];
}
/* harmony default export */ var hooks_useFilter = (useFilter);
// CONCATENATED MODULE: ./node_modules/antd/es/table/hooks/useTitleColumns.js
function fillTitle(columns, columnTitleProps) {
return columns.map(function (column) {
var cloneColumn = extends_default()({}, column);
cloneColumn.title = renderColumnTitle(column.title, columnTitleProps);
if ('children' in cloneColumn) {
cloneColumn.children = fillTitle(cloneColumn.children, columnTitleProps);
}
return cloneColumn;
});
}
function useTitleColumns(columnTitleProps) {
var filledColumns = react["useCallback"](function (columns) {
return fillTitle(columns, columnTitleProps);
}, [columnTitleProps]);
return [filledColumns];
}
// CONCATENATED MODULE: ./node_modules/antd/es/table/ExpandIcon.js
function ExpandIcon_renderExpandIcon(locale) {
return function expandIcon(_ref) {
var _classNames;
var prefixCls = _ref.prefixCls,
onExpand = _ref.onExpand,
record = _ref.record,
expanded = _ref.expanded,
expandable = _ref.expandable;
var iconPrefix = "".concat(prefixCls, "-row-expand-icon");
return /*#__PURE__*/react["createElement"]("button", {
type: "button",
onClick: function onClick(e) {
onExpand(record, e);
e.stopPropagation();
},
className: classnames_default()(iconPrefix, (_classNames = {}, defineProperty_default()(_classNames, "".concat(iconPrefix, "-spaced"), !expandable), defineProperty_default()(_classNames, "".concat(iconPrefix, "-expanded"), expandable && expanded), defineProperty_default()(_classNames, "".concat(iconPrefix, "-collapsed"), expandable && !expanded), _classNames)),
"aria-label": expanded ? locale.collapse : locale.expand
});
};
}
/* harmony default export */ var ExpandIcon = (ExpandIcon_renderExpandIcon);
// CONCATENATED MODULE: ./node_modules/antd/es/_util/getScroll.js
function isWindow(obj) {
return obj !== null && obj !== undefined && obj === obj.window;
}
function getScroll_getScroll(target, top) {
if (typeof window === 'undefined') {
return 0;
}
var method = top ? 'scrollTop' : 'scrollLeft';
var result = 0;
if (isWindow(target)) {
result = target[top ? 'pageYOffset' : 'pageXOffset'];
} else if (target instanceof Document) {
result = target.documentElement[method];
} else if (target) {
result = target[method];
}
if (target && !isWindow(target) && typeof result !== 'number') {
result = (target.ownerDocument || target).documentElement[method];
}
return result;
}
// CONCATENATED MODULE: ./node_modules/antd/es/_util/easings.js
// eslint-disable-next-line import/prefer-default-export
function easeInOutCubic(t, b, c, d) {
var cc = c - b;
t /= d / 2;
if (t < 1) {
return cc / 2 * t * t * t + b;
} // eslint-disable-next-line no-return-assign
return cc / 2 * ((t -= 2) * t * t + 2) + b;
}
// CONCATENATED MODULE: ./node_modules/antd/es/_util/scrollTo.js
function scrollTo(y) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _options$getContainer = options.getContainer,
getContainer = _options$getContainer === void 0 ? function () {
return window;
} : _options$getContainer,
callback = options.callback,
_options$duration = options.duration,
duration = _options$duration === void 0 ? 450 : _options$duration;
var container = getContainer();
var scrollTop = getScroll_getScroll(container, true);
var startTime = Date.now();
var frameFunc = function frameFunc() {
var timestamp = Date.now();
var time = timestamp - startTime;
var nextScrollTop = easeInOutCubic(time > duration ? duration : time, scrollTop, y, duration);
if (isWindow(container)) {
container.scrollTo(window.pageXOffset, nextScrollTop);
} else if (container instanceof HTMLDocument || container.constructor.name === 'HTMLDocument') {
container.documentElement.scrollTop = nextScrollTop;
} else {
container.scrollTop = nextScrollTop;
}
if (time < duration) {
raf_default()(frameFunc);
} else if (typeof callback === 'function') {
callback();
}
};
raf_default()(frameFunc);
}
// EXTERNAL MODULE: ./node_modules/antd/es/locale/default.js + 4 modules
var locale_default = __webpack_require__("ZvpZ");
// CONCATENATED MODULE: ./node_modules/antd/es/locale/en_US.js
/* harmony default export */ var en_US = (locale_default["a" /* default */]);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/SizeContext.js
var SizeContext = __webpack_require__("3Nzz");
// CONCATENATED MODULE: ./node_modules/antd/es/table/Column.js
/* istanbul ignore next */
/**
* This is a syntactic sugar for `columns` prop.
* So HOC will not work on this.
*/
// eslint-disable-next-line no-unused-vars
function Column_Column(_) {
return null;
}
/* harmony default export */ var table_Column = (Column_Column);
// CONCATENATED MODULE: ./node_modules/antd/es/table/ColumnGroup.js
/* istanbul ignore next */
/**
* This is a syntactic sugar for `columns` prop.
* So HOC will not work on this.
*/
// eslint-disable-next-line no-unused-vars
function ColumnGroup_ColumnGroup(_) {
return null;
}
/* harmony default export */ var table_ColumnGroup = (ColumnGroup_ColumnGroup);
// EXTERNAL MODULE: ./node_modules/antd/es/grid/hooks/useBreakpoint.js
var useBreakpoint = __webpack_require__("5OYt");
// CONCATENATED MODULE: ./node_modules/antd/es/table/Table.js
var EMPTY_LIST = [];
function Table_Table(props) {
var _classNames3;
var customizePrefixCls = props.prefixCls,
className = props.className,
style = props.style,
customizeSize = props.size,
bordered = props.bordered,
customizeDropdownPrefixCls = props.dropdownPrefixCls,
dataSource = props.dataSource,
pagination = props.pagination,
rowSelection = props.rowSelection,
rowKey = props.rowKey,
rowClassName = props.rowClassName,
columns = props.columns,
children = props.children,
legacyChildrenColumnName = props.childrenColumnName,
onChange = props.onChange,
getPopupContainer = props.getPopupContainer,
loading = props.loading,
expandIcon = props.expandIcon,
expandable = props.expandable,
expandedRowRender = props.expandedRowRender,
expandIconColumnIndex = props.expandIconColumnIndex,
indentSize = props.indentSize,
scroll = props.scroll,
sortDirections = props.sortDirections,
locale = props.locale,
_props$showSorterTool = props.showSorterTooltip,
showSorterTooltip = _props$showSorterTool === void 0 ? true : _props$showSorterTool;
Object(devWarning["a" /* default */])(!(typeof rowKey === 'function' && rowKey.length > 1), 'Table', '`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected.');
var screens = Object(useBreakpoint["a" /* default */])();
var mergedColumns = react["useMemo"](function () {
var matched = new Set(Object.keys(screens).filter(function (m) {
return screens[m];
}));
return (columns || convertChildrenToColumns(children)).filter(function (c) {
return !c.responsive || c.responsive.some(function (r) {
return matched.has(r);
});
});
}, [children, columns, screens]);
var tableProps = Object(es["a" /* default */])(props, ['className', 'style', 'columns']);
var size = react["useContext"](SizeContext["b" /* default */]);
var _React$useContext = react["useContext"](config_provider_context["b" /* ConfigContext */]),
_React$useContext$loc = _React$useContext.locale,
contextLocale = _React$useContext$loc === void 0 ? en_US : _React$useContext$loc,
renderEmpty = _React$useContext.renderEmpty,
direction = _React$useContext.direction;
var mergedSize = customizeSize || size;
var tableLocale = extends_default()(extends_default()({}, contextLocale.Table), locale);
var rawData = dataSource || EMPTY_LIST;
var _React$useContext2 = react["useContext"](config_provider_context["b" /* ConfigContext */]),
getPrefixCls = _React$useContext2.getPrefixCls;
var prefixCls = getPrefixCls('table', customizePrefixCls);
var dropdownPrefixCls = getPrefixCls('dropdown', customizeDropdownPrefixCls);
var mergedExpandable = extends_default()({
childrenColumnName: legacyChildrenColumnName,
expandIconColumnIndex: expandIconColumnIndex
}, expandable);
var _mergedExpandable$chi = mergedExpandable.childrenColumnName,
childrenColumnName = _mergedExpandable$chi === void 0 ? 'children' : _mergedExpandable$chi;
var expandType = react["useMemo"](function () {
if (rawData.some(function (item) {
var _a;
return (_a = item) === null || _a === void 0 ? void 0 : _a[childrenColumnName];
})) {
return 'nest';
}
if (expandedRowRender || expandable && expandable.expandedRowRender) {
return 'row';
}
return null;
}, [rawData]);
var internalRefs = {
body: react["useRef"]()
}; // ============================ RowKey ============================
var getRowKey = react["useMemo"](function () {
if (typeof rowKey === 'function') {
return rowKey;
}
return function (record) {
var _a;
return (_a = record) === null || _a === void 0 ? void 0 : _a[rowKey];
};
}, [rowKey]);
var _useLazyKVMap = useLazyKVMap(rawData, childrenColumnName, getRowKey),
_useLazyKVMap2 = slicedToArray_default()(_useLazyKVMap, 1),
getRecordByKey = _useLazyKVMap2[0]; // ============================ Events =============================
var changeEventInfo = {};
var triggerOnChange = function triggerOnChange(info, action) {
var reset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var changeInfo = extends_default()(extends_default()({}, changeEventInfo), info);
if (reset) {
changeEventInfo.resetPagination(); // Reset event param
if (changeInfo.pagination.current) {
changeInfo.pagination.current = 1;
} // Trigger pagination events
if (pagination && pagination.onChange) {
pagination.onChange(1, changeInfo.pagination.pageSize);
}
}
if (scroll && scroll.scrollToFirstRowOnChange !== false && internalRefs.body.current) {
scrollTo(0, {
getContainer: function getContainer() {
return internalRefs.body.current;
}
});
}
if (onChange) {
onChange(changeInfo.pagination, changeInfo.filters, changeInfo.sorter, {
currentDataSource: getFilterData(getSortData(rawData, changeInfo.sorterStates, childrenColumnName), changeInfo.filterStates),
action: action
});
}
};
/**
* Controlled state in `columns` is not a good idea that makes too many code (1000+ line?)
* to read state out and then put it back to title render.
* Move these code into `hooks` but still too complex.
* We should provides Table props like `sorter` & `filter` to handle control in next big version.
*/
// ============================ Sorter =============================
var onSorterChange = function onSorterChange(sorter, sorterStates) {
triggerOnChange({
sorter: sorter,
sorterStates: sorterStates
}, 'sort', false);
};
var _useSorter = useFilterSorter({
prefixCls: prefixCls,
mergedColumns: mergedColumns,
onSorterChange: onSorterChange,
sortDirections: sortDirections || ['ascend', 'descend'],
tableLocale: tableLocale,
showSorterTooltip: showSorterTooltip
}),
_useSorter2 = slicedToArray_default()(_useSorter, 4),
transformSorterColumns = _useSorter2[0],
sortStates = _useSorter2[1],
sorterTitleProps = _useSorter2[2],
getSorters = _useSorter2[3];
var sortedData = react["useMemo"](function () {
return getSortData(rawData, sortStates, childrenColumnName);
}, [rawData, sortStates]);
changeEventInfo.sorter = getSorters();
changeEventInfo.sorterStates = sortStates; // ============================ Filter ============================
var onFilterChange = function onFilterChange(filters, filterStates) {
triggerOnChange({
filters: filters,
filterStates: filterStates
}, 'filter', true);
};
var _useFilter = hooks_useFilter({
prefixCls: prefixCls,
locale: tableLocale,
dropdownPrefixCls: dropdownPrefixCls,
mergedColumns: mergedColumns,
onFilterChange: onFilterChange,
getPopupContainer: getPopupContainer
}),
_useFilter2 = slicedToArray_default()(_useFilter, 3),
transformFilterColumns = _useFilter2[0],
filterStates = _useFilter2[1],
getFilters = _useFilter2[2];
var mergedData = getFilterData(sortedData, filterStates);
changeEventInfo.filters = getFilters();
changeEventInfo.filterStates = filterStates; // ============================ Column ============================
var columnTitleProps = react["useMemo"](function () {
return extends_default()({}, sorterTitleProps);
}, [sorterTitleProps]);
var _useTitleColumns = useTitleColumns(columnTitleProps),
_useTitleColumns2 = slicedToArray_default()(_useTitleColumns, 1),
transformTitleColumns = _useTitleColumns2[0]; // ========================== Pagination ==========================
var onPaginationChange = function onPaginationChange(current, pageSize) {
triggerOnChange({
pagination: extends_default()(extends_default()({}, changeEventInfo.pagination), {
current: current,
pageSize: pageSize
})
}, 'paginate');
};
var _usePagination = usePagination(mergedData.length, pagination, onPaginationChange),
_usePagination2 = slicedToArray_default()(_usePagination, 2),
mergedPagination = _usePagination2[0],
resetPagination = _usePagination2[1];
changeEventInfo.pagination = pagination === false ? {} : getPaginationParam(pagination, mergedPagination);
changeEventInfo.resetPagination = resetPagination; // ============================= Data =============================
var pageData = react["useMemo"](function () {
if (pagination === false || !mergedPagination.pageSize) {
return mergedData;
}
var _mergedPagination$cur = mergedPagination.current,
current = _mergedPagination$cur === void 0 ? 1 : _mergedPagination$cur,
total = mergedPagination.total,
_mergedPagination$pag = mergedPagination.pageSize,
pageSize = _mergedPagination$pag === void 0 ? DEFAULT_PAGE_SIZE : _mergedPagination$pag; // Dynamic table data
if (mergedData.length < total) {
if (mergedData.length > pageSize) {
Object(devWarning["a" /* default */])(false, 'Table', '`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.');
return mergedData.slice((current - 1) * pageSize, current * pageSize);
}
return mergedData;
}
return mergedData.slice((current - 1) * pageSize, current * pageSize);
}, [!!pagination, mergedData, mergedPagination && mergedPagination.current, mergedPagination && mergedPagination.pageSize, mergedPagination && mergedPagination.total]); // ========================== Selections ==========================
var _useSelection = useSelection(rowSelection, {
prefixCls: prefixCls,
data: mergedData,
pageData: pageData,
getRowKey: getRowKey,
getRecordByKey: getRecordByKey,
expandType: expandType,
childrenColumnName: childrenColumnName,
locale: tableLocale,
expandIconColumnIndex: mergedExpandable.expandIconColumnIndex,
getPopupContainer: getPopupContainer
}),
_useSelection2 = slicedToArray_default()(_useSelection, 2),
transformSelectionColumns = _useSelection2[0],
selectedKeySet = _useSelection2[1];
var internalRowClassName = function internalRowClassName(record, index, indent) {
var mergedRowClassName;
if (typeof rowClassName === 'function') {
mergedRowClassName = classnames_default()(rowClassName(record, index, indent));
} else {
mergedRowClassName = classnames_default()(rowClassName);
}
return classnames_default()(defineProperty_default()({}, "".concat(prefixCls, "-row-selected"), selectedKeySet.has(getRowKey(record, index))), mergedRowClassName);
}; // ========================== Expandable ==========================
// Pass origin render status into `rc-table`, this can be removed when refactor with `rc-table`
mergedExpandable.__PARENT_RENDER_ICON__ = mergedExpandable.expandIcon; // Customize expandable icon
mergedExpandable.expandIcon = mergedExpandable.expandIcon || expandIcon || ExpandIcon(tableLocale); // Adjust expand icon index, no overwrite expandIconColumnIndex if set.
if (expandType === 'nest' && mergedExpandable.expandIconColumnIndex === undefined) {
mergedExpandable.expandIconColumnIndex = rowSelection ? 1 : 0;
} else if (mergedExpandable.expandIconColumnIndex > 0 && rowSelection) {
mergedExpandable.expandIconColumnIndex -= 1;
} // Indent size
if (typeof mergedExpandable.indentSize !== 'number') {
mergedExpandable.indentSize = typeof indentSize === 'number' ? indentSize : 15;
} // ============================ Render ============================
var transformColumns = react["useCallback"](function (innerColumns) {
return transformTitleColumns(transformSelectionColumns(transformFilterColumns(transformSorterColumns(innerColumns))));
}, [transformSorterColumns, transformFilterColumns, transformSelectionColumns]);
var topPaginationNode;
var bottomPaginationNode;
if (pagination !== false) {
var paginationSize;
if (mergedPagination.size) {
paginationSize = mergedPagination.size;
} else {
paginationSize = mergedSize === 'small' || mergedSize === 'middle' ? 'small' : undefined;
}
var renderPagination = function renderPagination(position) {
return /*#__PURE__*/react["createElement"](es_pagination["a" /* default */], extends_default()({
className: "".concat(prefixCls, "-pagination ").concat(prefixCls, "-pagination-").concat(position)
}, mergedPagination, {
size: paginationSize
}));
};
var defaultPosition = direction === 'rtl' ? 'left' : 'right';
if (mergedPagination.position !== null && Array.isArray(mergedPagination.position)) {
var topPos = mergedPagination.position.find(function (p) {
return p.indexOf('top') !== -1;
});
var bottomPos = mergedPagination.position.find(function (p) {
return p.indexOf('bottom') !== -1;
});
if (!topPos && !bottomPos) {
bottomPaginationNode = renderPagination(defaultPosition);
} else {
if (topPos) {
topPaginationNode = renderPagination(topPos.toLowerCase().replace('top', ''));
}
if (bottomPos) {
bottomPaginationNode = renderPagination(bottomPos.toLowerCase().replace('bottom', ''));
}
}
} else {
bottomPaginationNode = renderPagination(defaultPosition);
}
} // >>>>>>>>> Spinning
var spinProps;
if (typeof loading === 'boolean') {
spinProps = {
spinning: loading
};
} else if (typeof_default()(loading) === 'object') {
spinProps = extends_default()({
spinning: true
}, loading);
}
var wrapperClassNames = classnames_default()("".concat(prefixCls, "-wrapper"), className, defineProperty_default()({}, "".concat(prefixCls, "-wrapper-rtl"), direction === 'rtl'));
return /*#__PURE__*/react["createElement"]("div", {
className: wrapperClassNames,
style: style
}, /*#__PURE__*/react["createElement"](spin["a" /* default */], extends_default()({
spinning: false
}, spinProps), topPaginationNode, /*#__PURE__*/react["createElement"](rc_table_es, extends_default()({}, tableProps, {
columns: mergedColumns,
direction: direction,
expandable: mergedExpandable,
prefixCls: prefixCls,
className: classnames_default()((_classNames3 = {}, defineProperty_default()(_classNames3, "".concat(prefixCls, "-middle"), mergedSize === 'middle'), defineProperty_default()(_classNames3, "".concat(prefixCls, "-small"), mergedSize === 'small'), defineProperty_default()(_classNames3, "".concat(prefixCls, "-bordered"), bordered), defineProperty_default()(_classNames3, "".concat(prefixCls, "-empty"), rawData.length === 0), _classNames3)),
data: pageData,
rowKey: getRowKey,
rowClassName: internalRowClassName,
emptyText: locale && locale.emptyText || renderEmpty('Table') // Internal
,
internalHooks: INTERNAL_HOOKS,
internalRefs: internalRefs,
transformColumns: transformColumns
})), mergedData && mergedData.length > 0 && bottomPaginationNode));
}
Table_Table.defaultProps = {
rowKey: 'key'
};
Table_Table.SELECTION_ALL = SELECTION_ALL;
Table_Table.SELECTION_INVERT = SELECTION_INVERT;
Table_Table.Column = table_Column;
Table_Table.ColumnGroup = table_ColumnGroup;
Table_Table.Summary = FooterComponents;
/* harmony default export */ var table_Table = (Table_Table);
// CONCATENATED MODULE: ./node_modules/antd/es/table/index.js
/* harmony default export */ var table = __webpack_exports__["a"] = (table_Table);
/***/ })
}]);